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

Cloning the Oracle Instance Using dbed_clonedb

You can use the VERITAS Storage Foundation for Oracle dbed_clonedb command to clone an Oracle instance using a Storage Checkpoint. Cloning an existing database using a Storage Checkpoint must be done on the same host.

You have the option to manually or automatically recover the Oracle database when using the dbed_clonedb command:

  • Manual (interactive) recovery, which requires using the -i option, of the clone database allows the user to control the degree of recovery by specifying which archive log files are to be replayed.
  • Automatic (non-interactive) recovery, which is the default usage of the dbed_clonedb command, recovers the entire database and replays all of the archive logs. You will not be prompted for any archive log names.


Prerequisites

  • You must be logged in as the database administrator.
  • Make sure you have enough space and system resources to create a clone database on your system.
  • A clone database takes up as much memory and machine resources as the primary database.
  • You must first create a Storage Checkpoint. (See Creating Storage Checkpoints Using dbed_ckptcreate.)


Usage Notes

  • The dbed_clonedb command is used to create a copy of an Oracle database, cloning all existing database files to new locations.
  • The ORACLE_SID and ORACLE_HOME environment variables must be set to the primary database.
  • It is assumed that the user has a basic understanding of the Oracle recovery process.
  • See the dbed_clonedb(1M) manual page for more information.


Options

-S CLONE_SID

Specifies the name of the new Oracle SID, which will be the name of the new database instance.

-m MOUNT_POINT

Indicates the new mount point of the Storage Checkpoint.

-c CKPT_NAME

Indicates the name of the Storage Checkpoint.

-i

Runs the command in interactive mode where you must respond to prompts by the system. The default mode is non-interactive. (Optional)

-o umount

Shuts down the clone database and unmounts the Storage Checkpoint file system.

-o restartdb

Mounts the Storage Checkpoint file system and starts the clone database. The -o restartdb option will not attempt to recover the clone database.

-d

Used with the -o umount option. If the -d option is specified, the Storage Checkpoint used to create the clone database will be removed along with the clone database.

  To clone an Oracle instance with manual Oracle recovery

Use the dbed_clonedb command as follows:


 $ /opt/VRTS/bin/dbed_clonedb -S NEW9 -m /local/oracle9/1 \
  -c Checkpoint_988813047 -i
 Primary Oracle SID is TEST9i
 New Oracle SID is NEW9
 Checkpoint_988813047 not mounted at /local/oracle9/1
 Mounting Checkpoint_988813047 at /local/oracle9/1
 Using environment-specified parameter file
      /local/oracle9/links/dbs/initTEST9i.ora
 Default Oracle parameter file found:
      /local/oracle9/links/dbs/initTEST9i.ora
 Copying /local/oracle9/links/dbs/initTEST9i.ora
      to /local/oracle9/1/testvol
 Control file 'ora_control2'
      path not explicitly specified in init file; assuming
      ORACLE_HOME/dbs
 
 All redo-log files found
 Copying initTEST9i.ora to initNEW9.ora
      in /local/oracle9/1/testvol
 Altering db_name in initNEW9.ora
 Altering control file locations in initNEW9.ora
 Creating new link for clone database init file
 Creating archive log directory
 
 About to start up new database and begin reconfiguration
 
 Database NEW9 is being reconfigured
 Altering clone database archive log directory
 Updating log_archive_dest in clone database init file
 Found archive log destination at /testvol
 
 The latest archive log(s) must now be applied. To apply
      the logs, open a new window and perform the following steps:
 
 1. copy required archive log(s) from primary to clone:
   primary archive logs in /testvol
   clone archive logs expected in /local/oracle9/1/testvol
 2. ORACLE_SID=NEW9; export ORACLE_SID # sh and ksh, OR
   setenv ORACLE_SID NEW9 #csh
 3. /local/oracle9/links/bin/sqlplus /nolog
 4. CONNECT / AS SYSDBA
 5. RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE
 6. enter the archive log(s) you wish to apply
 7. EXIT
 
 Press <Return> after you have completed the above steps.
 <Return>

 Resetting logs on new database NEW9
 Database instance NEW9 is up and running

  To clone an Oracle instance with automatic Oracle recovery

Use the dbed_clonedb command as follows:


 $ /opt/VRTS/bin/dbed_clonedb -S NEW9 -m /local/oracle9/1 \
  -c Checkpoint_988813047
 Primary Oracle SID is TEST9i
 New Oracle SID is NEW9
 Checkpoint_988813047 not mounted at /local/oracle9/1
 Mounting Checkpoint_988813047 at /local/oracle9/1
 Using environment-specified parameter file
      /local/oracle9/links/dbs/initTEST9i.ora
 Default Oracle parameter file found:
      /local/oracle9/links/dbs/initTEST9i.ora
 Copying /local/oracle9/links/dbs/initTEST9i.ora
      to /local/oracle9/1/testvol
 Control file 'ora_control2'
      path not explicitly specified in init file; assuming
      ORACLE_HOME/dbs
 
 All redo-log files found
 Copying initTEST9i.ora to initNEW9.ora
      in /local/oracle9/1/testvol
 Altering db_name in initNEW9.ora
 Altering control file locations in initNEW9.ora
 Creating new link for clone database init file
 Creating archive log directory

 About to start up new database and begin reconfiguration
 Database NEW9 is being reconfigured
 Starting automatic (full) database recovery
 Shutting down clone database
 Altering clone database archive log directory
 Updating log_archive_dest in clone database init file
 Found archive log destination at /testvol
 Mounting clone database
 Resetting logs on new database NEW9
 Database instance NEW9 is up and running

  To shut down the clone database and unmount the Storage Checkpoint

Use the dbed_clonedb command as follows:


 $ /opt/VRTS/bin/dbed_clonedb -S NEW9 -o umount

  To mount a Storage Checkpoint file system and start the clone database

Use the dbed_clonedb command as follows:


 $ /opt/VRTS/bin/dbed_clonedb -S NEW9 -o restartdb
 Database instance NEW9 is up and running.

  To delete a clone database and the Storage Checkpoint used to create it

Use the dbed_clonedb command as follows:


 $ /opt/VRTS/bin/dbed_clonedb -S NEW9 -o umount -d
 ^ 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