Deploying Oracle RAC Clones to Nodes in a Cluster
Learn about deploying Oracle RAC clones from one node to other nodes in a cluster.
After you complete the prerequisite tasks described in "Preparing to Clone Oracle RAC", you can deploy cloned Oracle homes.
Perform any Oracle RAC preinstallation tasks, as described in your platform-specific Oracle RAC installation guide, to prepare the new cluster nodes, such things as:
- Specify the kernel parameters.
- Ensure Oracle Clusterware is active.
- Ensure that Oracle ASM is active and that at least one Oracle ASM disk group exists and is mounted.
Deploy the Oracle RAC database software, as follows:
- Copy the clone of the Oracle home to all nodes. For example:
[root@node1 root]# mkdir -p /u01/app/oracle/product/23.0.0/db [root@node1 root]# cd /u01/app/oracle/product/23.0.0/db [root@node1 db]# tar -zxvf /path_name/db2300.tgzWhen providing the home location and
path_name, the home location can be in the same directory path or in a different directory path from the source home that you used to create the tar. - If either the
oracleuser or theoinstallgroup, or both is different between the source and destination nodes, then change the ownership of the Oracle Inventory files, as follows:[root@node1]# chown -R oracle:oinstall /u01/app/oracle/product/23.0.0/dbWhen you run the preceding command on the Oracle RAC home, it clears
setuidandsetgidinformation from the Oracle binary.Note:
You can perform this step at the same time you perform Step 5 and Step 6 to run the
clone.pland$ORACLE_HOME/root.shscripts on each cluster node.
- Copy the clone of the Oracle home to all nodes. For example:
- Change the directory to the unzipped Oracle home directory, and remove all the
.ora(*.ora) files present in the unzipped$ORACLE_HOME/network/admindirectory. Delete unnecessary files from the unzipped Oracle home directory.
The unzipped Oracle home directory contains files that are relevant only to the source Oracle home. The following example shows how to remove these unnecessary files from the unzipped Oracle home directory:
Remove the
.orafiles from thenetwork/admindirectory, and remove the old database entries from thedbsdirectory.# cd $ORACLE_HOME # rm -rf network/admin/*.ora # rm dbs/old_database_entriesUse any of the following methods to perform the main Oracle RAC cloning tasks:
Perform a software-only Oracle RAC installation on each cluster node to register the Oracle RAC Database.
From this new destination Oracle home directory, run the
runInstallercommand to start the Oracle AI Database Setup Wizard and register Oracle RAC Database.$ cd /u01/app/oracle/product/23.0.0/db $ ./runInstaller- In the Select Configuration Option screen, select Set Up Software Only to perform a software-only Oracle RAC installation.
- Select your installation type and respond to the configuration prompts as needed.
Run the
clone.plscript on each node:- Supply the environment variables and cloning parameters in the
start.shscript, as described in Table: Environment Variables Passed to the clone.pl Script and Table: Cloning Parameters Passed to the clone.pl Script.. Because theclone.plscript is sensitive to the parameters being passed to it, you must be accurate in your use of brackets, single quotation marks, and double quotation marks. - Run the script as
oracleor the user that owns the Oracle RAC software.
The following table lists and describes the
clone.plscript parameters:Table: clone.pl Script Parameters
Parameter Description ORACLE_HOME= Oracle_homeThe complete path to the Oracle home you want to clone. If you specify an invalid path, then the script exits. This parameter is required.
ORACLE_BASE= ORACLE_BASEThe complete path to the Oracle base you want to clone. If you specify an invalid path, then the script exits. This parameter is required.
ORACLE_HOME_NAME= Oracle_home_name | -defaultHomeNameThe Oracle home name of the home you want to clone. Optionally, you can specify the
-defaultHomeNameflag. This parameter is optional.ORACLE_HOME_USER= Oracle_home_userThe OracleHomeUser for Windows services. This parameter is applicable to Windows only and is optional.
OSDBA_GROUP= group_nameSpecify the operating system group you want to use as the OSDBA privileged group. This parameter is optional.
OSOPER_GROUP= group_nameSpecify the operating system group you want to use as the OSOPER privileged group. This parameter is optional.
OSRACDBA_GROUP= group_nameSpecify the operating system group you want to use as the OSRACDBA privileged group. This parameter is optional.
OSASM_GROUP= group_nameSpecify the operating system group you want to use as the OSASM privileged group. This parameter is optional.
OSBACKUPDBA_GROUP= group_nameSpecify the operating system group you want to use as the OSBACKUPDBA privileged group. This parameter is optional.
OSDGDBA_GROUP= group_nameSpecify the operating system group you want to use as the OSDGDBA privileged group. This parameter is optional.
OSKMDBA_GROUP= group_nameSpecify the operating system group you want to use as the OSKMDBA privileged group. This parameter is optional.
-debugSpecify this option to run the
clone.plscript in debug mode-helpSpecify this option to obtain help for the
clone.plscript.The following example shows an excerpt from the
start.shscript that calls theclone.plscript:ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle/product/23.0.0/db cd $ORACLE_HOME/clone THISNODE='host_name' E01=ORACLE_HOME=/u01/app/oracle/product/23.0.0/db E02=ORACLE_HOME_NAME=OraDBRAC E03=ORACLE_BASE=/u01/app/oracle C01="-O CLUSTER_NODES={node1,node2}" C02="-O LOCAL_NODE=$THISNODE" perl $ORACLE_HOME/clone/bin/clone.pl $E01 $E02 $E03 $C01 $C02The following table lists and describes the environment variables E01, E02, and E03 that are shown in bold typeface in the preceding example:
[]()
Table: Environment Variables Passed to the clone.pl Script
Symbol Variable Description E01
ORACLE_HOMEThe location of the Oracle RAC database home. This directory location must exist and must be owned by the Oracle operating system group:
oinstall.E02
ORACLE_HOME_NAMEThe name of the Oracle home for the Oracle RAC database. This is stored in the Oracle Inventory.
E03
ORACLE_BASEThe location of the Oracle Base directory.
The following table lists and describes the cloning parameters C01 and C02, that are shown in bold typeface in the preceding example:
[]()
Table: Cloning Parameters Passed to the clone.pl Script.
Variable Name Parameter Description C01
Cluster Nodes
CLUSTER_NODESLists the nodes in the cluster.
C02
Local Node
LOCAL_NODEThe name of the local node.
The following example shows an excerpt from the
start.batscript that the user must create that calls theclone.plscript:set ORACLE_home=C:\oracle\product\23.0.0\db1 cd %ORACLE_home%\clone\bin set THISNODE=%hostname% set E01=ORACLE_HOME=%ORACLE_home% set E02=ORACLE_HOME_NAME=OraDBRAC set E03=ORACLE_BASE=Oracle_Base set C01="CLUSTER_NODES={node1,node2}" set C02="-O LOCAL_NODE=%THISNODE%" perl clone.pl %E01% %E02% %E03% %C01% %C02%- Supply the environment variables and cloning parameters in the
- Run the
$ORACLE_HOME/root.shas therootoperating system user as soon as the cloning procedure completes on the node.Note:
This step applies to Linux and UNIX installations, only.
[root@node1 root]# /u01/app/oracle/product/23.0.0/db/root.sh -silentNote that you can run the script on each node simultaneously:
[root@node2 root]# /u01/app/oracle/product/23.0.0/db/root.sh -silentEnsure the script has completed on each node before proceeding to the next step.
This step shows how to run Oracle DBCA in silent mode and provide response file input to create the Oracle RAC instances.
Note:
You need only run Oracle DBCA on one node in the cluster to create Oracle RAC instances on all nodes.
The following example creates an Oracle RAC database named ERI on each node with
AUTOMATICmanagement policy, creates database instances on each node, registers the instances in OCR, and creates the database files in the Oracle ASM disk group calledDATA. It also configures Oracle Machine Learning for Python in the database and sets theSYSandSYSTEMpasswords to password, which is the password for each account:[oracle@node1 oracle]$ export ORACLE_HOME=/u01/app/oracle/product/23.0.0/db [oracle@node1 oracle]$ cd $ORACLE_HOME/bin/ [oracle@node1 bin]$./dbca -silent -createDatabase -templateName "General_Purpose.dbc" \ -gdbName gdb_name -sid SID_prefix \ -storageType ASM -diskGroupName DATA -nodelist node1,node2 -characterset WE8MSWIN1252 \ -recoveryAreaDestination RECO -databaseType "MULTIPURPOSE" \ -createAsContainerDatabase true -numberofPDBs 2 -pdbName rracwpdb
Related Topics
See also
Oracle Multitenant Administrator's Guide for a complete description of Oracle DBCA commands and options.