Using Data Domain Mtree replication for DD Boost and Oracle RMAN

In an earlier post, I looked at using RMAN managed replication to make two copies of an RMAN backupset to two separate Data Domains.

In the post Replicating an RMAN Backupset with Data Domain and DD Boost I then restored the database from the secondary copy to demonstrate that RMAN managed replication could be a useful tool for DBAs to protect against data center failures.

In this example however, I am going to use Data Domain’s native Mtree replication instead of RMAN’s managed replication.

In a previous post, Configuring DD Boost Replication for Oracle RMAN, we enabled DD Boost on the Data Domain and set up storage units that replicate automatically between sites. The storage units were named dd0205_boost and dd0204_boost.

The advantage of using Mtree replication over RMAN managed replication, is that it removes the requirement of the RMAN backup to make two copies. This allows the backup to complete faster since there is no longer any need to wait on write-acknowledgements from the second backup target.

In this example, we will make our RMAN backup to the rstdd0205mgmt.emc.com Data Domain, but restore the backup to a second server using the rstdd0204mgmt.emc.com Data Domain.

Our source database is called nyc11.

The RMAN backup script to make the backup is shown below:

configure controlfile autobackup on;
configure retention policy to recovery window of 3 days;
configure default device type to sbt;
configure backup optimization off;

configure channel device type sbt maxopenfiles 4 parms 'BLKSIZE=1048576,SBT_LIBRARY=/u01/app/oracle/product/11.2.0/dbhome_1/lib/libddobk.so,ENV=(STORAGE_UNIT=dd0205_boost,BACKUP_HOST=rstdd0205mgmt.emc.com,ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)';

configure device type sbt backup type to backupset parallelism 4;

run {

   sql 'alter system switch logfile';

   set controlfile autobackup format for device type sbt to "%d_%F.ctl";

   backup as backupset incremental level 0 filesperset 1 
    database tag 'FULL_BACKUP' format '%d_df_%U.bk' 
    keep until time 'sysdate+7' restore point 'FOR_CLONE_1';

}

In this example, RMAN is writing the backupset to the Data Domain using the DD Boost protocol, which moves part of the de-duplication and compression process from the Data Domain appliance to the database server.

The RMAN backup also creates a restore point, called FOR_CLONE_1.

Restore points were introduced to Oracle in version 10g, and allow the DBA to roll the database back to a specified point in time.

When used with RMAN, they allow the DBA to specify the restore point as the recovery point objective, rather than a sequence number of SCN. Another advantage of using restore points with RMAN, is that the backupset will automatically include any archivelogs needed to complete the restore process.

Executing the RMAN backup script yields the following output:

Starting backup at 12-AUG-15
current log archived

allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: SID=154 device type=SBT_TAPE
channel ORA_SBT_TAPE_1: Data Domain Boost API
allocated channel: ORA_SBT_TAPE_2
channel ORA_SBT_TAPE_2: SID=157 device type=SBT_TAPE
channel ORA_SBT_TAPE_2: Data Domain Boost API
allocated channel: ORA_SBT_TAPE_3
channel ORA_SBT_TAPE_3: SID=153 device type=SBT_TAPE
channel ORA_SBT_TAPE_3: Data Domain Boost API
allocated channel: ORA_SBT_TAPE_4
channel ORA_SBT_TAPE_4: SID=29 device type=SBT_TAPE
channel ORA_SBT_TAPE_4: Data Domain Boost API
backup will be obsolete on date 19-AUG-15
archived logs required to recover from this backup will be backed up
channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
input datafile file number=00007 name=+DATA/nyc11/datafile/soe.272.886021463
channel ORA_SBT_TAPE_1: starting piece 1 at 12-AUG-15
channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/nyc11/datafile/undotbs1.258.885932477
channel ORA_SBT_TAPE_2: starting piece 1 at 12-AUG-15
channel ORA_SBT_TAPE_3: starting incremental level 0 datafile backup set
channel ORA_SBT_TAPE_3: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/nyc11/datafile/system.256.885932475
channel ORA_SBT_TAPE_3: starting piece 1 at 12-AUG-15
channel ORA_SBT_TAPE_4: starting incremental level 0 datafile backup set
channel ORA_SBT_TAPE_4: specifying datafile(s) in backup set
input datafile file number=00002 name=+DATA/nyc11/datafile/sysaux.257.885932477
channel ORA_SBT_TAPE_4: starting piece 1 at 12-AUG-15
channel ORA_SBT_TAPE_3: finished piece 1 at 12-AUG-15
piece handle=NYC11_df_8sqecf5t_1_1.bk tag=FULL_BACKUP comment=API Version 2.0,MMS Version 1.1.1.3
channel ORA_SBT_TAPE_3: backup set complete, elapsed time: 00:00:07
channel ORA_SBT_TAPE_3: starting incremental level 0 datafile backup set
channel ORA_SBT_TAPE_3: specifying datafile(s) in backup set
input datafile file number=00005 name=+DATA/nyc11/datafile/example.265.885932543
channel ORA_SBT_TAPE_3: starting piece 1 at 12-AUG-15
channel ORA_SBT_TAPE_2: finished piece 1 at 12-AUG-15
piece handle=NYC11_df_8rqecf5t_1_1.bk tag=FULL_BACKUP comment=API Version 2.0,MMS Version 1.1.1.3
channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:10
channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
input datafile file number=00004 name=+DATA/nyc11/datafile/users.259.885932477
channel ORA_SBT_TAPE_2: starting piece 1 at 12-AUG-15
channel ORA_SBT_TAPE_3: finished piece 1 at 12-AUG-15
piece handle=NYC11_df_8uqecf64_1_1.bk tag=FULL_BACKUP comment=API Version 2.0,MMS Version 1.1.1.3
channel ORA_SBT_TAPE_3: backup set complete, elapsed time: 00:00:04
channel ORA_SBT_TAPE_4: finished piece 1 at 12-AUG-15
piece handle=NYC11_df_8tqecf5t_1_1.bk tag=FULL_BACKUP comment=API Version 2.0,MMS Version 1.1.1.3
channel ORA_SBT_TAPE_4: backup set complete, elapsed time: 00:00:11
channel ORA_SBT_TAPE_2: finished piece 1 at 12-AUG-15
piece handle=NYC11_df_8vqecf67_1_1.bk tag=FULL_BACKUP comment=API Version 2.0,MMS Version 1.1.1.3
channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:03
channel ORA_SBT_TAPE_1: finished piece 1 at 12-AUG-15
piece handle=NYC11_df_8qqecf5t_1_1.bk tag=FULL_BACKUP comment=API Version 2.0,MMS Version 1.1.1.3
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:06:26

using channel ORA_SBT_TAPE_1
using channel ORA_SBT_TAPE_2
using channel ORA_SBT_TAPE_3
using channel ORA_SBT_TAPE_4
backup will be obsolete on date 19-AUG-15
archived logs required to recover from this backup will be backed up
channel ORA_SBT_TAPE_1: starting full datafile backup set
channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_SBT_TAPE_1: starting piece 1 at 12-AUG-15
channel ORA_SBT_TAPE_1: finished piece 1 at 12-AUG-15
piece handle=NYC11_df_90qecfi0_1_1.bk tag=FULL_BACKUP comment=API Version 2.0,MMS Version 1.1.1.3
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:03


current log archived
using channel ORA_SBT_TAPE_1
using channel ORA_SBT_TAPE_2
using channel ORA_SBT_TAPE_3
using channel ORA_SBT_TAPE_4
backup will be obsolete on date 19-AUG-15
archived logs required to recover from this backup will be backed up
channel ORA_SBT_TAPE_1: starting archived log backup set
channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=3530 RECID=6619 STAMP=887504451
channel ORA_SBT_TAPE_1: starting piece 1 at 12-AUG-15
channel ORA_SBT_TAPE_1: finished piece 1 at 12-AUG-15
piece handle=NYC11_df_91qecfi4_1_1.bk tag=FULL_BACKUP comment=API Version 2.0,MMS Version 1.1.1.3
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:03

using channel ORA_SBT_TAPE_1
using channel ORA_SBT_TAPE_2
using channel ORA_SBT_TAPE_3
using channel ORA_SBT_TAPE_4
backup will be obsolete on date 19-AUG-15
archived logs required to recover from this backup will be backed up
channel ORA_SBT_TAPE_1: starting full datafile backup set
channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_SBT_TAPE_1: starting piece 1 at 12-AUG-15
channel ORA_SBT_TAPE_1: finished piece 1 at 12-AUG-15
piece handle=NYC11_df_92qecfi8_1_1.bk tag=FULL_BACKUP comment=API Version 2.0,MMS Version 1.1.1.3
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:03
Finished backup at 12-AUG-15

With the NFS exports mounted, we can check to see if the backupset was written to the Mtree. First, let’s check the primary Data Domain:

[oracle@rstemc64vm23]$ ls /nfs_mount/rstdd0205_boost
NYC11_df_8qqecf5t_1_1.bk  NYC11_df_8sqecf5t_1_1.bk  NYC11_df_8uqecf64_1_1.bk  NYC11_df_90qecfi0_1_1.bk  NYC11_df_92qecfi8_1_1.bk
NYC11_df_8rqecf5t_1_1.bk  NYC11_df_8tqecf5t_1_1.bk  NYC11_df_8vqecf67_1_1.bk  NYC11_df_91qecfi4_1_1.bk

The replication process may take a while to complete, and we can monitor this by checking the NFS mounted export of the secondary Data Domain’s Mtree. Eventually we should see the RMAN backupset replicated:

[oracle@rstemc64vm23]$ ls /nfs_mount/rstdd0205_boost_rep
NYC11_df_8qqecf5t_1_1.bk  NYC11_df_8sqecf5t_1_1.bk  NYC11_df_8uqecf64_1_1.bk  NYC11_df_90qecfi0_1_1.bk  NYC11_df_92qecfi8_1_1.bk
NYC11_df_8rqecf5t_1_1.bk  NYC11_df_8tqecf5t_1_1.bk  NYC11_df_8vqecf67_1_1.bk  NYC11_df_91qecfi4_1_1.bk

However, if we check the RMAN catalog, we can see that RMAN is not aware of the replicated backupset.

RMAN> list backup of controlfile;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
87105   Full    31.00M     SBT_TAPE    00:00:03     12-AUG-15      
        BP Key: 87107   Status: AVAILABLE  Compressed: NO  Tag: FULL_BACKUP
        Handle: NYC11_df_92qecfi8_1_1.bk   Media: dd0205_boost
        Keep: BACKUP_LOGS        Until: 19-AUG-15      
  Control File Included: Ckp SCN: 5369289      Ckp time: 12-AUG-15

Now that the backupset has replicated, we can use RMAN to clone the primary database to a second database host. We will use the replicated backupset to complete the RMAN restore and recovery.

On the second host, a database instance called lax11 has been created using srvctl. The INIT.ORA for the target instance is shown below:

_disk_sector_size_override=TRUE
audit_file_dest='/u01/app/oracle/admin/lax11/adump'
audit_trail ='db'
compatible='11.2.0.4.0'
control_files = (ora_control1, ora_control2)
db_block_size=8192
db_domain=''
db_name='LAX11'
db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
db_recovery_file_dest_size=64G
diagnostic_dest='/u01/app/oracle'
dispatchers='(PROTOCOL=TCP) (SERVICE=LAX11XDB)'
memory_target=1G
open_cursors=300
processes = 150
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'

The RMAN duplicate script is shown next:

configure channel device type sbt maxopenfiles 4 parms 'BLKSIZE=1048576,SBT_LIBRARY=/u01/app/oracle/product/11.2.0/dbhome_1/lib/libddobk.so,ENV=(STORAGE_UNIT=dd0205_boost,BACKUP_HOST=rstdd0204mgmt.emc.com,ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)';

configure auxiliary channel device type sbt maxopenfiles 4 parms 'BLKSIZE=1048576,SBT_LIBRARY=/u01/app/oracle/product/11.2.0/dbhome_1/lib/libddobk.so,ENV=(STORAGE_UNIT=dd0205_boost,BACKUP_HOST=rstdd0204mgmt.emc.com,ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)';

configure device type sbt backup type to backupset parallelism 4;

run {
  set until restore point FOR_CLONE_1;
  duplicate target database to lax11 device type sbt
    db_file_name_convert '+DATA/nyc11','+SNAP1_XIO11WSA_DATA/lax11'
    spfile
      parameter_value_convert 'nyc11','lax11'
      set control_files '+SNAP1_XIO11WSA_DATA','+SNAP1_XIO11WSA_FRA'
      set db_create_file_dest '+SNAP1_XIO11WSA_DATA'
      set db_recovery_file_dest '+SNAP1_XIO11WSA_FRA'
      set db_recovery_file_dest_size '64G'
      set log_file_name_convert '+DATA','+SNAP1_XIO11WSA_DATA','+FRA','+SNAP1_XIO11WSA_FRA';
}

You can see in the RMAN duplicate script, that the sbt channels are using the rstdd0204mgmt.emc.com Data Domain to which the dd0205_boost Mtree is replicated to.

The RMAN duplicate script uses the FOR_CLONE_1 restore point target, and the script includes file name conversion settings, as the ASM diskgroup layout on the target server differs from the source.

