Home > Oracle > Duplicating a database on same host using rman

Duplicating a database on same host using rman

Back up the target database as follows:
RMAN> connect target /
RMAN> backup database plus archivelog;

Make sure the backup is not a copy as you cant create a duplicate database using a backup copy

Create the init.ora file for the new duplicate database, test1. During the database
duplication process, RMAN will create the control files, the data files, and the redo log
files for the duplicate database with the filename structure you provide through the
db_file_name_convert and log_file_name_convert initialization parameters

db_name = test1
db_block_size = 8192
compatible =
remote_login_passwordfile = exclusive
control_files = (‘+DATA’,’+FLASH’)
db_file_name_convert = (‘+DATA/TESTORAC’,’+DATA/TEST1′)
log_file_name_convert = (‘+DATA/TESTORAC’,’+DATA/TEST1′)

Start the new auxiliary database (duplicate database) instance

You must start the
new instance in nomount mode since you don’t have a control file for this new
database yet.
$ export ORACLE_SID=test1
$ sqlplus /nolog
SQL> connect / as sysdba
Connected to an idle instance
SQL> startup nomount pfile=/tmp/inittest1.ora

RMAN> connect auxiliary /

RMAN> connect target sys/<password>@testorac

RMAN> connect catalog rman/rman@catdb

RMAN> duplicate target database to test1

Thats all that is needed

Categories: Oracle
  1. mikey
    April 26, 2011 at 7:58 pm

    i suggest you figure it out for yourself, this is a personal website for my own refrence , and for experienced dba so i suggest keep your comments to yourself.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: