Skip to content
August 28, 2014 / doganay

PREPARE STANDBY DATABASE ON THE SAME HOST

$ export ORACLE_SID=NEWDB
$ rman target /

RMAN> restore controlfile from '/u02/oradata/OLDDB/control01.ctl'

SQL> create spfile from pfile;

SQL> alter system set control_files='/u02/oradata/NEWDB/control01.ctl','/u02/oradata/NEWDB/control01.ctl' scope=spfile;
SQL> startup force mount

$ rman target sys/XXXXXXXXX@OLDDB auxiliary sys/XXXXXXXXX@NEWDB

RMAN>
run {
allocate channel prmy1 type disk;
allocate auxiliary channel stby1 type disk;
duplicate target database for standby from active database NOFILENAMECHECK;
release channel prmy1;
}

$ export ORACLE_SID=OLDDB
alter system set log_archive_dest_1='location=/u02/arch' scope=spfile;
alter system set log_archive_dest_2='SERVICE=STD_DBAT112 ASYNC REOPEN=300' scope=spfile;
Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: