How to create RAC database using dbca: Easy step-by-step guide

In this article, I will provide a detailed guide on how to create RAC database using dbca. We’ll walk you through each step of the process with proper screenshots.

1. Open MobaXterm to log in to node1 and set the environment for the RAC database you want to create. The next step is to run the dbca command. Here we are going to create RAC database using dbca called racdb:

If you do not have MobaXterm software installed on your machine then you can follow the steps mentioned in my article MobaXterm install and setup.

[oracle@node1 ~]$ 
export ORACLE_HOME=/u01/app/oracle/product/19.3.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=racdb
env|grep ORA

ORACLE_SID=racdb
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/19.3.0/dbhome_1

[oracle@node1 ~]$ dbca

2. Select Create a Database and click on Next:

create RAC database using dbca

3. Now select advanced configuration and proceed:

How to create RAC database using dbca: Easy step-by-step guide

4. Check the database & configuration type as below and select General purpose or Transaction Processing Template to proceed:

How to create RAC database using dbca: Easy step-by-step guide

5. Click on select all to select all the nodes and click on Next:

How to create RAC database using dbca: Easy step-by-step guide

6. Provide the Global database name as well as SID prefix and click on Next:

How to create RAC database using dbca: Easy step-by-step guide

7. Select Database files storage type as Automatic Storage Management(ASM) and select Use Oracle-managed files (OMF):

How to create RAC database using dbca: Easy step-by-step guide

8. As of now we are not selecting FRA and archiving. You can enable it later also.

How to create RAC database using dbca: Easy step-by-step guide

9. We are not configuring the database vault and Oracle Label security.You can select these options if you want.

How to create RAC database using dbca: Easy step-by-step guide

10. Select Use Automatic Shared Memory Management and click on Next:

How to create RAC database using dbca: Easy step-by-step guide

11. Select Run Cluster Verification Utility(CVU) checks periodically:

How to create RAC database using dbca: Easy step-by-step guide

12. Provide the SYS, SYSTEM and DBSNMP administrative user passwords:

How to create RAC database using dbca: Easy step-by-step guide

13. Ignore the warning message and click on Yes:

How to create RAC database using dbca: Easy step-by-step guide

14. Select Create database and click on Next:

How to create RAC database using dbca: Easy step-by-step guide
How to create RAC database using dbca: Easy step-by-step guide

15. Now check the Fixable column if anything can be fixed(Fixable=yes) then click on Fix & Check Again. In my case, there is nothing that can be fixed. The next step is to Click on Ignore All and proceed:

How to create RAC database using dbca: Easy step-by-step guide

16. Ignore the warning message and click on Yes:

How to create RAC database using dbca: Easy step-by-step guide

17. Check the summary and click on Finish to create RAC database using dbca:

How to create RAC database using dbca: Easy step-by-step guide
How to create RAC database using dbca: Easy step-by-step guide

18. Congratulations! You have successfully created the RAC database using dbca. Click on Close to exit.

How to create RAC database using dbca: Easy step-by-step guide

19. Set ORACLE_HOME and GRID_HOME in /etc/oratab file:

First find the ORACLE_HOME and GRID_HOME location:

[root@node1 ~]# sudo su - oracle
Last login: Sun Mar 31 10:07:36 IST 2024 on pts/0

[oracle@node1 ~]$ cat /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall

[oracle@node1 ~]$ cd /u01/app/oraInventory
[oracle@node1 oraInventory]$ ls -ltr
total 12
-rwxrwx--- 1 grid oinstall 1617 Mar 11 03:35 orainstRoot.sh
-rw-rw---- 1 grid oinstall   56 Mar 11 03:35 oraInst.loc
drwxrwx--- 4 grid oinstall 4096 Mar 11 15:25 logs
drwxrwx--- 4 grid oinstall   64 Mar 11 15:26 backup
drwxrwx--- 2 grid oinstall   81 Mar 11 15:26 ContentsXML

[oracle@node1 oraInventory]$ cd ContentsXML
[oracle@node1 ContentsXML]$ ls -ltr
total 16
-rw-rw---- 1 grid oinstall 561 Mar 11 15:26 inventory.xml
-rw-rw---- 1 grid oinstall 174 Mar 11 15:26 oui-patch.xml
-rw-rw---- 1 grid oinstall 300 Mar 11 15:30 comps.xml
-rw-rw---- 1 grid oinstall 292 Mar 11 15:30 libs.xml

[oracle@node1 ContentsXML]$ cat inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2024, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>12.2.0.7.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraGI19Home1" LOC="/u01/app/19.3.0/grid" TYPE="O" IDX="1" CRS="true"/>
<HOME NAME="OraDB19Home1" LOC="/u01/app/oracle/product/19.3.0/dbhome_1" TYPE="O" IDX="2"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>

Now open /etc/oratab in vi editor and the ORACLE_HOME and GRID_HOME along with SID:

[oracle@node1 ~]$ ps -ef|grep pmon
grid      6011     1  0 11:33 ?        00:00:00 asm_pmon_+ASM1
oracle    7222     1  0 11:34 ?        00:00:00 ora_pmon_racdb1
oracle    8049  6923  0 11:34 pts/0    00:00:00 grep --color=auto pmon

[oracle@node1 ~]$ vi /etc/oratab
# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
+ASM1:/u01/app/19.3.0/grid:Y
racdb1:/u01/app/oracle/product/19.3.0/dbhome_1:Y

:wq!

20. Invoke oraenv and login to the database as sysdba. Now you do not have to provide the oracle home as we have already defined the same in oratab file:

[oracle@node1 ~]$ . oraenv
ORACLE_SID = [oracle] ? racdb1
The Oracle base has been set to /u01/app/oracle
[oracle@node1 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Apr 1 16:02:29 2024
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> select name,open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
RACDB     READ WRITE

Congratulations! RAC database creation using dbca is completed successfully.

This Post Has One Comment

Leave a Reply