Wednesday, July 04, 2012

Using Rman Active Duplicate to create a Standby from a standby

There comes a time when you need to find ways to get something done in an innovative manner with as little interruption to the primary as possible. This was the case that i was working on to rehost a database where i had network issues and a standby database available. In comes Rman Active Duplicate.
Rman active duplicate was available in  11.1 and can be used to duplicate a database as well as create a standby . The real kicker was apparently due to BUG 11715084 you will hit an error like below.


 
channel ORA_AUX_DISK_1: SID=135 device type=DISK
RMAN-571: ===========================================================
RMAN-569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-571: ===========================================================
RMAN-3002: failure of Duplicate Db command at 02/02/2011 13:28:25
RMAN-5531: a mounted database cannot be duplicated while datafiles are fuzzy

The patch for this bug is available for 11.1.0.7 & 11.2.0.2 . But i had to get  a backport to 11.1.0.7.10 for AIX. After the patch is installed it is simple to run rman active duplicate.
A sample script is below

 connect target  abc/abc@olddb

connect auxiliary sys/abc@newddb

run {

allocate channel prmy1 type disk;

allocate channel prmy2 type disk;

allocate auxiliary channel stby type disk;

allocate auxiliary channel stby2 type disk;

duplicate target database for standby from active database

spfile

   set db_unique_name='newdb'

   set log_archive_max_processes='25'

  set fal_client='newdb'

  set control_files='+DATA01/control01.ctl'

  set LOG_FILE_NAME_CONVERT='+DATA01','+DATA01'

  set fal_server='olddb'

  set standby_file_management='AUTO'

  set log_archive_config='dg_config=(olddb,newddb)'

  set log_archive_dest_1='service=olddb ASYNC valid_for=(ONLINE_LOGFILE,PRIM

ARY_ROLE) db_unique_name=olddb'

;

}




This allows for standby creation from a standby without impacting the primary.





Google Search

Powered By Blogger