Oracle 11gR2 DataGuard – ORA-16826 Error

Oracle 11gR2 DataGuard – ORA-16826 Error

I was working with Oracle Active DataGuard recently when I hit the ORA-16826 error. This was what I did to resolve it. When I did a show configuraiton in DG broker, I saw the following error.

DGMGRL> show configuration;

Configuration - test_ADG
Protection Mode: MaxAvailability
 Databases:
 ORCL - Primary database
 ORCL_STBY - Physical standby database
 Warning: ORA-16826: apply service state is inconsistent with the DelayMinsproperty
Fast-Start Failover: DISABLED
Configuration Status:
 WARNING

So I used the oerr utility to find out more about the error.

[oracle@standby trace]$ oerr ora 16826

16826, 0000, "apply service state is inconsistent with the DelayMins property"
// *Cause: This warning was caused by one of the following reasons:
// - The apply service was started without specifying the real-time
// apply option or without the NODELAY option when the DelayMins
// property was set to zero.
// - The apply service was started with the real-time apply option or
// with the NODELAY option when the DelayMins property was set to
// a value greater than zero.
// *Action: Reenable the standby database to allow the broker to restart
// the apply service with the apply options that are consistent
// with the specified value of the DelayMins property.

To verify which is the database having the error.

DGMGRL> show database verbose ‘ORCL_STBY’;

Database - ORCL_STBY

Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds
Apply Lag: 0 seconds
Real Time Query: OFF
Instance(s):
ORCL

Properties:
DelayMins = '0'

------Formatted for readability------

Database Status:
WARNING

Check the status on the standby. Note the bold columns. From managed to managed real time apply.

SELECT LOCAL.THREAD#, LOCAL.SEQUENCE# FROM (SELECT THREAD#, SEQUENCE# FROM V$ARCHIVED_LOG WHERE DEST_ID=1) LOCAL WHERE LOCAL.SEQUENCE# NOT IN (SELECT SEQUENCE# FROM V$ARCHIVED_LOG WHERE DEST_ID=2 AND THREAD# = LOCAL.THREAD#);

DEST_NAME RECOVERY_MODE DATABASE_MODE TYPE STATUS DESTINATION
------------------------------ ----------------------- --------------- -------------- ------
LOG_ARCHIVE_DEST_1 IDLE OPEN LOCAL VALID /archive
LOG_ARCHIVE_DEST_2 MANAGED MOUNTED-STANDBY PHYSICAL VALID ORCL_STBY

Change to real time apply mode.

SQL> alter database recover managed standby database cancel;

SQL> alter database recover managed standby database using current logfile disconnect;

DEST_NAME RECOVERY_MODE DATABASE_MODE TYPE STATUS DESTINATION
------------------------------ ----------------------- --------------- -------------- --------- ----------------------------------------
LOG_ARCHIVE_DEST_1 IDLE OPEN LOCAL VALID /archive
LOG_ARCHIVE_DEST_2 MANAGED REAL TIME APPLY MOUNTED-STANDBY PHYSICAL VALID ORCL_STBY

Check that the DataGuard broker configuration is successful now.

DGMGRL> show configuration;

Configuration - test_ADG
Protection Mode: MaxAvailability
 Databases:
 ORCL - Primary database
 ORCL_STBY - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS

Cheers,
Wei Shan

Advertisements
  1. Leave a comment

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: