Oracle 10g RAC Cloning (Real Application Cluster) - Best Practices
You are welcome to use AppsHosting documentation in your businesses and websites, but we would really appreciate it if you maintain the links to AppsHosting!
RAC to RAC E-Business Suite Database Cloning on Sun Solaris 10 with Veritas Cluster File System
Overview
This article will show users two different ways to clone a RAC (Real Application Cluster) database in Oracle E-Business Suite environment. The concepts presented here will also work for other non-apps Oracle databases also. Staged Oracle Home refers to a preconfigured and working Oracle Home where the RAC database will run from.
- Option 1: With Staged Oracle Home
- Option 2: Without Staged Oracle Home
1: RAC to RAC Clone with Staged Oracle Home
1. Make sure Oracle Home is staged and working.
2. Change ODM (Oracle Data Manager) library to non-RAC which resides in ORACLE_HOME/lib after Oracle installation.
libodm10.so -> libodmd10.so
3. Unset Oracle environment by logging out and back in.
4. Set Oracle HOME and SID for non-RAC.
. oraenv (may need to set LD_LIBRARY_PATH)
5. Start up nomount using the following init.ora:
db_name = MYRAC
db_block_size = 8192
compatible = 10.2.0
db_files=512
control_files = /oracle/app/ora06/myrac/cntrl01.dbf,/oracle/app/ora
08/myrac/cntrl02.dbf,/oracle/app/ora09/myrac/cntrl03.dbf
_no_recovery_through_resetlogs=TRUE
6. Perform RMAN restore and recovery.
7. Shut down the database.
8. Change ODM library to RAC. Should point to where Veritas software is installed.
9. Startup the primary RAC node sourcing RAC environment.
Add thread 2 and enable:
alter database add logfile thread 2
'/oracle/app/ora08/myrac1/log12a.dbf' size 100m;
alter database enable thread 2;
Add second undo tablespace, if not existing.
create undo tablespace apps_undots2 datafile
'/oracle/app/ora08/myrac/undo20.dbf' size 2000m extent
management local
10. Start the secondary RAC node after sourcing RAC environment.
2: RAC to RAC Clone without Staged Oracle Home
1. Change ODM library to non-RAC which resides in $ORACLE_HOME/lib after Oracle installation.
libodm10.so -> libodmd10.so.
2. Unset Oracle environment by logging out and back in.
3. Set Oracle HOME and SID for non-RAC SID.
. oraenv
4. Start up nomount using the following init.ora:
db_name = MYRAC
db_block_size = 8192
compatible = 10.2.0
db_files=512
control_files = /oracle/app/ora06/myrac/cntrl01.dbf,/oracle/app/ora
08/myrac/cntrl02.dbf,/oracle/app/ora09/myrac/cntrl03.dbf
_no_recovery_through_resetlogs=TRUE
5. Perform RMAN restore and recovery.
6. Shut down the database.
7. Update oraInst.loc and template to avoid below error during clone.
/var/opt/oracle/oraInst.loc
adlnkoh.sh:
# make -if $ORACLE_HOME/network/lib/ins_nau.mk ioklist >> $LOGF 2>
&1
if [ ! $? -eq 0 ]; then RESULT=1; printf "Failed...\n" >> $LOGF;
else printf "Completed...\n" >> $LOGF; fi
printf "\nStarting: \"make -if $ORACLE_HOME/network/lib/ins_nau.
mk iokinit\"\n" >> $LOGF 2>&1
# make -if $ORACLE_HOME/network/lib/ins_nau.mk iokinit >> $LOGF 2>
&1
if [ ! $? -eq 0 ]; then RESULT=1; printf "Failed...\n" >> $LOGF;
else printf "Completed...\n" >> $LOGF; fi
printf "\nStarting: \"make -if $ORACLE_HOME/network/lib/ins_nau.
mk iokdstry\"\n" >> $LOGF 2>&1
# make -if $ORACLE_HOME/network/lib/ins_nau.mk iokdstry >> $LOGF 2
>&1
StackTrace:
java.lang.Exception: java.lang.NullPointerException
at oracle.apps.ad.clone.ApplyDBTechStack.runRelinkOH(ApplyDBTechStack.java:847)
at oracle.apps.ad.clone.ApplyDBTechStack.<init>(ApplyDBTechStack.java:421)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at oracle.apps.ad.clone.util.CloneProcessor.run(CloneProcessor.java:68)
at java.lang.Thread.run(Unknown Source)
8. Clone first node.
perl adcfgclone.pl dbTechStack (use virtual host name if possible)
11. Change ODM library in ORACLE_HOME/lib to RAC. Should point to where Veritas software is installed.
12. Startup the primary RAC node sourcing RAC environment.
13. Clean up old node information by purging fnd_nodes table.
14. Clone secondary node.
perl adcfgclone.pl dbTechStack (use virtual host name if possible)
Correct tns port from default 1521.
Correct control file path.
Note: On earlier versions of Oracle, you may need to regenerate the Oracle binaries with RAC off option.
make -f ins_rdbms.mk rac_off ioracle
Please contact AppsHosting with any questions, comments, or suggestions; as we constantly strive for improvement in these areas. |