Thursday, October 21, 2021

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

 




Intro

Most of the companies do not want to maintain data centers because it’s too costly for the organization. Cloud platforms like Oracle , Azure ,AWS and Google Cloud enables companies to host their server farms on cloud. This is 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 use of pay as you go concept enable companies to save money and help them to focus on their core business. Also many features are introduced on cloud environments optimize security of the environment.

This is 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 centers.

This article we are going to cover database RAC database creation on OCI.


1. Setup network

Initial step is to create a network , because we need public network to access server.

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

As we are creating this database for testing purpose you can use VCN Wizard and create two network
  1. Public (Access database via internet)
  2. Private (Internal network)





This figure illustrates the VCN network creation.





2. Create VM (RAC environment)


Oracle Database → Bare Metal , VM and Exadata.







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




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




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



Now select the vm shape that required for your database load.





2.1 Setup SSH keys


Use below link to generate ssh-keys. ssh keys are required to login database servers.





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




Once you feed all the required information click the create button. This process will take close to 45min - 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 database.




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





3. Login to environment


you can use Cmder | Console Emulator console to 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

No comments:

Post a Comment

Unified Auditing Housekeeping

  Intro  Data is the new currency. It is one of the most valuable organizational assets, however, if that data is not well...