Alejandro Vargas' Blog

  • December 26, 2006

Backup and Recovery of a RAC 10gR2 Database Based On ASM Storage Using EMC SRDF

Alejandro Vargas
Technical Leader, ACS Global Delivery, Infrastructure & BigData

Critical databases usually are backed up using high end storage backup solutions like EMC's bcv or srdf, or Netapp snapshots.

Both solutions are available to be used with RAC 10g R2 and ASM.

Here you can find the steps to both backup and recover a 10g RAC on ASM.

Always test your implementations before moving them to production.

This procedure combines Storage, EMC related actions, and Database Administration Actions. All Storage related actions are
highlighted to diferentiate them.

On prod we have a set of scripts for each step that are run from the enterprise scheduler.

Steps in Brief:

1.    Synchronize the Device Groups (establish)
2.    On ASM set balance power = 0
3.    Archive current on both instances
4.    Place database on backup mode
5.    Perform consistent split for disk group DATADG
6.    End backup mode on the database
7.    Create control files backup on disk group ARCHDG
8.    Perform consistent split for disk group ARCHDG that contain archived logs and control file copies
9.    Optionally backup the snapshot site to tape

Snapshot Procedure:

1.    Prepare the remote host Oracle Homes (optional)
You may configure a remote site to mount and check the backup consistency.
This step is only required at implementation, afterwards do not require maintainance unless there are structural changes.

a) copy ASM init.ora parameter file: init+ASM.ora  to ASM home, dbs directory   

b) copy ASM password file orapw+ASM  to ASM home, dbs directory   
c) copy Database init.ora parameter file: initTSTASM1.ora  to Oracle home, dbs directory   
d) copy Database password file orapwTSTASM1  to Oracle home, dbs directory   
e) update hostname on parameter files to reflect target hostname.   
f) create dump directories for database and asm instance

2.    Identify the LUN's in ASM Datadg disk group:  

This information needs to be passed to the Storage Manager in order to configure the Symmetrix Device Groups and is required at the implementation stage, afterwards needs to be updated only if there are structural changes.
GROUP_NUMBER PATH                           NAME

------------ ------------------------------ --------------------
           1 /dev/emcpowera                 ARCHDG
           3 /dev/emcpowere                 DATADG
           3 /dev/emcpowerg                 DATADG

3.    Create Symmetrix Device Groups and Associate BCV devices:

Two groups are required because the group containing the redo logs require to be split after the group containing the data.   

4.    Establish (synchronize) The Device Groups:   

Make sure de Device Groups are established.

5.    Online Backup on Production Host:   

a) Turn rebalance power to 0 on ASM instance            
b) Force a log switch using archive log current        
c) Place the database in backup mode           

6.    Perform a Consistent Split Snapshot for Database Files:  

Perform a point in time snapshot of DATADG   

7.    End Backup Mode:   

f) Take the database out of backup mode       
g) Force a log switch               

8.    Create Backup of control files:  

h) Create 2 controlfile backups, "control_start" and    
    control_backup on ARCHDG           
i) Prepare an init ora pointing the control file to    
   control_start on ARCHDG if not ready from point 1.   

9.    Perform a Consistent Split Snapshot of the Recovery Area to capture the Archive Log:   

j) Perform a snapshot of the volumes containing the    
   archived logs ARCHDG   

10.    Start ASM instance on Backup Host and perform checks. (Optional)  

If you did configure a backup server to check the R2 then follow these steps:

k) Startup the ASM instance on the Backup Host

l) Check that all diskgroups are successfully mounted  
m) Startup and mount the database using the parfile   
   created on "i" , that points to control_start
n) recover and startup readonly

Optional Backup the Backup Steps:

o) Optionally use Backup EMC snapshots of the r2 copy
p) Optionally make EMC snapshots of r2 to be used as report instances, development or tests environments.
q) Optionally backup r2 to tape using RMAN.

Join the discussion

Comments ( 4 )
  • alex Saturday, January 6, 2007
    Alejandro - great blog. We use srdf for our simple non-rac nodes. We are looking at srdf for 10g rac on asm but are not sure what can be replicated and what can not:
    db binaries - ?
    crs binaries - ? (don't think so)
    asm binaries - ?
    voting disk - ?
    ocr disk - ?
    data - yes
  • Alejandro Vargas Sunday, January 7, 2007
    Hello, srdf/bcv/Storage snapshots are used to backup the database as described.
    If I would like to replicate a whole RAC environment, I will install CRS,ASM and RDBMS homes, put there my parameter files, start the database as single instance from the srdf and register it with CRS.
    Grid Control Deployment module is a great aid in replicating Oracle Homes.
  • Younus Siddiqi Tuesday, February 27, 2007
    Alejandro - Great blog.. I check it for updates first thing in the morning ..
    I attended the racsig seminar and in it it was mentionsed that ASM should only support one database in short you cannot use the backup solution if you have mutiple databases using the same ASM instance ... I was unable to understand why... I would understand if they said cannot share diskgroup. Cant you setup consistency device groups at the diskgroup/databases level and use snapshot/backup on the dr side
  • Alejandro Vargas Wednesday, February 28, 2007
    The ASM instance does support access to the ASM Volumes, it can serve many databases, depending on your server resources.
    If you setup different databases to share the same disk group, then you must backup all of them at the same time when using storage snapshots.
    Rman backups do not suffer from this restriction.
    If you place them on different disk groups, then you need to define storage volumes per disk group and can backup them separately.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.