How to use snapmanager to implement Disaster Recovery for Oracle database

Jephe Wu -

Objective: use snapmanager for Oracle to backup production database to DR and restore from there
Environment: Oracle standalone database 11gR2 running in Oracle VM guest backed by Oracle VM server 3.1.1., use centralized netapp storage to store binary and database files.


1. create the coresponding volumes in DR netapp for each volume in primary database

ssh -n netapp 'df -Ah'
ssh -n netapp 'df -h'
ssh -n netapp 'vol status -v volname'
ssh -n netapp 'qtree status'
ssh -n netapp 'rdfile /etc/rc'
ssh -n netapp 'rdfile /etc/exports'
ssh -n netapp 'rdfile /etc/quotas'

vol create volname aggr1  100g
snap reserve volname 0
snap sched volname 0 0 0

For binary, create default volume without disabling snap shot and schedule.

2. configuring snapmirror

if snapmirror is uninitialized, need to be in restricted mode first
vol restrict volname
snapmirror initialize -S src:vol dst:vol
snapmirror resync -S srv:vol dst:vol
snapmirror update dstvol

break it:

snapmirror quiesce
snapmirror break dstvolname

3. recover database
startup dr VM

restore control file volume snapshot  # use snap restore ....
restore coresponding snapshot for datafile volume
rman target /
rman> restore controlfile from 'put any one of backup controlfile name from snapshot here'
rman> startup mount;
rman> recover database
rman> alter database open resetlogs

4. for smo postscript to work
enable http and https admin on dr storage so that postscript for resync snapmirror will work

on dr netapp:
disable automatic snapmirror (in /etc/snapmirror.conf, use five dash )
ssh into netapp
dr> options httpd.admin.enable on
dr> options httpd.enable on

use tcpdump -nn host

snapdrive config list
snapdrive config set root password

1 comment:

  1. I am extremely inspired with your writing skills
    as well as with the layout to your weblog. Is this a paid
    theme or did you modify it yourself? Either
    way keep up the excellent high quality writing, it's rare to peer a nice weblog like this one nowadays..

    Here is my page: Stability Ball ()