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

Creating or Shutting Down a Clone Database Using dbed_vmclonedb

You can use the VERITAS Storage Foundation for Oracle dbed_vmclonedb command to create or shutdown a clone database on either the primary or secondary host using snapshot volumes from the primary host.


Prerequisites

  • You must be logged in as the Oracle database administrator to use dbed_vmclonedb command.
  • Before you can use the dbed_vmclonedb command, you must complete the steps in Summary of Database Snapshot Steps, Validating a Snapplan (dbed_vmchecksnap), and Creating a Snapshot (dbed_vmsnap).
  • The volume snapshot must contain the entire database.
  • The system administrator must provide the database administrator with access to the necessary volumes and mount points.
  • Before you can use the dbed_vmclonedb command with the -r relocate_path option (which specifies the initial mount point for the snapshot image), the system administrator must create the mount point and then change the owner to the Oracle database administrator.
  • If SNAPSHOT_MODE is set to offline or instant, a two-host configuration is required and -r relocate_path is not allowed.


Usage Notes

  • The dbed_vmclonedb command can be used on the secondary host.
  • In a single-host configuration, the primary and secondary hosts can be the same.
  • In a single-host configuration, -r relocate_path is required.
  • In a two-host configuration, the vxdbavol=vol_name option is required.
  • Database FlashSnap commands are integrated with Storage Checkpoint functionality. It is possible to display and mount Storage Checkpoints carried over with snapshot volumes to a secondary host. However limitations apply. For details, see Mounting the Snapshot Volumes and Backing Up.
  • See the dbed_vmclonedb(1M) manual page for more information.


Options

-S ORACLE_SID

Specifies the ORACLE_SID, which is the name of the Oracle database, for which a snapshot image will be created.

-g snap_dg

Specifies the name of the disk group that contains all snapshot volumes.

-o mount

Mounts the file systems so you can use them to do a backup.

-o mountdb

Starts the database to allow manual database recovery.

-o recoverdb

Automatically recovers the database.

-o restartdb

Restarts the database if the clone database is shut down. A clone database must exist to use the -o restartdb option.

-o update_status

Updates the database status information in the VxDBA repository. This option is required only after the database has been manually recovered (-o mountdb).

-o umount

Shuts down the clone database and unmounts all snapshot files.

new_sid=

Specifies the new ORACLE_SID for the snapshot image.

This is a required argument.

vxdbavol=vol_name

Specifies the volume that contains snapplan data. This name is not determined by the user. It is provided after you run vmsnap -o snapshot.

This parameter is required when creating the clone in a two-host configuration.

-f SNAPPLAN

Indicates the name of the snapplan that you are using.

-H

Specifies the Oracle home directory that corresponds to the ORACLE_SID.

This is an optional argument.

-r relocate_path

Specifies the initial mount point for the snapshot image.

If you are creating a clone in a single-host configuration, -r is required. Otherwise, it is an optional argument.

If -r relocate_path is used when cloning a database, it will also be required for running -o update_status and -o umount.


Note    Do not use -r relocate_path if the SNAPSHOT_MODE parameter is set to instant or offline.

  To clone a database automatically

In a single-host configuration:

To create a clone of the primary database on the same host as the primary database, use the dbed_vmclonedb command as follows:


 $ /opt/VRTS/bin/dbed_vmclonedb -S PROD -g SNAP_PRODdg \
 -o recoverdb,new_SID=NEWPROD -f snap1 -r /clone
 dbed_vmclonedb started at 2004-04-02 14:42:10
Mounting /clone/prod_db on
/dev/vx/dsk/SNAP_PRODdg/SNAP_prod_db.

Mounting /clone/prod_ar on
/dev/vx/dsk/SNAP_PRODdg/SNAP_prod_ar.

 All redo-log files found.
 Database NEWPROD (SID=NEWPROD) is running.
 dbed_vmclonedb ended at 2003-04-02 14:43:05

In a two-host configuration:

To create a clone of the primary database on a secondary host, use the dbed_vmclonedb command as follows:


 $ /opt/VRTS/bin/dbed_vmclonedb -S PROD -g SNAP_PRODdg \
 -o recoverdb,new_SID=NEWPROD,vxdbavol=SNAP_arch -f snap2
 dbed_vmclonedb started at 2004-04-09 23:03:40
 Mounting /clone/arch on /dev/vx/dsk/SNAP_PRODdg/SNAP_arch.
Mounting /clone/prod_db on
/dev/vx/dsk/SNAP_PRODdg/SNAP_prod_db.

 All redo-log files found.
 Database NEWPROD (SID=NEWPROD) is running.
 dbed_vmclonedb ended at 2004-04-09 23:04:50

  To clone a database manually

In a single-host configuration:

To mount file systems and create a clone of the primary database on the same host as the primary database without recovering the clone database, use the dbed_vmclonedb command as follows. The clone database must be manually recovered before it can be used:


 $ /opt/VRTS/bin/dbed_vmclonedb -S PROD -g SNAP_PRODdg \
 -o mountdb,new_SID=NEWPROD -f snap1 -r /clone
 dbed_vmclonedb started at 2003-04-02 15:34:41
