Home > Data Guard > Fix Managed Standby Recovery (ora_mrp0_qtprod) can’t automatically apply archived logs

Fix Managed Standby Recovery (ora_mrp0_qtprod) can’t automatically apply archived logs

1. Standby database can’t automatically apply archive logs when it is started by the following command

SQL> startup nomount

SQL>  alter database mount standby database

SQL> alter database recover managed standby database through all switchover disconnect parallel 1;

2. The standby database alert.log shows the messages

alter database mount standby database
Thu Jun 23 14:02:22 2011
Successful mount of redo thread 1, with mount id 2705790826
Thu Jun 23 14:02:22 2011
Standby Database mounted.
Completed: alter database mount standby database
Thu Jun 23 14:02:36 2011
alter database recover managed standby database through all switchover disconnect parallel 1
Attempt to start background Managed Standby Recovery process
MRP0 started with pid=14
MRP0: Background Managed Standby Recovery process started
Media Recovery Waiting for thread 1 seq# 47075 <– waiting for archive log 47075
Thu Jun 23 14:02:42 2011
Completed: alter database recover managed standby database th
Thu Jun 23 14:04:17 2011
RFS: Successfully opened standby logfile 11: ‘/qt/oradata/qtprod/stby_redo01.log’
Thu Jun 23 14:04:26 2011
Fetching gap sequence for thread 1, gap sequence 47075-47077 <– try to get archive log 47075 to 47077
Trying FAL server: yck_qtprod
Thu Jun 23 14:05:34 2011
ARC1: Evaluating archive   log 11 thread 1 sequence 47079
ARC1: Beginning to archive log 11 thread 1 sequence 47079 <– archive log 47079 received

( it shows that the Managed Standby Recovery process still can’t apply the archive and is waiting for 47075 since the archive log 47079 has been received)

3. Query v$archive_gap, it shows

SQL> select low_sequence#, high_sequence# from  v$archive_gap;

LOW_SEQUENCE# HIGH_SEQUENCE#
————- ————–
47075          47077

4. Manually transfer the archive log 47075 to 47077 from mater database to standby database

5. Register the archived logs on the standby database

SQL> alter database register physical logfile ‘/qt/admin/qtprod/archive/qtprod_47075.arc’;
Database altered.
SQL> alter database register physical logfile ‘/qt/admin/qtprod/archive/qtprod_47076.arc’;
Database altered.
SQL> alter database register physical logfile ‘/qt/admin/qtprod/archive/qtprod_47077.arc’;
Database altered.
SQL> select low_sequence#, high_sequence# from  v$archive_gap;
no rows selected <– there is no gap now

6. Check the standby database  alert.log, it shows

alter database register physical logfile ‘/qt/admin/qtprod/archive/qtprod_47075.arc’ <– register archive logs
Thu Jun 23 14:19:29 2011
There are 1 logfiles specified.
ALTER DATABASE REGISTER [PHYSICAL] LOGFILE
Completed: alter database register physical logfile ‘/qt/admi
Thu Jun 23 14:19:41 2011
Media Recovery Log /qt/admin/qtprod/archive/qtprod_47075.arc
Media Recovery Waiting for thread 1 seq# 47076
Fetching gap sequence for thread 1, gap sequence 47076-47077
Trying FAL server: yck_qtprod
Thu Jun 23 14:19:55 2011
alter database register physical logfile ‘/qt/admin/qtprod/archive/qtprod_47076.arc’ <– register archive logs
Thu Jun 23 14:19:55 2011
There are 1 logfiles specified.
ALTER DATABASE REGISTER [PHYSICAL] LOGFILE
Completed: alter database register physical logfile ‘/qt/admi
Thu Jun 23 14:19:57 2011
Media Recovery Log /qt/admin/qtprod/archive/qtprod_47076.arc
Media Recovery Waiting for thread 1 seq# 47077
Fetching gap sequence for thread 1, gap sequence 47077-47077
Trying FAL server: yck_qtprod
Thu Jun 23 14:20:11 2011
alter database register physical logfile ‘/qt/admin/qtprod/archive/qtprod_47077.arc’ <– register archive logs
Thu Jun 23 14:20:11 2011
There are 1 logfiles specified.
ALTER DATABASE REGISTER [PHYSICAL] LOGFILE
Completed: alter database register physical logfile ‘/qt/admi
Thu Jun 23 14:20:12 2011
Media Recovery Log /qt/admin/qtprod/archive/qtprod_47077.arc <– after archive gap is fixed, the Manged
Media Recovery Log /qt/admin/qtprod/archive/qtprod_47078.arc  — Recovery Process immediately apply all
Media Recovery Log /qt/admin/qtprod/archive/qtprod_47079.arc — rest archived logs >
Media Recovery Log /qt/admin/qtprod/archive/qtprod_47080.arc
Media Recovery Waiting for thread 1 seq# 47081 (in transit)
?Thu Jun 23 14:20:46 2011
ARC0: Evaluating archive   log 11 thread 1 sequence 47081
ARC0: Beginning to archive log 11 thread 1 sequence 47081
Creating archive destination LOG_ARCHIVE_DEST_1: ‘/qt/admin/qtprod/archive/qtprod_47081.arc’
ARC0: Completed archiving  log 11 thread 1 sequence 47081
Thu Jun 23 14:20:46 2011
RFS: Successfully opened standby logfile 11: ‘/qt/oradata/qtprod/stby_redo01.log’
Thu Jun 23 14:20:46 2011
ARC0: Cannot archive online log based on backup controlfile
Thu Jun 23 14:20:57 2011
Media Recovery Log /qt/admin/qtprod/archive/qtprod_47081.arc
Media Recovery Waiting for thread 1 seq# 47082 (in transit)
Thu Jun 23 14:21:20 2011
ARC0: Evaluating archive   log 11 thread 1 sequence 47082
ARC0: Beginning to archive log 11 thread 1 sequence 47082
Creating archive destination LOG_ARCHIVE_DEST_1: ‘/qt/admin/qtprod/archive/qtprod_47082.arc’
ARC0: Completed archiving  log 11 thread 1 sequence 47082
Thu Jun 23 14:21:20 2011
RFS: Successfully opened standby logfile 11: ‘/qt/oradata/qtprod/stby_redo01.log’
Thu Jun 23 14:21:20 2011
ARC0: Cannot archive online log based on backup controlfile <– this is normal message
Thu Jun 23 14:21:27 2011
Media Recovery Log /qt/admin/qtprod/archive/qtprod_47082.arc
Media Recovery Waiting for thread 1 seq# 47083 (in transit) <– it shows that Managed Standby Recovery process automatically apply archivelog.

Advertisements
Categories: Data Guard
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: