 |
|
Manual Recovery of Data Guard Standby Database
Oracle Database Tips by Donald BurlesonDecember 9, 2015
|
Manual Recovery of Data Guard Standby Databases
To start manual recovery of a standby database,
mount the database, and start recovery. During the recovery process,
the archive logs will be read from the default location specified by
the log_archive_dest_n initialization parameter. However, the
location of the archived logs can be specified in the RECOVER
…DATABASE statement to override the location designated by the
log_archive_dest_n parameter.
The following statements start the manual
recovery process. It assumes that the oracle_sid is set correctly
and the initialization file is in the $ORACLE_HOME/dbs directory.
Also, the archived logs are copied from the primary database onto
the log_archive_dest_1 location on the standby site:
STARTUP NOMOUNT;
ALTER DATABASE MOUNT STANDBY DATABASE;
RECOVER STANDBY DATABASE;
 |
|
< Data GuardDonald K. Burleson
Oracle Data GuardChapter 4 - Oracle instance
Administration
Manual Recovery of Standby Databases
If the archive logs are not located in the
directory specified by the log_archive_dest_1 parameter, the
following statement can be used to start recovery reading the log
files from other locations:
RECOVER FROM 'archive_log_location' STANDBY
DATABASE;
Figure 4.1 - Manual
Data Guard Recovery Process
Shutting Down the Standby Database
Before shutting down the standby database,
exclude this standby site from the archival operation on the primary
database. As long as the Oracle instance
is down, the log transfer
service will not attempt to write any new archived log files to this
standby destination. This parameter can be updated dynamically using
the ALTER SYSTEM statement followed by switching a log file on the
primary site.
On the
standby site, ensure that the managed recovery process is not
running. Find the status of the managed recovery process using the
v$managed_standby dynamic view. If the managed recovery process is
running, cancel the recovery before shutting down the database.
If the database is open in read-only mode, find
the active sessions in the database and close the active sessions
before issuing the shutdown statement. The following steps show the
shut down procedure of the standby database:
ALTER SYSTEM SET
LOG_ARCIVE_DEST_STATE_2=DEFER;
ALTER SYSTEM SWITCH LOGFILE;
Select
Process,
State
From
V$MANAGED_STANDBY;
ALTER DATABASE RECOVER MANAGED
Oracle instance
CANCEL;
SHUTDOWN IMMEDIATE
|