To maintain the standby database, the standby database must be mounted and put into standby recovery mode. As redo logs are archived at the primary site, these logs must be transferred to the remote site and applied to the standby database.

To maintain your standby database in recovery mode, perform the following procedures:

  1. Mount (but do not open) the standby database by issuing the following command:
     
    ALTER DATABASE MOUNT STANDBY DATABASE [EXCLUSIVE/PARALLEL]
  2. Transfer the archived redo logs from the primary database to the remote (standby) site.

 
  • Put the standby database in to recovery mode by issuing the following command:
     
    RECOVER [FROM 'location'] STANDBY DATABASE

As the archived logs are generated at the primary site, you must continually transfer and apply them to the standby database. Also, you can only apply logs to the standby database that have been archived on the primary database.

Refreshing the Standby Database Control File

Note that there are administrative operations on the primary database which make changes to the primary database's control file. These changes need to be propagated to the standby database's control file. In this case it is necessary to refresh the standby database's control file from the primary database's modified control file.

To refresh your standby database's control file, perform the following procedures:

  1. Issue the CANCEL command on the standby database to halt the recovery process.

 
  • Issue the following command on the primary database to create a refreshed copy of the control file:
     
    ALTER DATABASE CREATE STANDBY CONTROL FILE AS 'filename'
  • Issue the following command on the primary database to archive the current on-line logs of your primary database:
     
    ALTER SYSTEM ARCHIVE LOG CURRENT
  • Transfer the standby control file and the archived logfiles to the standby database.

 
  • Restart the recovery process on the standby database.

If you use the CREATE CONTROLFILE command on the primary database to change the maximum number of data files, instances, or redo logfile groups, the physical size of the control file changes and then you must refresh the standby database control file.