SWITCHOVER_STATUS为FAILED DESTINATION故障一例
故障现象:
SQL> select NAME,DATABASE_ROLE,PROTECTION_MODE,SWITCHOVER_STATUS from v$database;
NAME DATABASE_ROLE PROTECTION_MODE SWITCHOVER_STATUS
--------- ---------------- -------------------- --------------------
RMANPRI PRIMARY MAXIMUM PERFORMANCE FAILED DESTINATION
查看告警信息:
***********************************************************************
Fatal NI connect error 12541, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dgdb2)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=rmanstd)(CID=(PROGRAM=oracle)(HOST=dgdb1)(USER=oracle))))
VERSION INFORMATION:
TNS for Linux: Version 11.2.0.4.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
Time: 28-APR-2022 02:39:40
Tracing not turned on.
Tns error struct:
ns main err code: 12541
TNS-12541: TNS:no listener
ns secondary err code: 12560
nt main err code: 511
TNS-00511: No listener
nt secondary err code: 111
nt OS err code: 0
原来是主备库监听没有开启。
解决方法:
[oracle@dgdb1 ~]$ lsnrctl start
[oracle@dgdb2 ~]$ lsnrctl start
再次查询主备库状态:
主库:
SQL> select NAME,DATABASE_ROLE,PROTECTION_MODE,SWITCHOVER_STATUS from v$database;
NAME DATABASE_ROLE PROTECTION_MODE SWITCHOVER_STATUS
--------- ---------------- -------------------- --------------------
RMANPRI PRIMARY MAXIMUM PERFORMANCE TO STANDBY
备库:
SQL> select NAME,DATABASE_ROLE,PROTECTION_MODE,SWITCHOVER_STATUS from v$database;
NAME DATABASE_ROLE PROTECTION_MODE SWITCHOVER_STATUS
--------- ---------------- -------------------- --------------------
RMANPRI PHYSICAL STANDBY MAXIMUM PERFORMANCE NOT ALLOWED
解决。