Tuesday, November 12, 2013

Cloning Steps

It explains cloning of Oracle Applications 11i and R12 from RAC to NON RAC (Single Node) Instance with 11g database. In the following note, I used the terms Target server is “UAT” which we are going to do clone of the server. And the source system is “PROD” which is using currently.


The cloning steps of RAC to Non RAC Instance in Oracle Applications 11i and R12 with 11g Database.
Source Server: PROD
Target Server: UAT

Step 1: Run the adpreclone.pl on Database Tier and Application Tier on Primary nodes.
  • perl adpreclone dbTier
  • perl adpreclone appsTier      

Step 2: Make a tar ORACLE_HOME location and copied to the Target server.
Step 3: Take a RMAN Full Database Backup and copied to the Target Server.
Step 4: Provide necessary permissions to the Target Server user for accessing directories.
Step 5: Set the Environment settings of as per the Target source
  • vi /home/oracle/uat.env
export ORACLE_HOME=/oraprod1/uat11g/
export ORACLE_SID=UAT #--(NEW SID )   
export PATH=$ORACLE_HOME/bin:$PATH 
export TNS_ADMIN=/oraprod1/UAT11g/network/admin/UAT_sun1 
export LD_LIBRARY_PATH=$ORACLE_HOME/lib


Step 6: Create an Oracle Password File for the Auxiliary Instance

orapwd file=orapw$ORACLE_SID entries=5
password=welcome123 force=y


Step 7: Copy the initialization parameter file to the new name

cp initPROD1.ora initUAT.ora

Step 8: Open new initUAT.ora file and modify the required changes as per new current environment.

      vi initUAT.ora
UAT.__db_cache_size=956301312
UAT.__java_pool_size=50331648
UAT.__large_pool_size=16777216
UAT.__pga_aggregate_target=1073741824
UAT.__sga_target=2147483648
UAT.__shared_io_pool_size=0
UAT.__shared_pool_size=1073741824
UAT.__streams_pool_size=16777216
*.db_name='UAT'
*.diagnostic_dest='/oradata1/UAT11g/data'
*.control_files='/oradata1/UAT11g/data/cntrl01.dbf',
'/oradata1/UAT11g/data/cntrl02.dbf',
'/oradata1/UAT11g/data/cntrl03.dbf'
*.DB_CREATE_FILE_DEST ='/oradata1/UAT11g/data/'
*.db_file_name_convert=('/oradata1/proddata/PROD/',
'/oradata1/UAT11g/data/','/oradata4/proddata/PROD/','/oradata1/UAT11g/data/')
*.log_file_name_convert=('/oradata1/proddata/PROD/','/oradata1/UAT11g/data/',
'/oradata4/proddata/PROD/','/oradata1/UAT11g/data/')
*.db_recovery_file_dest='/oradata2/UAT11g/UATarch'
*.db_recovery_file_dest_size=129496729600
*.utl_file_dir='/usr/tmp','/oradata1/UAT11g/utl'
*.compatible='11.2.0'
*.remote_login_passwordfile='EXCLUSIVE'
wq!



Step 9: Review required changes in oraInst.loc and modify it.

$ cat "oraInst.loc"
#Oracle Installer Location File Location
#Mon Sep 13 15:55:47 GMT+01:00 2010
inst_group=dba
inventory_loc=/oraprod1/UAT11g/oraInventory

Step 10: Start-up database no mount stage in the auxiliary instance on target node.In this case database will be start in  no mount stage.

sqlplus sys/welcome123 as sysdba
startup nomount pfile=/oraprod1/UAT11g/dbs/initUAT.ora


Step 11: Connect to RMAN as auxiliary database and run the following query from target node. This command will rebuild the database.


$rman auxiliary /
RMAN>duplicate database to "UAT" backup location
'/oradata2/UAT11g' nofilenamecheck;
Step 12:
 Check the status of the new target database after completing the rebuilding database.
SQL> select instance_name,status from v$instance;
INSTANCE_NAME    STATUS
---------------- ------------
UAT             OPEN
SQL>

Step 13: Run the adcfgclone.pl dbTechStack on dbTier and respond prompts as per your environment.

UAT:oracle$perl adcfgclone.pl dbTechStack
Enter the APPS password [APPS]:

Step 14: Connect to sqlplus and run the following sqlplus script for building libraries:
$sqlplus "/ as sysdba" @adupdlib.sql [libext]
$sqlplus "/ as sysdba" @adupdlib.sql 'sl'        ##For exapmple -HP-UX
Where [libext] should be set to ‘sl’ for HP-UX, ‘so’ for any other UNIX platform, or ‘dll’ for Windows.
Step 15: Run the dbconfig on Database Tier and respond the prompts.
$ cd [RDBMS ORACLE_HOME]/appsutil/clone/bin
$ perl adcfgclone.pl dbconfig [Database target context file]
$UAT:oracle$perl adcfgclone.pl dbconfig /oraprod1/UAT11g/appsutil/UAT_sun1.xml
Enter the APPS password [APPS]:
Step 16: Clean the concurrent tables by using the following command after finished the cloning process.
SQL>EXEC FND_CONC_CLONE.SETUP_CLEAN;
SQL>COMMIT;
The database cloning process is completed on single node. Now we start the Application cloning process

Step 17: Copy all the Application file system from source to target as application user

Step 18: Provide required permissions to the apps user for accessing directories and files.

Step 19: Run adpreclone on AppsTier and resond the prompts. This process make new apps clone system.
Go to $COMMON_TOP/clone/bin
perl adcfgclone.pl appsTier
Step 20: Connect to Oracle sql plus and run it @afdcm037.sql as Apps User.This PL/SQL script to create libraries for FNDSM and FNDSVC and create Managers for Pre-existing Nodes. Future nodes will be handled by db trigger.
cd to $FND_TOP/patch/115/sql
SQL>@afdcm037.sql
Step 21: Your clone system is finished. Now you can check the application services and can connect to application URL.






No comments:

Post a Comment