0% found this document useful (0 votes)
13 views3 pages

How To Create A RAC Database

Uploaded by

Antonio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

How To Create A RAC Database

Uploaded by

Antonio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

3/12/24, 10:32 Document 856783.

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:

Oracle Database Exadata Cloud Machine - Version N/A and later


Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Cloud Schema Service - Version N/A and later
Information in this document applies to any platform.
Information in this document applies to any platform.

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

4. add an entry manually in the /etc/oratab on each node, e.g.

ORCL:/oracle/product/10.2.0/db:N

5. Create the database configuration in the clusterware, via srvctl commands

srvctl add database -d RACDB -o /oracle/product/10.2.0/db -p


<spfile_defined_in_$ORACLE_HOME/dbs/init<instance_name>.ora>
srvctl add instance -d RACDB -i RACDB1 -n hostname1
srvctl add instance -d RACDB -i RACDB2 -n hostname2
srvctl add instance -d RACDB -i RACDB3 -n hostname3

6. Check the init.ora parameters on the first instance, i.e.

dump the spfile via:


export ORACLE_SID=RACDB1
sqlplus /nolog
connect / as sysdba
create pfile=/tmp/init.ora from spfile;
exit

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.

6. Restart the database via srvctl and check its status

srvctl stop database -d RACDB


srvctl start database -d RACDB

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

Didn't find what you are looking for?

https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=82si7qkf2_248&id=856783.1 3/3

You might also like