Perform the following tasks to prepare for standby database creation:

  1. Enable forced logging on the primary database.
  2. Enable archiving on the primary database.
  3. Set all necessary initialization parameters on the primary database.
  4. Create an initialization parameter file for the standby database.
  5. If the primary database is configured to use OMF, then Oracle recommends that the standby database be configured to use OMF, too. To do this, set the DB_CREATE_FILE_DEST and DB_CREATE_ONLINE_LOG_DEST_n initialization parameters to appropriate values. Maintenance and future role transitions are simplified if the same disk group names are used for both the primary and standby databases.
  6. Set the STANDBY_FILE_MANAGEMENT initialization parameter to AUTO.
  7. Configure Oracle Net, as required, to allow connections to the standby database.
  8. Create a remote login password file for the standby database. Use the same password for the SYS account as on the primary database.
  9. Start the standby database instance without mounting the control file.

Perform the following tasks to create the standby database:

  1. If the standby database is going to use ASM, create an ASM instance if one does not already exist on the standby database system.
  2. Use the RMAN BACKUP command to create a backup set that contains a copy of the primary database’s datafiles, archived log files, and a standby control file.
  3. Use the RMAN DUPLICATE … FOR STANDBY command to copy the datafiles, archived redo log files and standby control file in the backup set to the standby database’s storage area.

The DUPLICATE … FOR STANDBY command performs the actual data movement at the standby instance. If the backup set is on tape, the media manager must be configured so that the standby instance can read the backup set. If the backup set is on disk, the backup pieces must be readable by the standby instance, either by making their primary path names available through NFS, or by copying them to the standby system and using RMAN CATALOG BACKUPPIECE command to catalog the backup pieces before restoring them.

After you successfully complete these steps, continue with the steps in Section 3.2.7, to verify the configuration of the physical standby database.

To create a logical standby database, continue with the standby database creation process described in Chapter 4, but with the following modifications:

  1. For a logical standby database, setting the DB_CREATE_FILE_DEST parameter does not force the creation of OMF filenames. However, if this parameter was set on the primary database, it must also be set on the standby database.
  2. After creating a logical standby control file on the primary system, do not use an operating system command to copy this file to the standby system. Instead, use the RMAN RESTORE CONTROLFILE command to restore a copy of the logical standby control file to the standby system.
  3. If the primary database uses OMF files, use RMAN to update the standby database control file to use the new OMF files created on the standby database. To perform this operation, connect only to the standby database, as shown in the following example:

After you successfully complete these steps, continue with the steps in Section 4.2.5 to start, recover, and verify the logical standby database.