Duplicate the database from Rman Backup Location
1 - Start the database in nomount using temporary pfile
sqlplus / as sysdba
startup nomount pfile='temp.ora'
exit
Content of temp.ora
db_name = ERDBA
compatible = 12.1.0
control_files = /erp_data/oradata/cntrl01.dbf,/erp_data/oradata/cntrl02.dbf,/erp_data/oradata/cntrl03.dbf
*.db_create_file_dest='/erp_data/oradata'
*.DB_CREATE_ONLINE_LOG_DEST_1='/erp_data/oradata'
*.DB_CREATE_ONLINE_LOG_DEST_2='/erp_data/oradata'
*.memory_target=10G
*.remote_login_passwordfile='exclusive'
DB_FILES=2000
Content of temp.ora
db_name = ERDBA
compatible = 12.1.0
control_files = /erp_data/oradata/cntrl01.dbf,/erp_data/oradata/cntrl02.dbf,/erp_data/oradata/cntrl03.dbf
*.db_create_file_dest='/erp_data/oradata'
*.DB_CREATE_ONLINE_LOG_DEST_1='/erp_data/oradata'
*.DB_CREATE_ONLINE_LOG_DEST_2='/erp_data/oradata'
*.memory_target=10G
*.remote_login_passwordfile='exclusive'
DB_FILES=2000
2- Run the duplicate.sh shell scripts in nohup mode
nohup duplicate.sh &
Shell scripts content for duplicate.sh
-----------------------------------------
vi duplicate.sh
----------------
rman log=duplicatedb.log << EOF
connect auxiliary /
run {
ALLOCATE AUXILIARY CHANNEL d1 DEVICE TYPE DISK;
ALLOCATE AUXILIARY CHANNEL d2 DEVICE TYPE DISK;
ALLOCATE AUXILIARY CHANNEL d3 DEVICE TYPE DISK;
ALLOCATE AUXILIARY CHANNEL d4 DEVICE TYPE DISK;
DUPLICATE DATABASE TO ERPDBA BACKUP LOCATION '/export/home/erp_bkp/oradata/ERPDBA/rman/bkp_sets/clone';
}
EOF
Tags:
Rman