Saturday, December 24, 2022

ORA-16467: switchover target is not synchronized

 This message clearly tells that standby database that you are trying to swithover to is not fully in sync with the primary database. To solve this problem, you should make sure that all archived redo logs and redo data has fully been applied to the standby database. Sometimes it may appear that standby database is fully in sync, but in fact it is not. If you have not copied the password file from primary to the satandbay after SYS password change on primary database, you may still face this error message during switchover. Always make sure the password files are in sync on all standby site.

Following is a real time example when I faced ORA-16467 during a switchover where standby was fully in sync with primary, yet erro was throwsn.

DGMGRL> show database verbose 'STANDBY_DB'
 
Database - STANDBY_DB
 
  Role:               PHYSICAL STANDBY
  Intended State:     APPLY-ON
  Transport Lag:      0 seconds (computed 0 seconds ago)
    Apply Lag:          0 seconds (computed 0 seconds ago)
  Average Apply Rate: 10.00 KByte/s
  Active Apply Rate:  4.05 MByte/s
  Maximum Apply Rate: 8.50 MByte/s
  Real Time Query:    ON
  Instance(s):
    MYDBSERVER (apply instance)
    STANDBY_DB2
 
  Properties:
    DGConnectIdentifier             = 'STANDBY_DB'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    RedoRoutes                      = ''
    DelayMins                       = '0'
    Binding                         = 'optional'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyLagThreshold               = '0'
    TransportLagThreshold           = '0'
    TransportDisconnectedThreshold  = '30'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'AUTO'
    ArchiveLagTarget                = '900'
    LogArchiveMaxProcesses          = '4'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = ''
    LogFileNameConvert              = '/u03/PRIMARY_DB/onlinelog,
/u03/STANDBY_DB/onlinelog'
    FastStartFailoverTarget         = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    StaticConnectIdentifier(*)
    StandbyArchiveLocation(*)
    AlternateLocation(*)
    LogArchiveTrace(*)
    LogArchiveFormat(*)
    TopWaitEvents(*)
    (*) - Please check specific instance for the property value
 
Database Status:
SUCCESS
 
DGMGRL> switchover to 'STANDBY_DB';
Performing switchover NOW, please wait...
Error: ORA-16467: switchover target is not synchronized
 
Failed.
Unable to switchover, primary database is still "PRIMARY_DB"
 
 
-- Switchover can be verified from SQLPLUS also to see if switchover would succeed
 
[oracle:MYDBSERVER ~]$ sqlplus
 
SQL*Plus: Release 12.1.0.2.0 Production on Thu May 3 06:42:00 2018
 
Copyright (c) 1982, 2014, Oracle.  All rights reserved.
 
 
Enter user-name: sys as sysdba
Enter password:
 
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Advanced Analytics
and Real Application Testing options
 
primary:sys@CDB$ROOT in MYDBSERVER> alter database switchover to STANDBY_DB
verify;
alter database switchover to STANDBY_DB verify
*
ERROR at line 1:
ORA-16467: switchover target is not synchronized

 Although I copied password file form the primary to the standby after SYS password change, yet I faced this error. Probable reason for this error was that remote arch/redo process that logged in from primary to the standby were still connected, and they need to re-login after password file copy was done. We can either restart standby database, or can kill ARC processes. Once I did that, I was able to perform a switchover successfully.

Database Switchover using Dataguard Broker DGMGRL

[oracle:MYDBSERVER]$ dgmgrl sys/************
DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production
 
Copyright (c) 2000, 2013, Oracle. All rights reserved.
 
Welcome to DGMGRL, type "help" for information.
Connected as SYSDG.
DGMGRL> show configuration
 
Configuration - My Dataguard
 
  Protection Mode: MaxPerformance
  Members:
  PRIMARY_DB - Primary database
    STANDBY_DB - Physical standby database
 
Fast-Start Failover: DISABLED
 
Configuration Status:
SUCCESS   (status updated 7 seconds ago)
 
DGMGRL> switchover to 'STANDBY_DB'
Performing switchover NOW, please wait...
Operation requires a connection to instance "MYDBSERVER" on database "STANDBY_DB"
Connecting to instance "MYDBSERVER"...
Connected as SYSDBA.
New primary database "STANDBY_DB" is opening...
Oracle Clusterware is restarting database "PRIMARY_DB" ...
Switchover succeeded, new primary is "STANDBY_DB"
 
 
 
DGMGRL> show configuration
 
Configuration - My Dataguard
 
  Protection Mode: MaxPerformance
  Members:
  STANDBY_DB - Primary database
    PRIMARY_DB - Physical standby database
 
Fast-Start Failover: DISABLED
 
Configuration Status:
SUCCESS   (status updated 24 seconds ago)

No comments:

Post a Comment

Popular Posts - All Times