The target instance lax11 must be started in a no-mount state with the INIT.ORA file. The target instance must not be started with an SPFILE, or the duplicate process will fail.

SQL> startup nomount pfile=$ORACLE_HOME/dbs/initlax11.ora
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size                  2260088 bytes
Variable Size             671089544 bytes
Database Buffers          390070272 bytes
Redo Buffers                5517312 bytes

The RMAN duplicate process can now be executed. I have included the output below with annotations to highlight areas of interest:

[oracle@rstemc64vm23 rman_clone_2]$ rman target sys/oracle@nyc11 auxiliary / catalog rman/rman@rcat

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Aug 12 01:31:45 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: NYC11 (DBID=334041916)
connected to recovery catalog database
connected to auxiliary database: LAX11 (not mounted)

RMAN> @clone_database_restore_point.rcv

Starting Duplicate Db at 12-AUG-15
allocated channel: ORA_AUX_SBT_TAPE_1
channel ORA_AUX_SBT_TAPE_1: SID=63 device type=SBT_TAPE
channel ORA_AUX_SBT_TAPE_1: Data Domain Boost API
allocated channel: ORA_AUX_SBT_TAPE_2
channel ORA_AUX_SBT_TAPE_2: SID=129 device type=SBT_TAPE
channel ORA_AUX_SBT_TAPE_2: Data Domain Boost API
allocated channel: ORA_AUX_SBT_TAPE_3
channel ORA_AUX_SBT_TAPE_3: SID=193 device type=SBT_TAPE
channel ORA_AUX_SBT_TAPE_3: Data Domain Boost API
allocated channel: ORA_AUX_SBT_TAPE_4
channel ORA_AUX_SBT_TAPE_4: SID=6 device type=SBT_TAPE
channel ORA_AUX_SBT_TAPE_4: Data Domain Boost API

contents of Memory Script:
{
   set until scn  5369224;
   restore clone spfile to  '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilelax11.ora';
   sql clone "alter system set spfile= ''/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilelax11.ora''";
}
executing Memory Script

RMAN has converted our restore point to an SCN, and started the process to restore the SPFILE from the backup.

executing command: SET until clause

Starting restore at 12-AUG-15
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=67 device type=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: SID=130 device type=DISK
allocated channel: ORA_AUX_DISK_3
channel ORA_AUX_DISK_3: SID=194 device type=DISK
allocated channel: ORA_AUX_DISK_4
channel ORA_AUX_DISK_4: SID=7 device type=DISK
using channel ORA_AUX_SBT_TAPE_1
using channel ORA_AUX_SBT_TAPE_2
using channel ORA_AUX_SBT_TAPE_3
using channel ORA_AUX_SBT_TAPE_4

WARNING: A restore time was estimated based on the supplied UNTIL SCN
channel ORA_AUX_SBT_TAPE_1: starting datafile backup set restore
channel ORA_AUX_SBT_TAPE_1: restoring SPFILE
output file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilelax11.ora
channel ORA_AUX_SBT_TAPE_1: reading from backup piece NYC11_df_90qecfi0_1_1.bk
channel ORA_AUX_SBT_TAPE_1: piece handle=NYC11_df_90qecfi0_1_1.bk tag=FULL_BACKUP
channel ORA_AUX_SBT_TAPE_1: restored backup piece 1
channel ORA_AUX_SBT_TAPE_1: restore complete, elapsed time: 00:00:01
Finished restore at 12-AUG-15

sql statement: alter system set spfile= ''/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilelax11.ora''

RMAN has identified the backupset NYC11_df_90qecfi0_1_1.bk which Data Domain replicated. The backupset is tagged FULL_BACKUP.

