Showing posts with label Dataguard. Show all posts
Showing posts with label Dataguard. Show all posts

Sunday, May 20, 2012

11gR1 Data Guard: Logs apply on standby is stoped due to currept or incomplete log

Check the logs apply status
Login to standby database (Open read only if not already opened)

SQL> select max(al.sequence#) "Last Seq Recieved", max(lh.sequence#) "Last Seq Applied" from v$archived_log al, v$log_history lh;


Last Seq RecievedLast Seq Applied
64246400

Check the alert_<SID>.log and note that the apply process is stuck while trying to apply log seq. 6441.

Copy log seq. 6441 from primary database to standby and manually try to register the log.

SQL> alter database register physical logfile '<fullpath/filename>';

OR

SQL> alter database register or replace physical logfile '<fullpath/filename>';

If this does not resolve the issue then do the following:

SQL> shutdown immediate
SQL> startup nomount
SQL> alter database mount standby database;
SQL> alter database recover automatic standby database;

Check the alert_<SID>.log and note that the logs apply has been started.
Wait for the recovery to finish and then cancel.

SQL> shutdown immediate
SQL> startup
SQL> alter database recover managed standby database using current logfile disconnect from session;

Check how many archive logs have been recieved and applied by standby database

Login to standby database (Open read only if not already opned)

SQL> select max(al.sequence#) "Last Seq Recieved", max(lh.sequence#) "Last Seq Applied" from v$archived_log al, v$log_history lh;

Last Seq Recieved Last Seq Applied
6424 6424