1 - 2 minutes readDatabase Cloning to Same Host through RMAN

Reader Mode

Assumed Source database names:
Host: SUN1
Primary Database SID: PROD
Data file mount Point: /DB/PROD
Assuming Target Database:
 Host: SUN1
Primary Database SID: 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
Conn / as sysdba
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”;

Related Articles

Responses

Your email address will not be published. Required fields are marked *

Password Reset
Please enter your e-mail address. You will receive a new password via e-mail.