Clone from RAC E-Business Suite to Single instance
                                                 Last update (2010-07-05 22:39:51)
                                                                                                                   Date added (2008-06-25 10:19:16)

                                                                                 Posted by: Eleutherios Tsekouras
Here is an example how to create a single instance E-Business Suite clone from an E-Business Suite with RAC database. There are some little steps that might have some problems. Here is the complete guide.

Pre-cloning steps
1. Check perl, zip, unzip exist in the $PATH.
2.	Log:
a.	APPS password
b.	SYSTEM password
c.	SYS password
f.	8.0.6 $ORACLE_HOME
i.	the exact paths where datafiles are placed (DATA_TOPs)
3.	cd RDBMS $ORACLE_HOME/appsutil/scripts/
4.	perl dbTier
5.	cd $COMMON_TOP/admin/scripts/
6.	perl appsTier
Cloning steps
Check the note below about changing the “s_dbfiles” in some XML files, before running the script.
1.	cd /appsutil/clone/bin
2.	perl dbTier
3.	Parameters asked:
Do you want to use a virtual hostname for the target node (y/n) [n] ? n
Target instance is a Real Application Cluster (RAC) instance (y/n) [n] n
Target System database name [MIGDB]  MIGDB
Target system domain name []
Target system RDBMS ORACLE_HOME directory [/oracle/product/9.2]  /orabin/product/9.2
Target system utl_file accessible directories list [/oracle/product/9.2/appsutil/temp] 
/appsutil/temp /orabin/product/9.2/appsutil/temp
Number of DATA_TOP's on the target system [24] 24 
Tip:If the number of DATA_TOPs shown is not the same as the number counted at 2i step, there is a problem.
Check $ORACLE_HOME/appsutil/clone/data/stage/addbhomsrc.xml for the DATA_TOPs discovered and stored by the pre-cloning step
Target system DATA_TOP 1 [/oracle22/oradata]  /oracle22/oradata
Target system DATA_TOP 2 [/oracle1/oradata]  /oracle1/oradata
Target system DATA_TOP 24 [/oracle20/oradata]  /oracle20/oradata
Do you want to preserve the Display set to ecdev:16.0 (y/n) [y] ? n
Target system Display [gnvdev:0.0]
Do you want to preserve the port values from the source system on the target system (y/n) [y] ? n
Started testing the availability of ports in port pool 20
Database Port available:  Port Value = 1541
Tip: This relink should be performed when cloning a RAC db (such as the production) to a nonRAC db. If you get an error during $ORACLE_HOME relinking such as:
ld: Can't find library or mismatched ABI for -lodm9 do the following:
cd RDBMS $ORACLE_HOME/lib   (database)
ls -la libod*
ln -s ./
ls -la libod*
Finally, make sure that has the execute right.
-rwxr-xr-x   1 orasit     dba           6144 May 14  2006
chmod 755
Tip: Always check the following XML files and set the parameter equal to the production db parameter ¡db_files¢ 
(currently 1200) before starting the perl script.
If you get an error similar to:
ORA-01166: file number 568 is larger than MAXDATAFILES (500)
cd /appsutil/clone/context/db
vi CTXORIG.xml
Find “s_dbfiles” parameter and change it from 500 to 1000
Do the same in the .xml

If you get Creation of Control File failed:
cd  /appsutil/install/
sqlplus ¡/ as sysdba¢ @adupdlib.sql sl
cd /appsutil/clon/bin
perl dbconfig 
where target context file=/appsutil/.xml