Previous  |  Next  >  
Product: Storage Foundation for Databases Guides   
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide   

Resynchronizing Your Database to the Snapshot

If your database becomes corrupted, you can use reverse resynchronization to recover the database from a clone. The reverse resynchronization feature of VERITAS Database FlashSnap enables you to resynchronize the primary database or volume with a clone database or snapshot volume.

Reverse resynchronization requires the primary database to be offline so that it remains unchanged.


Caution  Caution    Upon completion of reverse resynchronization, the content of the original database is discarded. Storage Checkpoints taken on either the original database or the clone database before or after the snapshot was created are discarded. The dbed_vmsnap -o reverse_resync_commit command cannot be undone and should be used with extreme caution.

Prerequisites

  • You must be logged in as the Oracle database administrator.
  • Before you can reverse resynchronize the snapshot image, you must complete the steps in Summary of Database Snapshot Steps and Creating a Snapshot (dbed_vmsnap).
  • The mount point for the primary database must be created by and owned by the Oracle DBA user before mounting the VxFS file system.
  • If a clone database has been created, you must shut it down and unmount the file systems using the dbed_vmclonedb -o umount command before you can reverse resynchronize the snapshot image. This command also deports the disk group if the primary and secondary hosts are different. See Shutting Down the Clone Database and Unmounting File Systems.
  • The primary database must be offline.


Usage Notes

  • The dbed_vmsnap command can only be executed on the primary host.
  • If the Oracle authentication password is used, you need to recreate it using the ORAPWD utility after executing dbed_vmsnap -o reverse_resync_commit.

  • Note   Note    You cannot access Database FlashSnap commands (dbed_vmchecksnap, dbed_vmsnap, and dbed_vmclonedb) from the VxDBA menu utility.

  To begin reverse resynchronization

The -o reverse_resync_begin option of the dbed_vmsnap command imports the disk group that was deported from the secondary host (in a two-host configuration) and joins it back to the original disk group. The command unmounts the original volumes, mounts the snapshot volumes with the file systems that are configured for the primary database, and brings up the database snapshot image as the primary database. This operation requires the primary database to be offline so that its contents remain unchanged.

To begin reverse resynchronization, use the -o reverse_resync_begin option as follows:


/opt/VRTS/bin/dbed_vmsnap -S ORACLE_SID -f SNAPPLAN \
-o reverse_resync_begin
Note   Note    Any mounted storage checkpoints must be unmounted before running dbed_vmsnap -o reverse_resync.

After executing reverse_resync_commit, checkpoints created on the original database or clone database will be deleted.


Limitation

Reverse resynchronization requires the primary database to be down. However, in an HA environment, when VCS detects that the primary database is down, it starts the fail over process, VxDBA repository gets unmounted, dbed_vmsnap dies.

Use the following workaround:

  1. To temporarily freeze the VCS Resource Group for the database, enter:
       # hagrp -freeze ResourceGroup 
  2. Shutdown the primary database.
  3. Run reverse_resync.
  4. When reverse_resync is completed, start up the database. Make sure it is in archivelog mode.
  5. To unfreeze the Resource Group, enter:

# hagrp -unfreeze ResourceGroup

  To abort reverse resynchronization

The -o reverse_resync_abort option aborts -o reverse_resync_begin, unmounts the snapshot volumes, and mounts the original volumes back with the file systems that are configured to use the volume. This operation is only allowed after -o reverse_resync_begin has been executed and cannot be used after reverse resynchronization has been committed (-o reverse_resync_commit).

To abort reverse resynchronization, use the -o reverse_resync_begin option as follows:


/opt/VRTS/bin/dbed_vmsnap -S ORACLE_SID -f SNAPPLAN \
-o reverse_resync_abort

  To commit reverse resynchronization changes

The -o reverse_resync_commit option commits the reverse resynchronization changes after you have verified that they are acceptable. The operation resynchronizes the original volume from the data in the snapshot.

To commit the reverse resynchronization changes, use the -o reverse_resync_commit option as follows:


/opt/VRTS/bin/dbed_vmsnap -S ORACLE_SID -f SNAPPLAN \
-o reverse_resync_commit

Then, restart the primary database in ARCHIVELOG mode so that it is ready to take another snapshot.

If the Oracle authentication password file is used for the database, it needs to be recreated using the ORAPWD utility after the reverse_resync_commit operation is performed.

For information on resynchronizing the snapshot using the GUI, see Using the VERITAS Storage Foundation for Oracle Graphical User Interface.


Example


Note   Note    The following example is valid only for the online_snapshot mode.

Reverse resynchronization is started on the primary host.


/opt/VRTS/bin/dbed_vmsnap -S PROD -f snap1 \
-o reverse_resync_begin
dbed_vmsnap started at 2004-04-02 15:53:45
Database PROD (SID=PROD) is running.
dbed_vmsnap ended at 2004-04-02 15:54:29

Reverse resychronization is aborted on the primary host.


/opt/VRTS/bin/dbed_vmsnap -S PROD -f snap1 \
-o reverse_resync_abort
dbed_vmsnap started at 2004-04-02 16:16:44
The option reverse_resync_abort has been completed.
dbed_vmsnap ended at 2004-04-02 16:16:51

Reverse resychronization changes are committed on the primary host.


/opt/VRTS/bin/dbed_vmsnap -S PROD -f snap1 \
-o reverse_resync_commit
dbed_vmsnap started at 2004-04-02 16:18:44
The option reverse_resync_commit has been completed.
dbed_vmsnap ended at 2004-04-02 16:18:56
 ^ Return to Top Previous  |  Next  >  
Product: Storage Foundation for Databases Guides  
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide  
VERITAS Software Corporation
www.veritas.com