Assumed Source database names:
Primary Database SID: PROD
Data file mount Point: /DB/PROD
Primary Database SID: CLONE
Data file mount Point: /DB/CLONE
Data file mount Point: /DB/CLONE
Step 1 Take RMAN backup of Production backup
++++++++++++++ Backup Scripts+++++++++++++++++++
run
{
allocate channel d1 type disk MAXPIECESIZE 5G;
allocate channel d2 type disk MAXPIECESIZE 5G;
backup full tag full_db format '/export/home/oracle/db_%t_%s_p%p'(database);
backup format '/export/home/oracle/ctl_%U' current controlfile;
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
BACKUP format '/export/home/oracle/Arch_%U' (ARCHIVELOG ALL);
release channel d1;
release channel d2;
}
++++++++++++++End Backup Script+++++++++++++++++
Step 2 If your Primary database using Spfile , then create pfile.
SQL> create pfile from spfile.
Note: This will generate initPROD.ora file
Step3 Rename initPROD.ora to initCLONE.ora file and update bellow parameter:
DB_NAME=PROD to CLONE
CONTROL_FILES=’/DB/CLONE’
DB_FILE_NAME_CONVERT=(‘/DB/PROD/’,’/DB/CLONE/’)
LOG_FILE_NAME_CONVERT=(‘/DB/PROD/’,’/DB/CLONE/’)
Step4 Startup Clone Instance with Nomount option
Export ORACLE_SID=CLONE
Sqlplus /nolog
Startup nomount
Step5 invoke RMAN
$ rman target sys/anup123@prod auxiliary /
Step 4 Execute bellow mention command on RMAN prompt.
RMAN> duplicate target database to “CLONE”;
Post a Comment