You can use the dbed_clonedb
command to clone an Oracle instance using mountable and writable Storage Checkpoints to the same or different instance so the instance can coexist. You can also create a clone instance using a Storage Checkpoint that is not mounted.
You have the option to manually or automatically recover the Oracle database when using the dbed_clonedb
command:
-i
option, of the clone instance allows the user to control the degree of recovery by specifying which archive log files are to be replayed.
dbed_clonedb
command, recovers the entire database and replays all of the archive logs. You will not be prompted for any archive log names.
root
.
A clone database takes up as much memory and machine resources as the primary database.
dbed_clonedb
command is used to create a copy of an Oracle database, cloning all existing database files to new locations. This is required when using mountable, writable Storage Checkpoints, where a new Oracle database needs to be started on the same host as an existing database.
dbed_clonedb
command cannot use instant checkpoint to clone a RAC database.
dbed_clonedb
or dbed_vmclonedb
command, the clone database's ORACLE_SID can only be eight characters or less. You will receive an error (ERROR V-81-5713) if the ORACLE_SID is more than eight characters.
dbed_clonedb
(1M) manual page for more information.
To clone an Oracle instance with manual Oracle recovery
$ /opt/VRTS/bin/dbed_clonedb -S NEW9 -m /local/oracle9/1
\
Output resembles the following:
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
path not explicitly specified in init file; assuming
Copying initTEST9i.ora to initNEW9.ora
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
3. /local/oracle9/links/bin/sqlplus /nolog
5. RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE
6. enter the archive log(s) you wish to apply
Press <Return> after you have completed the above steps.
Resetting logs on new database NEW9
Database instance NEW9 is up and running
To clone an Oracle instance with automatic Oracle recovery
$ /opt/VRTS/bin/dbed_clonedb -S NEW9 -m /local/oracle9/1
\
Output resembles the following:
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
path not explicitly specified in init file; assuming
Copying initTEST9i.ora to initNEW9.ora
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
Altering clone database archive log directory
Updating log_archive_dest in clone database init file
Found archive log destination at /testvol
Resetting logs on new database NEW9
Database instance NEW9 is up and running