Oracle Cloud Infrastructure (OCI) – Part 1: RAC using OCI VM Servers

oci

Intro

Most companies do not want to maintain data centres because it’s too costly for the organization. Cloud platforms like Oracle, Microsoft Azure, Amazon Web Services and Google Cloud enables companies to host their server farms on the cloud. This is a major game-changer of the current era, Cloud hosting enables many features to optimize the cost and new features like scaling the resource as per the organization needs.

I strongly believe the use of the pay you go concept enable companies to save money and help them to focus on their core business. Also, many features are introduced in cloud environments to optimize the security of the environment.

This is a simple explanation of what is oracle cloud and the service offering of the database.

What is Oracle Cloud?

Oracle Cloud is a cloud computing service offered by Oracle Corporation providing servers, storage, network, applications and services through a global network of Oracle Corporation managed data centres.

In this article, we are going to cover database RAC Database creation on OCI.

 

1. Setup Network

The initial step is to create a network because we need a Public Network to access the server.

Login to OCI console and navigate to Networking → Virtual Cloud Network (VCN).

As we are creating this database for testing purposes you can use VCN Wizard and create two network

  1. Public (Access Database via the Internet)
  2. Private (Internal Network)

oci 2

This figure illustrates the VCN Network Creation

oci 3

 

2. Create VM (RAC Environment)

Oracle Database → Bare Metal, Virtual Machine and Exadata.

oci 4

Once you login to the database page click the “Create DB System”

oci 5

To create a database we need to feed information like compartment name, region, shape and configure the DB system. As we are going to create a RAC instance we need to give node count as two(2).

oci 6

As we are setting up RAC give node count as 2. Then the installation will be complete on a two-node RAC.

oci 7

Now select the VM shape that is required for your database load.

oci 8

 

2.1 Setup SSH Keys

Use the below link to generate ssh-keys. ssh keys are required to log in to Database Servers.

Generating an SSH Key Pair for Oracle Compute Cloud Service Instances

oci 9

For this database installation, we are going to use “Oracle Grid Infrastructure “, so data files will be residing in ASM storage.

oci 10

Once you feed all the required information click the create button. This process will take close to 45min – to 1 hour. As we are creating this using “Oracle Grid Infrastructure “ installation will take some time.

  1. Install Grid
  2. Create ASM Storage
  3. Install database software and create a database

oci 11

Once the database creation is complete check the status of the server.

oci 12

 

3. Log in to Environment

you can use Cmder | Console Emulator console to login OCI, using this we can execute Linux Commands.

To login, OCI navigate to where your private key is located and 

run  : ssh -i ./myOracleCloudKey.ppk opc@<ip_address>

D:\Cloud-Lab\chana885391
λ ssh -i ./myOracleCloudKey.ppk opc@140.238.152.37
Enter passphrase for key './myOracleCloudKey.ppk':
Last login: Fri Oct 15 20:47:43 2021 from 173.34.200.48
[opc@dbsdpl21 ~]$ sudo su - oracle
Last login: Fri Oct 15 21:42:12 UTC 2021
[oracle@dbsdpl21 ~]$ ps -ef | grep pmon
oracle    4261  3978  0 19:37 pts/0    00:00:00 grep --color=auto pmon
[oracle@dbsdpl21 ~]$

[oracle@dbsdpl21 ~]$ ps -ef | grep pmon
grid      7184     1  0 19:38 ?        00:00:00 asm_pmon_+ASM1
grid      8080     1  0 19:39 ?        00:00:00 apx_pmon_+APX1
oracle    8535     1  0 19:39 ?        00:00:00 ora_pmon_PWSH011
oracle    9568  3978  0 19:39 pts/0    00:00:00 grep --color=auto pmon
SQL> show parameter db_uni

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                       string      PWSH01_yyz16x

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PWHSE_PDB                      READ WRITE NO

INSTANCE_NAME    STATUS       HOST_NAME                                                        STARTUP_TIME
---------------- ------------ ---------------------------------------------------------------- ----------------
PWSH011          OPEN         dbsdpl21                                                         19/10/2021 19:39
PWSH012          OPEN         dbsdpl22                                                         19/10/2021 19:39
Share on:
Come work with the Best