How To Create A RAC Database
How To Create A RAC Database
1
Copy right (c) 2024, Oracle. A ll rights reserv ed. Oracle Confidential.
How to Create a RAC Database Using DBCA Generated Scripts From Templates (Doc ID
856783.1)
In this Document
Goal
Solution
References
APPLIES TO:
GOAL
This note explains how to create a RAC database using DBCA when choosing to run the scripts created by it and when
using user or Oracle templates for the database layout. The purpose of this paper is to achieve that a database created via
the scripts generated by DBCA for templated databases looks the same as when the database would have been created via
DBCA during the DBCA session itself.
SOLUTION
1. Run DBCA and choose an Oracle database templates or a user created templates as base for the database creation.
Use the first node, i.e. the node where the instance will be started with thread=1, to run DBCA and generate the scripts.
The scripts generated will require thread=1 to be created first. bug:8671338 investigate further whether this constraint can
be lifted in the future.
2. At the end of the DBCA session, you can choose to generate database creation scripts instead of creating the database
directly in screen 'Database Configuration Assistent, Step 15 of 15: Creation Objects'. Unselect the 'Create Database' button
and select the 'Generate Database Creation Scripts'.
Set the scripts 'destination directory' to a non-shared location so that scripts are generated to configure a RAC database on
each node.
3. Run the script first on the node where DBCA has been run. The first script to run will create and define the database on
that node. The instance will be started there, too. Then run the scripts on the other nodes to define the created database
on the other nodes. The instances will not be autostarted on the other nodes.
In case the DBCA session could not be run on the first node (e.g. no space for the user template on node1), then the
generated scripts need to be amended to force the database creation to start with thread=1 on that node, i.e.
In that last case, edit the generated init<dbname>Temp0MF.ora file on the node where the first script will be run and
change, e.g. in case dbca was run on node2 that will have instance RACDB2 running, instead ofRACDB1 on node1
RACDB1.instance_number=1
RACDB2.instance_number=2
RACDB3.instance_number=3
RACDB2.thread=1
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=82si7qkf2_248&id=856783.1 1/3
3/12/24, 10:32 Document 856783.1
RACDB3.thread=2
RACDB1.thread=3
to
RACDB1.instance_number=2
RACDB2.instance_number=1
RACDB3.instance_number=3
RACDB1.thread=2
RACDB2.thread=1
RACDB3.thread=3
ORCL:/oracle/product/10.2.0/db:N
and check in /tmp/init.ora, the main rac parameters are set correctly, e.g. on a three instance RAC RACDB database
*.cluster_database=true
*.cluster_database_instances=2
*.RACDB1.instance_number=1
*.RACDB2.instance_number=2
*.RACDB3.instance_number=3
*.RACDB1.thread=1
*.RACDB2.thread=2
*.RACDB3.thread=3
*.RACDB1.undo_tablespace='UNDOTBS1'
*.RACDB2.undo_tablespace='UNDOTBS2'
*.RACDB.undo_tablespace='UNDOTBS3'
Eventually correct them via an 'alter system set <parameter> = <newvalue> scope=spfile;' on the running instance on
node1.
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=82si7qkf2_248&id=856783.1 2/3
3/12/24, 10:32 Document 856783.1
srvctl status database -d RACDB
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=82si7qkf2_248&id=856783.1 3/3