背景,使用dgmgrl / 方式登录,默认使用SYSDG用户
[oracle@rac1-adg admin]$ dgmgrl /
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Tue Apr 26 15:19:35 2022
Version 19.7.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected to "dbadg"
Connected as SYSDG.
DGMGRL> show configuration;
Configuration - db
Protection Mode: MaxPerformance
Members:
dbadg - Primary database
db - Physical standby database
Fast-Start Failover: Disabled
Configuration Status:
SUCCESS (status updated 42 seconds ago)
DGMGRL>
执行主备切换提示ORA-1017
DGMGRL> switchover to db
Performing switchover NOW, please wait...
Operation requires a connection to database "db"
Connecting ...
ORA-01017: invalid username/password; logon denied
Warning: You are no longer connected to ORACLE.
connect to instance "db1" of database "db"
查询MOS文档,
Oracle Database - Enterprise Edition - Version 12.1.0.1 and later
Information in this document applies to any platform.
SYMPTOMS
Switchover from broker using SYSDG user with SYSDG privilege fails with ORA-1017 :
DGMGRL> connect sysdg
Password:
Connected to "Primary"
Connected as SYSDBA.
DGMGRL> switchover to Standby ;
Performing switchover NOW, please wait...
Operation requires a connection to database "Standby"
Connecting ...
ORA-01017: invalid username/password; logon denied
CHANGES
CAUSE
Customer was specifying wrong password for SYSDG user , therefore broker was getting connected as SYSDBA using OS authentication .
DGMGRL> connect sysdg
Password:
Connected to "Primary"
Connected as SYSDBA. >>>>>>>>>>>>>>>>>>>>
Now since broker didn't get password for SYS user ( OS authentication was used) , it was not able to connect to standby database :
DGMGRL> switchover to Standby;
Performing switchover NOW, please wait...
Operation requires a connection to database "Standby"
Connecting ...
ORA-01017: invalid username/password; logon denied
.
SOLUTION
DGMGRL first attempts an AS SYSDG connection, if that fails, it then attempts an AS SYSDBA connection.
Switchover was successful after customer specified the correct password for SYSDG user. After specifying the correct password , broker got connected as SYSDG.
Switchover from broker using SYSDG usr with SYSDG privilege fails with ORA-1017 (Doc ID 2583878.1) |
使用SYSDBA登录,再次切换正常
DGMGRL> connect sys/tiger
Connected to "dbadg"
Connected as SYSDBA.
DGMGRL>
DGMGRL>
DGMGRL> switchover to db
Performing switchover NOW, please wait...
Operation requires a connection to database "db"
Connecting ...
Connected to "db"
Connected as SYSDBA.
New primary database "db" is opening...
Oracle Clusterware is restarting database "dbadg" ...
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to an idle instance.
Connected to "dbadg"
Connected to "dbadg"
Switchover succeeded, new primary is "db"
DGMGRL>