About Duplicating a Database

If your VSS shadow copies are transportable, then you can use these shadow copies to duplicate the primary database.

In this context of this chapter, duplication refers to the creation of a new database out of the shadow copies for a different database. A duplicate database created from shadow copies can either be a nonstandby database or a standby database for use in a Data Guard environment. Note that RMAN duplication, which makes use of the DUPLICATE command, is a different procedure.

Creating a Nonstandby Database from Shadow Copies

Use this procedure to create a nonstandby database from shadow copies.

This section assumes that you are duplicating the database on a host with the same file system structure as the primary database.

To create a nonstandby database from shadow copies:

  1. Restore the database on the new host.
  2. Start a SQL*Plus session on the duplicate database and obtain the DBID. You can query the DBID as follows:
    SELECT DBID FROM V$DATABASE;
    
  3. Shut down the database consistently. You can shut down the database as follows:
    SHUTDOWN;
    
  4. Use the DBNEWID utility to change the DBID.
  5. Open the database.
  6. Start a SQL*Plus session on the duplicate database and query the DBID. You can query the DBID as follows:
    SELECT DBID FROM V$DATABASE;

    See Also:

    Oracle Database Utilities for information about how to use DBNEWID

Creating a Standby Database From Shadow Copies

Use this procedure to create a standby database from shadow copies.

This section assumes that you have created a standby database on a host with the same file system structure as the primary database. This section also assumes that you have read Oracle Data Guard Concepts and Administration and are familiar with standby database creation and maintenance.

To create a standby database from shadow copies:

  1. Restore the database on the standby host.
  2. Start a SQL*Plus session on the new database and a new standby control file must be obtained from primary database. You can create the control file with the SQL statement ALTER DATABASE CREATE STANDBY CONTROLFILE.
  3. Start the instance and mount the standby control file.