Professional Documents
Culture Documents
6.3.1 Starting Redo Apply: Alter Database Recover Managed Standby Database
6.3.1 Starting Redo Apply: Alter Database Recover Managed Standby Database
To start Redo Apply in the foreground, issue the following SQL statement: SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE; If you start a foreground session, control is not returned to the command prompt until recovery is canceled by another session.
To start Redo Apply in the background, include the DISCONNECT keyword on the SQL statement. For example: SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT; This statement starts a detached server process and immediately returns control to the user. While the managed recovery process is performing recovery in the background, the foreground process that issued the RECOVER statement can continue performing other tasks. This does not disconnect the current SQL session.
To open a standby database for read-only access when it is currently shut down:
Start, mount, and open the database for read-only access using the following statement: SQL> STARTUP;
To open a standby database for read-only access when it is currently performing Redo Apply:
1. Cancel Redo Apply: 2. SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; 3. 4. Open the database for read-only access: 5. SQL> ALTER DATABASE OPEN; 6.
You do not need to shut down the instance to open it for read-only access.
To change the standby database from being open for read-only access to performing Redo Apply:
1. Terminate all active user sessions on the standby database. 2. Restart Redo Apply. To start Redo Apply, issue the following statement: 3. SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE 4. 2> DISCONNECT FROM SESSION; 5. To enable real-time apply, include the USING CURRENT LOGFILE clause: SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE 2> USING CURRENT LOGFILE;