Wednesday, July 18, 2018

Oracle EBS Database clone using RMAN

Steps

1. Copy database oracle home to target database server

2. Create Context file and relink Oracle Home using
perl adcfgclone.pl dbTechStack

3. set env
. $ORACLE_HOME/_.env

4.add source tns entry into target's tnsnames.ora
  cd $TNS_ADMIN
vi tnsnames.ora, add, test using sqlplus

5. make sure all the directories exist as in init.ora

6. Use DB_FILE_NAME_CONVERT, LOG_FILE_NAME_CONVERT, EVENT  in init.ora so RMAN can place the files in the correct location in target server.
        For example add these two entries in init.ora, and start the database in nomount
db_file_name_convert=('+DATAC1/SRC/DATAFILE/','/d01/oracle/TGT/data/', '+DATAC1/SRC/TEMPFILE','/d01/oracle/TGT/data/')
log_file_name_convert=('+DATAC1/SRC/ONLINELOG/','/d01/oracle/TGT/data/')

7. Make sure tnsnames.ora has the entries of Target database & Source Database

8. Startup the instance (to be cloned) in nomount
start database nomount

9. Connect to the source and target databases using this command
rman target sys/password@SRC auxiliary / nocatalog

10. Create the duplicate database using this command
run {
allocate auxiliary channel ch1 type disk;
allocate auxiliary channel ch2 type disk;
duplicate target database to TGT;}


11. Make sure temporary data file exists, If not add the datafile using below command
ALTER TABLESPACE TEMP ADD TEMPFILE '/d01/oracle/TGT/data/temp01.dbf' SIZE 2000M; 

12. Remove the parameters added to init.ora file. Change the database to no archive log mode

13. Run autoconfig on database tier
cd $ORACLE_HOME/appsutil/scripts/_
    adautocfg.sh

14. Clean the Node Names
EXEC FND_CONC_CLONE.SETUP_CLEAN;
      COMMIT;

15. shutdown/start by using addbctl.sh/addlnctl.sh

No comments: