Oracle 12C dataguard 切换中报错 ORA-01017: invalid username/password; logon denied

DGMGRL> switchover to ORCL2
Performing switchover NOW, please wait...
Operation requires a connection to instance "orcl2" on database "orcl2"
Connecting to instance "orcl2"...
ORA-01017: invalid username/password; logon denied

Warning: You are no longer connected to ORACLE.

    connect to instance "orcl2" of database "orcl2"
 

解决方法;

DGMGRL>  show database verbose ORCL2

检查

StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node3)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl2_DGMGRL)(INSTANCE_NAME=orcl2)(SERVER=DEDICATED)))'

由于之前在listener.ora文件中配置过静态监听,所以没有必要再另外配置orcl2_DGMGRL,可以在DGMGRL执行如下命令更改

edit database orcl2 set property StaticConnectIdentifier='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node3)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl2)(INSTANCE_NAME=orcl2)(SERVER=DEDICATED)))'

 edit database orcl set property StaticConnectIdentifier='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)(INSTANCE_NAME=orcl)(SERVER=DEDICATED)))'

修改完后直接执行切换测试正常

DGMGRL> switchover to orcl

DGMGRL> switchover to orcl
Performing switchover NOW, please wait...
Operation requires a connection to instance "orcl" on database "orcl"
Connecting to instance "orcl"...
Connected as SYSDBA.
New primary database "orcl" is opening...
Operation requires start up of instance "orcl2" on database "orcl2"
Starting instance "orcl2"...
ORACLE instance started.
Database mounted.
Database opened.
Switchover succeeded, new primary is "orcl"
 

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页