Friday, August 20, 2010

Restarting Data Guard - Oracle Data Guard

Hello,
This post explains how to restart Oracle Data Guard

Restarting Data Guard

Pausing Data Guard
On standby database (BBMLDR)

[/opt/oracle/app/oracle]> sqlplus /nolog
SQL*Plus: Release 10.2.0.3.0 - Production on Fri Aug 20 10:26:10 2010
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
SQL > Conn sys/as sysdba
Password -******
Connected
SQL> ALTER DATABASE RECOVER STANDBY DATABASE CANCEL;

Restarting
On standby database (BBMLDR)
sqlplus /as sysdba
SQL> startup nomount; (if database server has been shutdown)
SQL> alter database mount standby database; (if the database server has been shutdown)
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
or
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE;
On Primary database (BBMLPROD)
sqlplus /as sysdba
SQL> Alter system switch logfile;
SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
(above statement archive the current log file and send previous archive log to BBMLDR)
(verify within the alert log of the primary database : vi  $HOME/admin/BBMLPROD/bdump/ALert8.log
e.g. ARC1: Standby redo logfile selected for thread 3 sequence 1487 for destination LOG_ARCHIVE_DEST_2
verify on standby database:
select sequence#, name, first_time, next_time , completion_time applied from v$ARCHIVED_LOG order by first_time;
Check the last set of rows to verify that the first_time, next_time and completion_time columns are at least showing current date. Also, the applied column has YES through the data set except on the last few rows because the log hasn't been applied to the database.

Regards,
Sowmya (OSR)