contents of Memory Script:
{
   sql clone "alter system set  db_name = 
 ''LAX11'' comment=
 ''duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name = 
 ''LAX11'' comment=
 ''duplicate'' scope=spfile";
   sql clone "alter system set  audit_file_dest = 
 ''/u01/app/oracle/admin/lax11/adump'' comment=
 '''' scope=spfile";
   sql clone "alter system set  dispatchers = 
 ''(PROTOCOL=TCP) (SERVICE=lax11XDB)'' comment=
 '''' scope=spfile";
   sql clone "alter system set  control_files = 
 ''+SNAP1_XIO11WSA_DATA'', ''+SNAP1_XIO11WSA_FRA'' comment=
 '''' scope=spfile";
   sql clone "alter system set  db_create_file_dest = 
 ''+SNAP1_XIO11WSA_DATA'' comment=
 '''' scope=spfile";
   sql clone "alter system set  db_recovery_file_dest = 
 ''+SNAP1_XIO11WSA_FRA'' comment=
 '''' scope=spfile";
   sql clone "alter system set  db_recovery_file_dest_size = 
 64G comment=
 '''' scope=spfile";
   sql clone "alter system set  log_file_name_convert = 
 ''+DATA'', ''+SNAP1_XIO11WSA_DATA'', ''+FRA'', ''+SNAP1_XIO11WSA_FRA'' comment=
 '''' scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''LAX11'' comment= ''duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''LAX11'' comment= ''duplicate'' scope=spfile

sql statement: alter system set  audit_file_dest =  ''/u01/app/oracle/admin/lax11/adump'' comment= '''' scope=spfile

sql statement: alter system set  dispatchers =  ''(PROTOCOL=TCP) (SERVICE=lax11XDB)'' comment= '''' scope=spfile

sql statement: alter system set  control_files =  ''+SNAP1_XIO11WSA_DATA'', ''+SNAP1_XIO11WSA_FRA'' comment= '''' scope=spfile

sql statement: alter system set  db_create_file_dest =  ''+SNAP1_XIO11WSA_DATA'' comment= '''' scope=spfile

sql statement: alter system set  db_recovery_file_dest =  ''+SNAP1_XIO11WSA_FRA'' comment= '''' scope=spfile

sql statement: alter system set  db_recovery_file_dest_size =  64G comment= '''' scope=spfile

sql statement: alter system set  log_file_name_convert =  ''+DATA'', ''+SNAP1_XIO11WSA_DATA'', ''+FRA'', ''+SNAP1_XIO11WSA_FRA'' comment= '''' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1653518336 bytes

Fixed Size                     2253784 bytes
Variable Size               1023413288 bytes
Database Buffers             620756992 bytes
Redo Buffers                   7094272 bytes

RMAN has now executed a series of changes to the target database parameter file and then restarted the database.

contents of Memory Script:
{
   set to restore point  'FOR_CLONE_1';
   sql clone "alter system set  control_files = 
  ''+SNAP1_XIO11WSA_DATA/lax11/controlfile/current.264.887506427'', ''+SNAP1_XIO11WSA_FRA/lax11/controlfile/current.478.887506427'' comment=
 ''Set by RMAN'' scope=spfile";
   sql clone "alter system set  db_name = 
 ''NYC11'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name = 
 ''LAX11'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   restore clone primary controlfile;
   alter clone database mount;
}
executing Memory Script

executing command: SET until clause

sql statement: alter system set  control_files =   ''+SNAP1_XIO11WSA_DATA/lax11/controlfile/current.264.887506427'', ''+SNAP1_XIO11WSA_FRA/lax11/controlfile/current.478.887506427'' comment= ''Set by RMAN'' scope=spfile

sql statement: alter system set  db_name =  ''NYC11'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''LAX11'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area    1653518336 bytes

Fixed Size                     2253784 bytes
Variable Size               1023413288 bytes
Database Buffers             620756992 bytes
Redo Buffers                   7094272 bytes

Starting restore at 12-AUG-15
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=7 device type=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: SID=131 device type=DISK
allocated channel: ORA_AUX_DISK_3
channel ORA_AUX_DISK_3: SID=192 device type=DISK
allocated channel: ORA_AUX_DISK_4
channel ORA_AUX_DISK_4: SID=8 device type=DISK
allocated channel: ORA_AUX_SBT_TAPE_1
channel ORA_AUX_SBT_TAPE_1: SID=68 device type=SBT_TAPE
channel ORA_AUX_SBT_TAPE_1: Data Domain Boost API
allocated channel: ORA_AUX_SBT_TAPE_2
channel ORA_AUX_SBT_TAPE_2: SID=193 device type=SBT_TAPE
channel ORA_AUX_SBT_TAPE_2: Data Domain Boost API
allocated channel: ORA_AUX_SBT_TAPE_3
channel ORA_AUX_SBT_TAPE_3: SID=70 device type=SBT_TAPE
channel ORA_AUX_SBT_TAPE_3: Data Domain Boost API
allocated channel: ORA_AUX_SBT_TAPE_4
channel ORA_AUX_SBT_TAPE_4: SID=194 device type=SBT_TAPE
channel ORA_AUX_SBT_TAPE_4: Data Domain Boost API

channel ORA_AUX_SBT_TAPE_1: starting datafile backup set restore
channel ORA_AUX_SBT_TAPE_1: restoring control file
channel ORA_AUX_SBT_TAPE_1: reading from backup piece NYC11_df_92qecfi8_1_1.bk
channel ORA_AUX_SBT_TAPE_1: piece handle=NYC11_df_92qecfi8_1_1.bk tag=FULL_BACKUP
channel ORA_AUX_SBT_TAPE_1: restored backup piece 1
channel ORA_AUX_SBT_TAPE_1: restore complete, elapsed time: 00:00:03
output file name=+SNAP1_XIO11WSA_DATA/lax11/controlfile/current.264.887506427
output file name=+SNAP1_XIO11WSA_FRA/lax11/controlfile/current.478.887506427
Finished restore at 12-AUG-15

database mounted

RMAN has now restored the controlfiles from backupset NYC11_df_92qecfi8_1_1.bk. Again these have been restored from the secondary Data Domain.

contents of Memory Script:
{
   set until scn  5369224;
   set newname for datafile  1 to 
 "+snap1_xio11wsa_data";
   set newname for datafile  2 to 
 "+snap1_xio11wsa_data";
   set newname for datafile  3 to 
 "+snap1_xio11wsa_data";
   set newname for datafile  4 to 
 "+snap1_xio11wsa_data";
   set newname for datafile  5 to 
 "+snap1_xio11wsa_data";
   set newname for datafile  7 to 
 "+snap1_xio11wsa_data";
   restore
   clone database
   ;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 12-AUG-15
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_2
using channel ORA_AUX_DISK_3
using channel ORA_AUX_DISK_4
using channel ORA_AUX_SBT_TAPE_1
using channel ORA_AUX_SBT_TAPE_2
using channel ORA_AUX_SBT_TAPE_3
using channel ORA_AUX_SBT_TAPE_4

channel ORA_AUX_SBT_TAPE_1: starting datafile backup set restore
channel ORA_AUX_SBT_TAPE_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_SBT_TAPE_1: restoring datafile 00001 to +snap1_xio11wsa_data
channel ORA_AUX_SBT_TAPE_1: reading from backup piece NYC11_df_8sqecf5t_1_1.bk
channel ORA_AUX_SBT_TAPE_2: starting datafile backup set restore
channel ORA_AUX_SBT_TAPE_2: specifying datafile(s) to restore from backup set
channel ORA_AUX_SBT_TAPE_2: restoring datafile 00002 to +snap1_xio11wsa_data
channel ORA_AUX_SBT_TAPE_2: reading from backup piece NYC11_df_8tqecf5t_1_1.bk
channel ORA_AUX_SBT_TAPE_3: starting datafile backup set restore
channel ORA_AUX_SBT_TAPE_3: specifying datafile(s) to restore from backup set
channel ORA_AUX_SBT_TAPE_3: restoring datafile 00003 to +snap1_xio11wsa_data
channel ORA_AUX_SBT_TAPE_3: reading from backup piece NYC11_df_8rqecf5t_1_1.bk
channel ORA_AUX_SBT_TAPE_4: starting datafile backup set restore
channel ORA_AUX_SBT_TAPE_4: specifying datafile(s) to restore from backup set
channel ORA_AUX_SBT_TAPE_4: restoring datafile 00005 to +snap1_xio11wsa_data
channel ORA_AUX_SBT_TAPE_4: reading from backup piece NYC11_df_8uqecf64_1_1.bk
channel ORA_AUX_SBT_TAPE_4: piece handle=NYC11_df_8uqecf64_1_1.bk tag=FULL_BACKUP
channel ORA_AUX_SBT_TAPE_4: restored backup piece 1
channel ORA_AUX_SBT_TAPE_4: restore complete, elapsed time: 00:00:07
channel ORA_AUX_SBT_TAPE_4: starting datafile backup set restore
channel ORA_AUX_SBT_TAPE_4: specifying datafile(s) to restore from backup set
channel ORA_AUX_SBT_TAPE_4: restoring datafile 00004 to +snap1_xio11wsa_data
channel ORA_AUX_SBT_TAPE_4: reading from backup piece NYC11_df_8vqecf67_1_1.bk
channel ORA_AUX_SBT_TAPE_4: piece handle=NYC11_df_8vqecf67_1_1.bk tag=FULL_BACKUP
channel ORA_AUX_SBT_TAPE_4: restored backup piece 1
channel ORA_AUX_SBT_TAPE_4: restore complete, elapsed time: 00:00:03
channel ORA_AUX_SBT_TAPE_4: starting datafile backup set restore
channel ORA_AUX_SBT_TAPE_4: specifying datafile(s) to restore from backup set
channel ORA_AUX_SBT_TAPE_4: restoring datafile 00007 to +snap1_xio11wsa_data
channel ORA_AUX_SBT_TAPE_4: reading from backup piece NYC11_df_8qqecf5t_1_1.bk
channel ORA_AUX_SBT_TAPE_1: piece handle=NYC11_df_8sqecf5t_1_1.bk tag=FULL_BACKUP
channel ORA_AUX_SBT_TAPE_1: restored backup piece 1
channel ORA_AUX_SBT_TAPE_1: restore complete, elapsed time: 00:00:17
channel ORA_AUX_SBT_TAPE_2: piece handle=NYC11_df_8tqecf5t_1_1.bk tag=FULL_BACKUP
channel ORA_AUX_SBT_TAPE_2: restored backup piece 1
channel ORA_AUX_SBT_TAPE_2: restore complete, elapsed time: 00:00:25
channel ORA_AUX_SBT_TAPE_3: piece handle=NYC11_df_8rqecf5t_1_1.bk tag=FULL_BACKUP
channel ORA_AUX_SBT_TAPE_3: restored backup piece 1
channel ORA_AUX_SBT_TAPE_3: restore complete, elapsed time: 00:00:35

channel ORA_AUX_SBT_TAPE_4: piece handle=NYC11_df_8qqecf5t_1_1.bk tag=FULL_BACKUP
channel ORA_AUX_SBT_TAPE_4: restored backup piece 1
channel ORA_AUX_SBT_TAPE_4: restore complete, elapsed time: 00:19:25
Finished restore at 12-AUG-15

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=17 STAMP=887507653 file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/system.268.887506479
datafile 2 switched to datafile copy
input datafile copy RECID=18 STAMP=887507653 file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/sysaux.261.887506479
datafile 3 switched to datafile copy
input datafile copy RECID=19 STAMP=887507653 file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/undotbs1.267.887506479
datafile 4 switched to datafile copy
input datafile copy RECID=20 STAMP=887507653 file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/users.262.887506485
datafile 5 switched to datafile copy
input datafile copy RECID=21 STAMP=887507653 file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/example.263.887506479
datafile 7 switched to datafile copy
input datafile copy RECID=22 STAMP=887507653 file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/soe.269.887506489

RMAN executed a series of set-newname commands, and then restores the data files from the replicated RMAN backupset. Even thought the RMAN catalog does not know that Data Domain replicated the backupset, it is still able to restore files from the replicated backupsets.

contents of Memory Script:
{
   set until scn  5369224;
   recover
   clone database
    delete archivelog
   ;
}
executing Memory Script

executing command: SET until clause

Starting recover at 12-AUG-15
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_2
using channel ORA_AUX_DISK_3
using channel ORA_AUX_DISK_4
using channel ORA_AUX_SBT_TAPE_1
using channel ORA_AUX_SBT_TAPE_2
using channel ORA_AUX_SBT_TAPE_3
using channel ORA_AUX_SBT_TAPE_4

starting media recovery

channel ORA_AUX_SBT_TAPE_1: starting archived log restore to default destination
channel ORA_AUX_SBT_TAPE_1: restoring archived log
archived log thread=1 sequence=3530
channel ORA_AUX_SBT_TAPE_1: reading from backup piece NYC11_df_91qecfi4_1_1.bk
channel ORA_AUX_SBT_TAPE_1: piece handle=NYC11_df_91qecfi4_1_1.bk tag=FULL_BACKUP
channel ORA_AUX_SBT_TAPE_1: restored backup piece 1
channel ORA_AUX_SBT_TAPE_1: restore complete, elapsed time: 00:00:03
archived log file name=+SNAP1_XIO11WSA_FRA/lax11/archivelog/2015_08_12/thread_1_seq_3530.770.887507657 thread=1 sequence=3530
channel clone_default: deleting archived log(s)
archived log file name=+SNAP1_XIO11WSA_FRA/lax11/archivelog/2015_08_12/thread_1_seq_3530.770.887507657 RECID=6620 STAMP=887507656
media recovery complete, elapsed time: 00:00:00
Finished recover at 12-AUG-15

RMAN now identified the archive logs it needs to complete the recovery of the duplicate database to restore point FOR_CLONE_1. The archive logs are restored from the Data Domain and applied to the auxiliary instance.

Oracle instance started

Total System Global Area    1653518336 bytes

Fixed Size                     2253784 bytes
Variable Size               1023413288 bytes
Database Buffers             620756992 bytes
Redo Buffers                   7094272 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name = 
 ''LAX11'' comment=
 ''Reset to original value by RMAN'' scope=spfile";
   sql clone "alter system reset  db_unique_name scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''LAX11'' comment= ''Reset to original value by RMAN'' scope=spfile

sql statement: alter system reset  db_unique_name scope=spfile

Oracle instance shut down

RMAN now changes the database name and database unique name in the SPFILE, and restarts the instance.

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1653518336 bytes

Fixed Size                     2253784 bytes
Variable Size               1023413288 bytes
Database Buffers             620756992 bytes
Redo Buffers                   7094272 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "LAX11" RESETLOGS ARCHIVELOG 
  MAXLOGFILES     16
  MAXLOGMEMBERS      3
  MAXDATAFILES      100
  MAXINSTANCES     8
  MAXLOGHISTORY    11001
 LOGFILE
  GROUP   1 ( '+snap1_xio11wsa_data', '+snap1_xio11wsa_fra' ) SIZE 1 G  REUSE,
  GROUP   2 ( '+snap1_xio11wsa_data', '+snap1_xio11wsa_fra' ) SIZE 1 G  REUSE,
  GROUP   3 ( '+snap1_xio11wsa_fra', '+snap1_xio11wsa_data' ) SIZE 1 G  REUSE,
  GROUP   4 ( '+snap1_xio11wsa_data', '+snap1_xio11wsa_fra' ) SIZE 1 G  REUSE,
  GROUP   5 ( '+snap1_xio11wsa_fra', '+snap1_xio11wsa_data' ) SIZE 1 G  REUSE
 DATAFILE
  '+SNAP1_XIO11WSA_DATA/lax11/datafile/system.268.887506479'
 CHARACTER SET WE8MSWIN1252

RMAN creates a new controlfile for the duplicated database reflecting the new database name and redo log configuration.

contents of Memory Script:
{
   set newname for tempfile  1 to 
 "+snap1_xio11wsa_data";
   switch clone tempfile all;
   catalog clone datafilecopy  "+SNAP1_XIO11WSA_DATA/lax11/datafile/sysaux.261.887506479", 
 "+SNAP1_XIO11WSA_DATA/lax11/datafile/undotbs1.267.887506479", 
 "+SNAP1_XIO11WSA_DATA/lax11/datafile/users.262.887506485", 
 "+SNAP1_XIO11WSA_DATA/lax11/datafile/example.263.887506479", 
 "+SNAP1_XIO11WSA_DATA/lax11/datafile/soe.269.887506489";
   switch clone datafile all;
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to +snap1_xio11wsa_data in control file

cataloged datafile copy
datafile copy file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/sysaux.261.887506479 RECID=1 STAMP=887507691
cataloged datafile copy
datafile copy file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/undotbs1.267.887506479 RECID=2 STAMP=887507691
cataloged datafile copy
datafile copy file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/users.262.887506485 RECID=3 STAMP=887507691
cataloged datafile copy
datafile copy file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/example.263.887506479 RECID=4 STAMP=887507691
cataloged datafile copy
datafile copy file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/soe.269.887506489 RECID=5 STAMP=887507691

datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=887507691 file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/sysaux.261.887506479
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=887507691 file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/undotbs1.267.887506479
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=887507691 file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/users.262.887506485
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=887507691 file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/example.263.887506479
datafile 7 switched to datafile copy
input datafile copy RECID=5 STAMP=887507691 file name=+SNAP1_XIO11WSA_DATA/lax11/datafile/soe.269.887506489

RMAN has now switched the duplicated database to the restored and recovered data files, which are relocated to a different ASM diskgroup compared to the source database.

Reenabling controlfile options for auxiliary database
Executing: alter database force logging

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 12-AUG-15

Finally the duplciated database is opened with the resetlogs option.

We have shown here that Data Domain’s Mtree replication solution allows for reliable replication of critical backupsets from a primary location to a secondary location, and unlike RMAN managed replication, it does so without causing any latency on the primary backup.

The replicated backupset is usable by RMAN for restore or cloning opetations, allowing the Oracle DBA to leverage backup assets in ways that were too cumbersome to be useful when writing to tape or even to conventional NAS shares.

As before, be sure to test your backups regularly to ensure they meet the data protection policies of the organization.

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