1. Extract tech_st
tar -xvf db_tech_st.tar2. Run postclone
perl adcfgclone.pl dbTechStack3. Shutdown the Database
SQL> shutdown immediate;4. modified init.<SID>.ora file same as prod
5. Startup in no mount state
SQL> startup nomount pfile='init.<SID>.ora';6. Connect through target DB and restore controlfile from backup
rman> restore controlfile from '/ebiz1/prodback/CONT_pnm_1';7. Mount the DB
SQL> alter database mount;8. Catalog the backup pieces
rman> catalog backuppiece '/ebiz1/prodback/DATA_ppja4_10_1'; OR rman> CATALOG START WITH '/ebiz1/prodback';9. Crosscheck backup (Sync physical backup with RMAN repository
rman> CROSSCHECK BACKUP;10. Restore Database
run{ set newname for datafile '/PRODB01/oraprod/db/apps_st/data/a_ref02.dbf' to '/ebiz2/DEVINST/db/apps_st/data/a_ref02.dbf'; restore database; }To get the script, use below query
SQL> select 'set newname for datafile '|| file# ||' to '''||name||''''||';' from v$datafile;11. Crosscheck the Archivelogs
rman> crosscheck archivelog all;12. Restore Archivelogs
rman> restore archivelog from sequence <Sequence_no>Use below to find sequence no
rman>list backup of archivelog all;13. Get the control file to a trace
SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE as '/tmp/cf_new.trc';14. Open created trace file,edit as follows and save as .sql.
=>remove the content in the file upto STARTUP NOMOUNT =>instead of having 'REUSE' make it 'SET' =>Change the name of the DB =>replace 'NORESETLOGS' with 'RESETLOGS' =>remove 'FORCE LOGGING' =>replace 'ARCHIVELOG' with 'NOARCHIVELOG' =>remove the cotent after the 'CHARACTER SET 'US7ASCII' =>change the datafile paths to the new15. Shutdown the DB
SQL> Shutdown immediate16. Rename existing controlfile
17. Modified init.<SID>.ora (same as target DB)
18. Execute modified trace file
sql>@<sql_file>19. Recover Database
SQL> recover database using backup controlfile until cancel;20. Open the DB with resetlogs option
SQL> alter database open resetlogs;21. Add temp file
SQL> alter tablespace temp1 add tempfile '/velocity/VLODAIL/db/apps_st/data/temp01.dbf' SIZE 2000M autoextend on next 256M maxsize 10240M;22. Run post clone for DB tier with already created context file
perl adcfgclone.pl dbconfig /ebiz1/PROINT/db/tech_st/11.1.0/appsutil/PROINT_ct-eagorasvr5.xml23. Then Finally run postclone for Apps Tier
perl adcfgclone.pl appsTier
No comments:
Post a Comment