Recently, I’ve been trying to clone an oracle database installation home from production (3-node RAC) to a test environment (single-node). I’ve faced some troubles until I got it running successfully at the end.
Below are the steps that I followed (used 10.2.0.4 on solaris 10 SPARC 64-bit):
1- copy the database installation home from production to test environment.
(I used tar & gzip)
2- cleanup unnecessary files (e.g. init.ora files, network files, …)
3- relink oracle without RAC support.
$ cd $ORACLE_HOME/rdbms/lib $ make -f ins_rdbms.mk rac_off $ make -f ins_rdbms.mk ioracle
4- clone the copied oracle home to fix it’s local inventory, and attach to central inventory
$ cd $ORACLE_HOME/clone/bin $ perl clone.pl ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME=OraDb10g_home1
(will be prompted to run root scripts)
after this step, both central and local inventories have reference to names of RAC nodes from production.
(many other files in the local inventory also have reference to RAC nodes from production)
5- deattach from central inventory to remove references to RAC nodes in both central and local inventories
$ cd $ORACLE_HOME/oui/bin $ ./runInstaller.sh -detachHome ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME="OraDb10g_home1"
6- attach the home again to fix the central inventory
$ cd $ORACLE_HOME/oui/bin $ ./runInstaller.sh -attachHome ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME="OraDb10g_home1"
it should work fine now.