4、通过第三步发现主库中无法连接备库,导致报12154错误,通过分析,由于我们在备库中采集的是静态监听方式来同步数据,在服务器启动时,并不会自动启动静态监听,从而导致RAC和备库不是属于连接状态,
5、解决方法先在备库中手动启动静态监听,观察备库是否报错
[oracle@racdg trace]$ lsnrctl status--查询当前监听状态
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 04-MAR-2018 15:52:15
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=racdg)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
[oracle@racdg trace]$ lsnrctl start --启动监听
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 04-MAR-2018 15:52:24
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Starting /oracle/app/oracle/product/11.2.0/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /oracle/app/oracle/product/11.2.0/network/admin/listener.ora
Log messages written to /oracle/app/oracle/diag/tnslsnr/racdg/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=racdg)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=racdg)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 04-MAR-2018 15:52:26
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/oracle/product/11.2.0/network/admin/listener.ora
Listener Log File /oracle/app/oracle/diag/tnslsnr/racdg/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=racdg)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "strac" has 1 instance(s).
Instance "strac", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@racdg trace]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 04-MAR-2018 15:52:47
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=racdg)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 04-MAR-2018 15:52:26
Uptime 0 days 0 hr. 0 min. 21 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/oracle/product/11.2.0/network/admin/listener.ora
Listener Log File /oracle/app/oracle/diag/tnslsnr/racdg/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=racdg)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "strac" has 1 instance(s).
Instance "strac", status UNKNOWN, has 1 handler(s) for this service...--显示为静态监听
The command completed successfully
6、此时再次查询DG的状态,发现有归档日志传输过到DG库中
SQL> SELECT MESSAGE FROM V$DATAGUARD_STATUS;
MESSAGE
ARC0: Archival started
ARC1: Archival started
ARC2: Archival started
ARC1: Becoming the 'no FAL' ARCH
ARC2: Becoming the heartbeat ARCH
ARC2: Becoming the active heartbeat ARCH
ARC3: Archival started
Attempt to start background Managed Standby Recovery process
MRP0: Background Managed Standby Recovery process started
Managed Standby Recovery not using Real Time Apply
Media Recovery Waiting for thread 1 sequence 161
MESSAGE
Fetching gap sequence in thread 1, gap sequence 161-161
RFS[1]: Assigned to RFS process 10600
Media Recovery Log /archlog/STRAC/archivelog/2018_03_04/o1_mf_1_161f9q9gtp0.ar
c
Media Recovery Log /archlog/STRAC/archivelog/2018_03_02/o1_mf_2_99f9kzzhq2.arc
Media Recovery Log /archlog/STRAC/archivelog/2018_03_02/o1_mf_2_100f9l00mnz.ar
c
Media Recovery Waiting for thread 1 sequence 162
Fetching gap sequence in thread 1, gap sequence 162-162
MESSAGE
RFS[2]: Assigned to RFS process 10604
Media Recovery Log /archlog/STRAC/archivelog/2018_03_04/o1_mf_1_162f9q9h3vb.ar
c