Detailed description of RMAN DUPLICATE

Source: Internet
Author: User

DUPLICATE Overview

The rman duplicate command can be used to create a copy database (DuplicateDatabase) based on the backup of the target database (TargetDatabase) while retaining the target database ). This copy can be exactly the same as the target database, or it can only contain a subset of the destination database tablespace. The target site (TargetSite) and replica site (DuplicateSite) can even be on the same machine.

A copy database is a copy of the target database. The following functions can be implemented:

Test the backup and recovery processes. For example, you can copy the production database from Host1 to Host2, and then use the copy database on Host2 to perform restoration and restoration operations. The production database is completely unaffected.

Export data, for example, tables that are intentionally or unintentionally deleted from the production database. Then you can import the data to the production database.

It should be noted that although the Duplicate command can be used to create a replica database, the Standby database and the replica database are different. The standby database is a copy of the primary database. You can update it regularly or irregularly Based on the ArchivedLogs of the primary database. If the master database crashes, you can convert it to the master database. The replica database is not designed for failover, and does not support Standby recovery and failover.

How does rman create database copies?

1. To create a secondary instance, you must be able to connect to the target database through RMAN and start the secondary instance in nomount mode.

2. At least one secondary channel is allocated to the secondary instance. The primary task of replication is to implement it through the secondary channel of the server session started at the replica site. 3. Backup necessary for the Application master database, and create and restore the replica database.

4. The RMAN client can run anywhere, as long as it can connect to the master and slave instances. All the backups and archived redologs that can be accessed by the copy site will be used to create and restore the copy database. If the copy site is not the same as the target site, make sure that the backup path of the copy site is the same as that of the master database. If the path cannot be the same, the copy site must be able to access the backup path.

RMAN automatically performs the following steps as part of the replication operation:

1. Create a control file for the replica database.

2. You need to back up the log files because the Restore data files are not completely restored through incremental backup and Archived RedoLogs.

Restart the auxiliary instance to load the initialization parameter file on the server.

3. After Incomplete recovery, Open the copy database in Resetlogs mode to reconstruct the Online RedoLogs (except in Duplicate... For Standby mode, this operation will not Open the database ).

4. generate a new DBID for the replica database, except for the Duplicate... ForStandby method, which does not create a new unique DBID ).

5. During the creation of a copy, RMAN must not be completely restored because the Online RedoLogs of the target database cannot be backed up and applied to the copy database from time to time. RMAN can recover data from the latest backup of the target database to the replica database at most.

Optional RMAN operations

Oracle provides some optional operations to meet different requirements of different environments, as shown below:

1. the Duplicate command can be run in Catalog or Nocatalog mode.

2. Use the skip readonly clause to SKIP the read-only tablespace. By default, replication contains read-only tablespaces.

3. SKIP the specified TABLESPACE through the skip tablespace clause. Except for SYSTEM tablespace or tablespaces that contain rollback and UNDO.

4. You can create a copy database to a new site. If the directory structure of the new site is the same as that of the master site, you must specify the NOFILENAMECHECK option.

5. copy from a traditional file system to ASM or OMF.

6. By default, the DUPLICATE command creates a copy database using the latest backup of the target data and restores it to the latest consistency point in the archive log. In addition, you can also use the RUN Command block to execute the set until command, or execute the DUPLICATE command with the UNTIL clause to control RMAN to restore the replica database to the specified time point (however, note that the specified time point should not be out of the backup range ).

7. You can register the replica database into a target database in the same recovery directory because the replica database has a new unique DBID.

8. In some cases, you can set the DB_NAME of the replica database to be different from that of the target database DB_NAME. More specifically, if the replica database and target database are in the same OracleHome, the initialization parameters of DB_NAME must be different. If the two are in different OracleHome, The DB_NAME of the replica database must be unique in the OracleHome. This is the real reason why the replica database can be on the same site as the target database.

  • 1
  • 2
  • 3
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.