Friday, January 13, 2023

ORA-01017: invalid username/password during dataguard switchover

 If you have configured dataguard broker and you are performing database switchover using DGMGRL command, you should make sure that you connect with dataguard broker using a privileged user and supply password instead of using a forward slash (‘/’) to log  in and initiating the switchover. If you do not follow this procedure, you would be returned ORA-01017 because a privileged session with both primary and physical standby is required to initiate switchover (or failover). Following is an example of receiving the error.

[oracle:MYDBSERVER ~]$ dgmgrl /
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 12 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"...
ORA-01017: invalid username/password; logon denied
 
Warning: You are no longer connected to ORACLE.
 
        connect to instance "MYDBSERVER" of database "STANDBY_DB"

To successfully performing a switchover using dataguard broker, make sure you are connecting to DGMGRL using a privileged account with correct password. The correct privileged user include users with SYSDBA and/or SYSDG rights.

No comments:

Post a Comment

Popular Posts - All Times