Mounting /clone/prod_db on
/dev/vx/dsk/SNAP_PRODdg/SNAP_prod_db.

Mounting /clone/prod_ar on
/dev/vx/dsk/SNAP_PRODdg/SNAP_prod_ar.

 All redo-log files found.
 Database NEWPROD (SID=NEWPROD) is in recovery mode.

 If the database NEWPROD is recovered manually, you must run
 dbed_vmclonedb -o update_status to change the snapshot status.
 dbed_vmclonedb ended at 2004-04-02 15:34:59

Recover the database manually.

Update the snapshot status (database_recovered) for the clone database on the primary host after manual recovery has been completed:


 $ /opt/VRTS/bin/dbed_vmclonedb -o 
 update_status,new_sid=NEWPROD -f snap1 -r /clone
 dbed_vmclonedb started at 2004-04-02 15:19:16
 The snapshot status has been updated.
 dbed_vmclonedb ended at 2004-04-02 15:19:42

In a two-host configuration:

To mount file systems and create a clone of the primary database on a secondary host without recovering the clone database, use the dbed_vmclonedb command as follows. The clone database must be manually recovered before it can be used:


 $ /opt/VRTS/bin/dbed_vmclonedb -S PROD -g SNAP_PRODdg \
  -o mountdb,new_sid=NEWPROD,vxdbavol=SNAP_arch -f snap2 
 dbed_vmclonedb started at 2003-04-09 23:26:50
 Mounting /clone/arch on /dev/vx/dsk/SNAP_PRODdg/SNAP_arch.
Mounting /clone/prod_db on
/dev/vx/dsk/SNAP_PRODdg/SNAP_prod_db.

 All redo-log files found.
 Database NEWPROD (SID=NEWPROD) is in recovery mode.

 If the database NEWPROD is recovered manually, you must run
 dbed_vmclonedb -o update_status to change the snapshot status.
 dbed_vmclonedb ended at 2004-04-02 15:34:59
 

Recover the database manually.

Update the snapshot status (database_recovered) for the clone database on the secondary host after manual recovery has been completed:


 $ /opt/VRTS/bin/dbed_vmclonedb -o update_status,new_sid=NEWPROD \
 -f snap2
 dbed_vmclonedb started at 2004-04-06 09:22:27
 The snapshot status has been updated.
 dbed_vmclonedb ended at 2004-04-06 09:22:40

  To shut down the clone database and unmount all snapshot file systems

In a single-host configuration:

To shut down the clone database and unmount file systems for a clone on the same host as the primary database, use the dbed_vmclonedb command as follows:


 $ /opt/VRTS/bin/dbed_vmclonedb -o umount,new_sid=NEWPROD \
 -f snap1 -r /clone
 dbed_vmclonedb started at 2004-04-02 15:11:22
 Umounting /clone/prod_db.
 Umounting /clone/prod_ar.
 dbed_vmclonedb ended at 2004-04-02 15:11:47

In a two-host configuration:

To shut down the clone database, unmount file systems, and deport the snapshot disk group for a clone on a secondary host, use the dbed_vmclonedb command as follows:


 $ /opt/VRTS/bin/dbed_vmclonedb -o umount,new_sid=NEWPROD \
 -f snap2
 dbed_vmclonedb started at 2004-04-09 23:09:21
 Umounting /clone/arch.
 Umounting /clone/prod_db.
 dbed_vmclonedb ended at 2004-04-09 23:09:50

  To restart a clone database

In a single-host configuration:

To start the clone database on the same host as the primary database, use the dbed_vmclonedb command as follows:


 $ /opt/VRTS/bin/dbed_vmclonedb -S PROD -g SNAP_PRODdg \
 -o restartdb,new_sid=NEWPROD -f snap1 -r /clone
 dbed_vmclonedb started at 2004-04-02 15:14:49
Mounting /clone/prod_db on
/dev/vx/dsk/SNAP_PRODdg/SNAP_prod_db.

Mounting /clone/prod_ar on
/dev/vx/dsk/SNAP_PRODdg/SNAP_prod_ar.

 Oracle instance NEWPROD successfully started.
 dbed_vmclonedb ended at 2004-04-02 15:15:19

In a two-host configuration:

To start the clone database on the secondary host, use the dbed_vmclonedb command as follows:


 $ /opt/VRTS/bin/dbed_vmclonedb -S PROD -g SNAP_PRODdg \
 -o restartdb,new_sid=NEWPROD,vxdbavol=SNAP_arch -f snap2
 dbed_vmclonedb started at 2003-04-09 23:03:40
 Mounting /clone/arch on
 /dev/vx/dsk/SNAP_PRODdg/SNAP_arch.
 Mounting /clone/prod_db on
 /dev/vx/dsk/SNAP_PRODdg/SNAP_prod_db.
 Oracle instance NEWPROD successfully started.
 dbed_vmclonedb ended at 2003-04-09 23:04:50
 ^ 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