TEST
Powered by Blogger.
Responsive Ad
Responsive Ad

Author Profile

About Me

Start Sharing

Start Sharing

Drive Traffic on Social Platforms

Blog Archive

Blog Journey

Blog Journey

Learn how to start a perfect Blog

Work Smart, Not Hard - Let's See

Make your Blogging experience faster and easiest …
Work Smart, Not Hard - Let's See
Design by - Blogger Templates | Distributed by Free Blogger Templates

Made with Love by

Material UI Template is Designed Theme for Giving Enhanced look Various Features are available Whic…

Random Posts

Ads Section

HOME > > Database Cloning to Same Host through RMAN

Database Cloning to Same Host through RMAN

Anup - Tuesday, 24 May 2011

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”;

Contact me

Get in Touch

Need to get touch with me? Please fill out the form with your enquiry.

Name
Anup Srivastav
Address
Lucknow - Utter Pradesh
Email
myindiandba@gmail.com
Message me