Oracle® Database Backup and Recovery Advanced User's Guide 10g Release 2 (10.2) Part Number B14191-02 |
|
|
View PDF |
Use the RMAN DUPLICATE
command to create a copy of the target database in another location. The command restores backups of the primary database files and creates a new database.
As part of the duplication, RMAN manages the following:
Restores the target datafiles into the duplicate database and performs incomplete recovery using all available archived log and incremental backups
Opens the duplicate database with the RESETLOGS
option after incomplete recovery to create the online redo logs
Generates a new, unique database identifier for the duplicate database
Note the following features of RMAN duplication. You can:
Skip read-only tablespaces with the SKIP
READONLY
clause (read-only tablespaces are included by default). You can also exclude any tablespace with the SKIP
TABLESPACE
clause so long as it is not the SYSTEM
or SYSAUX
tablespace and does not contain rollback or undo data. If you omit tablespaces, then you can add them later.
Create the duplicate database in a new host. If the same directory structure is available, then you can use the NOFILENAMECHECK
option and reuse the target datafile filenames for the duplicate datafiles.
Create the duplicate database by using the SET
UNTIL
command or UNTIL
clause of the DUPLICATE
command to recover it to a past time. By default, the DUPLICATE
command creates the database using the most recent backups of the target database and then performs recovery to the most recent consistent point contained in the incremental and archived redo log backups.
Use the duplicate database without a recovery catalog.
Register the duplicate database in the same recovery catalog as the target database. This option is possible because the duplicate database receives a new database identifier during duplication. If you copy the target database with operating system utilities, then the database identifier of the copied database remains the same so you cannot register it in the same recovery catalog (unless you change its DBID with the DBNEWID utility, described in Oracle Database Utilities ).
Figure 3-3 illustrates a case of database duplication. In this example, RMAN creates two duplicate database by using one set of datafile backups: one database on the local host and one database on a remote host.
Figure 3-3 Creating a Duplicate Database from Backups
The method you use to duplicate your database depends on whether you are creating your duplicate database on the same or a different host and whether the duplicate directory structure is the same as your target database directory structure. For example, in some cases you can keep the same directory structure and filenames in your duplicate database, while other times you must rename the files.
See Also:
Chapter 13, "Creating and Updating Duplicate Databases with RMAN" to learn how to make a duplicate database
Oracle Database Backup and Recovery Reference for DUPLICATE
command syntax
Oracle Database Utilities to learn how to use the DBNEWID
utility