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
- When cloning a database on the primary host, the system administrator must create the initial mount point prefix for the snapshot image (using the -r relocate_path option) and change the owner of the mount point to the database administrator. If the -r relocate_path option is not specified when creating the clone database on a secondary host, all corresponding file system mount points from the primary host need to be created and their owner changed to the database administrator.
Usage Notes
- The dbed_vmclonedb command can be used on the primary or secondary host.
- The dbed_vmclonedb command must be run by the Oracle database administrator.
- See the dbed_vmclonedb(1M) manual page for more information.
Options
-S
|
Specifies the ORACLE_SID, which is the name of the Oracle database, for which a snapshot image will be created.
|
-g
|
Indicates the name of the disk group that contains all snapshot volumes.
|
-o mount|mountdb|recoverdb
|
Specifies what to do with the snapshot image. The -o mount option mounts the file systems to do a backup. The -o mountdb option starts the database to allow manual database recovery. the -o recoverdb option automatically recovers the database.
|
-o umount
|
Specifies what to do with the snapshot image. The -o umount option unmounts all snapshot files. The -o deport option deports the snapshot disk group.
|
-o new_sid=
|
Specifies the new ORACLE_SID for the snapshot image.
This is a required argument.
|
-o vxdbavol=
|
Specifies the VxDBA repository volume name.
This is an optional argument, unless you are creating the clone on a secondary host.
|
-r
|
Indicates the initial mount point for the snapshot image.
This is an optional argument.
|
To create and recover a clone database on a secondary host
Use the dbed_vmclonedb command as follows:
$ dbed_vmclonedb -S PROD -g SNAP_PRODdg -o \
recoverdb,new_sid=NEWPROD,vxdbavol=SNAP_vxdba01
dbed_vmclonedb started at 2002-03-11 12:36:46
Mounting /prod_db on /dev/vx/dsk/SNAP_PRODdg/SNAP_ORACLE1.
Mounting /prod_ar on /dev/vx/dsk/SNAP_PRODdg/SNAP_prod_ar.
NEWPROD can only be brought up with the same db_name as PROD
Database PROD (SID=NEWPROD) is running.
dbed_vmclonedb ended at 2002-03-11 12:37:43
To start and recover a clone database on the same host
Use the dbed_vmclonedb command as follows:
$ dbed_vmclonedb -S 815 -g SNAP_oradg -o recoverdb,new_sid=NEW_815 \
-r /snapdb
dbed_vmclonedb started at 2002-03-11 12:11:34
Mounting /snapdb/share/oradata1_815 on
/dev/vx/dsk/SNAP_oradg/SNAP_oradata1_815.
Mounting /snapdb/share/oradata2_815 on
/dev/vx/dsk/SNAP_oradg/SNAP_oradata2_815.
Mounting /snapdb/share/oradata3_815 on
/dev/vx/dsk/SNAP_oradg/SNAP_oradata3_815.
Mounting /snapdb/share/archivelog_815 on
/dev/vx/dsk/SNAP_oradg/SNAP_archivelog_815.
Eliding remote_login_passwordfile in initNEW_815.ora.
All redo-log files found.
Database NEW_815 (SID=NEW_815) is running.
dbed_vmclonedb ended at 2002-03-11 12:12:23
To shutdown and unmount a clone database on a secondary host
Use the dbed_vmclonedb command as follows:
$ dbed_vmclonedb -o umount,new_sid=NEWPROD
dbed_vmclonedb started at 2002-03-11 12:40:05
Oracle instance successfully shut down.
Umounting /prod_db.
Umounting /prod_ar.
dbed_vmclonedb ended at 2002-03-11 12:40:16
To shutdown and unmount a clone database on the same host
Use the dbed_vmclonedb command as follows:
$ dbed_vmclonedb -o umount,new_sid=NEW_815 -r /snapdb
dbed_vmclonedb started at 2002-03-11 12:49:09
Oracle instance successfully shut down.
Umounting /snapdb/share/oradata1_815.
Umounting /snapdb/share/oradata2_815.
Umounting /snapdb/share/oradata3_815.
Umounting /snapdb/share/archivelog_815.
dbed_vmclonedb ended at 2002-03-11 12:51:31
|