svsdbsnap (1M)

NAME

svsdbsnap - creates, manages and clones point-in-time copy of the Oracle database

SYNOPSIS

svsdbsnap -o create -P oracle_init_parameter_file [ -n dbsnap_name]

svsdbsnap -o display -P oracle_init_parameter_file

svsdbsnap -o remove -P oracle_init_parameter_file [ -f] -n dbsnap_name

svsdbsnap -o clonedb -P oracle_init_parameter_file -n dbsnap_name -c clone_sid

svsdbsnap -o restore -P oracle_init_parameter_file -n dbsnap_name { -D | -t tablespace | -p partition_name | -d data_file}

DESCRIPTION

The svsdbsnap command provides ability to create, manage and clone point-in-time copy of the Oracle database. These point-in-time copies are called as DBSNAP images. This command is run as Oracle DBA from the ORACLE host. This command queries database, retrieves information about data files, control files and redo log by querying database. Therefore the database needs to be online for creating DBSNAP. This command can also be used to restore the primary database from the DBSNAP image.

OPTIONS

-P parameter_file
  The parameter_file is the name (full path) of the oracle initialization parameter file. The initialization parameter file can be a PFILE or SPFILE.
-o create The -o create option creates the DBSNAP image of the database. The image is created after placing database in hot backup mode. The DBSNAP image is a valid backup image of database and can be used for database point-in-time recovery.
-o display The -o display option displays the available DBSNAP images of the database including, the name, creation time, and the status of the DBSNAP.
-o clonedb The -o clonedb option creates clone database using the DBSNAP image.
-o remove The -o remove option removes the specified DBSNAP image.
-f The -f option forces a remove.
-o restore The -o restore option restores the PRIMARY database from the previously created DBSNAP image. The PRIMARY database needs to be offline for this operation.
-n dbsnap_name
  The -n dbsnap_name option is used to specify a name for the DBSNAP image. For create operation, if the name is not specified, an automatic DBSNAP name is generated.
-D The -D option is valid for restore operation only. This restores all data files for the database.
-t tablespace
  The -t tablespace option is valid for restore operation only. This restores all data files for the given tablespace.
-p partition_name
  The -p partition_name option is valid for restore operation only. This restores all data files for the given partition name. The partition naming convention is TABLE.PARTITION.
-d data_file
  The -d data_file option is valid for restore operation only. This restores the specified data file.

EXAMPLES

To create a FileSnap for the database (auto generated name), enter:

$ svsdbsnap -o create -P $ORACLE_HOME/dbs/initORCL.ora

DBSNAP by name ORCL_SNAP_2011-04-01:13:29:30 created successfully
Program Completed

To create a named FileSnap for the database, enter:

$ svsdbsnap -o create -P $ORACLE_HOME/dbs/initORCL.ora -n new_snap

DBSNAP by name new_snap created successfully
Program Completed

To display the FileSnap copies of a database, enter:

$ svsdbsnap -o display -P $ORACLE_HOME/dbs/initORCL.ora

NAME                           STATUS  ARCH_DEST
new_snap                       VALID   /oranfsdata2/primary/ARCH
ORCL_SNAP_2011-04-01:13:29:30  VALID   /oranfsdata2/primary/ARCH

To remove a FileSnap copy of the database, enter:

$ svsdbsnap -o remove -P $ORACLE_HOME/dbs/initORCL.ora -n ORCL_SNAP_2011-04-01:13:29:30

To create a clone database from FileSnap copy by the new_snap name, enter:

$ svsdbsnap -o remove -P $ORACLE_HOME/dbs/initORCL.ora -n new_snap -c testdb

Creating Clone database with ORACLE_SID = testdb
Using new_snap
Clone create control file created.
Creating Clone pfile /new11gr2/home/dbs/inittestdb.ora
Clone database is mounted.
Clone Database Opened Successfully
Database CLONE using DBSNAP new_snap created successfully
Program Completed

To restore the primary database from a FileSnap copy, enter: $ svsdbsnap -o restore -D -P $ORACLE_HOME/dbs/initORCL.ora -n new_snap

RESTORING DATABASE
Restoring Datafiles from /oranfsdata1/primary/.DBSNAP/new_snap
Program Completed

SEE ALSO

Symantec VirtualStore Administrator’s Guide


VirtualStore 6.0.1 svsdbsnap (1M)