Tuesday, December 15, 2009

RMAN cloning using duplicate command

1) Make a copy of the following TARGET directories under
DB Tier:
Archive log backup
Control file backuup
Database full backup
Apps Tier:Apps tech


2) Configure the Oracle Home
Target – Apps/DB

Overwrite the dbs, appsutil, network/admin directories with the previously copied directories.
Rename the $ORACLE_HOME/admin/ PROD_perp to DBA_mperp.


3) Copy the Apps file system to target.
Target-Apps
This can be done along with copying the database Oracle Home files.

4) Edit the init_SID.ora
Add a parameter remote_login_passwordfile=EXCLUSIVE
Add following parameters:db_file_name_convert=('/u02/oracle/PROD/db/apps_st/data','/u02/oracle/DBA/db/apps_st/data') log_file_name_convert=('/u02/oracle/PROD/db/apps_st/data','/u02/oracle/DBA/db/apps_st/data')


5) Create the password file
Target –DB
orapwd file=orapwPROD password=oracle entries=3

6) Target –DB
cd $ORACLE_HOME/appsutil/clone/binperl adcfgclone.pl dbTechStack

7) Startup the target instance in NOMOUNT state.
Target –DB
Startup nomount.

8) Connect to source database in target machine
Source-DB
rman tee restore.log
CONNECT TARGET
rman/****@PROD;

9) Connect to RMAN in the target machine
Target-DB
CONNECT AUXILIARY /;

10) Run the duplicate command
Note: If we don’t use set until then we need to make sure PROD doesn’t generate any archive logs after the restore if it’s generated then it’ll look for it also which is not available with us.

Target-DB
run {
duplicate target database to “DBA”;
}


11) Update the libraries (for both)
Target-DB
cd $ORACLE_HOME/appsutil/install/Context_namesqlplus / as sysdba @adupdlib.sql so

12) Configure the database
Target-DB
cd ora_home/appsutil/clone/binperl adcfgclone.pl dbconfig

13) Once the db tiers are up, clone the apps tier
Target-Apps
cd common_top/clone/binperl adcfgclone appsTier

14) Remove the old $COMMON_TOP/admin/log and out directories to clear out space.
Truncate fnd_concurrent_requests tables

Target-Apps

1 comment:

Unknown said...

thanks. I know another way of download utillity sql 2005 database repair. maybe you will be interested