View Full Version : Adding redo logs to a standby database

Mike Donovan
06-30-2008, 07:47 AM
To add normal redo logs (not standby redo logs) to a primary database, the new redo logs definitions must also be added to the standby database.
Since a standby database does not have redo logs they cannot be added with the same SQL (ALTER DATABASE ADD STANDBY LOGFILE) commands as on the primary database.

The redo log information is held in the controlfile information on the primary database, so we can replace the standby controlfile with a new controlfile to auomatically have the new redo log information available on the standby database.

The steps are as follows:

1) On the primary server: SQL> ALTER DATABASE CREATE STANDBY CONTROLFILE AS 'standby_control.ctl’;

2) Shutdown standby database

3) Copy standby controlfile (standby_control.ctl) to standby server

4) Replace existing controlfiles on the standby server with the new standby controlfile

5) Startup standby database again.

The standby database will now have the new redo log information available.

Arjen Visser
05-05-2010, 11:17 PM
Replacing the controlfile on the standby database can now be done automatically in Dbvisit Standby.

Run the following command:
dbv_functions -Q <database>
Where <database> is your database name.

This will:

Shutdown the standby database,
Recreate the standby controlfile on standby server from the controlfile on the primary server.
Restart the standby database.

Ensure that the standby database is up to date before running this command.