搭建最大保护模式的DG,备库报错如下:
***********************************************************************
Fatal NI connect error 12537, connecting to:
(LOCAL=NO)
VERSION INFORMATION:
TNS for Linux: Version 11.2.0.1.0 - Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
Time: 04-DEC-2012 06:36:31
Tracing not turned on.
Tns error struct:
ns main err code: 12537
TNS-12537: TNS:connection closed
ns secondary err code: 12560
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
opiodr aborting process unknown ospid (7156) as a result of ORA-609
同时主库上报错如下:
ARC1 started with pid=22, OS id=10671
ARC1: Archival started
ARC2: Archival started
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
ARC0: Becoming the 'no FAL' ARCH
ARC0: Becoming the 'no SRL' ARCH
ARC3: Becoming the heartbeat ARCH
Mon Dec 03 22:02:44 2012
ORA-16198: LGWR received timedout error from KSR
Errors in file /u02/app/oracle/diag/rdbms/test/test/trace/test_lgwr_10637.trc:
ORA-16198: Timeout incurred on internal channel during remote archival
LGWR: Error 16198 verifying archivelog destination LOG_ARCHIVE_DEST_2
Destination LOG_ARCHIVE_DEST_2 is UNSYNCHRONIZED
LGWR: Continuing...
LGWR: Minimum of 1 applicable standby database required
Errors in file /u02/app/oracle/diag/rdbms/test/test/trace/test_lgwr_10637.trc:
ORA-16072: a minimum of one standby database destination is required
Errors in file /u02/app/oracle/diag/rdbms/test/test/trace/test_lgwr_10637.trc:
ORA-16072: a minimum of one standby database destination is required
LGWR (ospid: 10637): terminating the instance due to error 16072
Instance terminated by LGWR, pid = 10637
Mon Dec 03 22:03:41 2012
检查了主备库的参数文件、监听、TNS,都没什么问题。但是感觉还是跟监听或者TNS文件有关系。
后来google的结果,注释掉DB机器上 /etc/resolve.conf 文件中对 DNS 的解析后,并且把监听和TNS里都写IP地址,不写主机名,重启监听,重启备库,重启主库,好了。
主库上的几个主要参数:
DB_UNIQUE_NAME=test
LOG_ARCHIVE_CONFIG='DG_CONFIG=(test,stdby)'
LOG_ARCHIVE_DEST_1='LOCATION=/archivelog/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=test'
LOG_ARCHIVE_DEST_2='SERVICE=stdby LGWR SYNC AFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stdby'
FAL_SERVER=stdby
FAL_CLIENT=test
DB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/stdby','/u01/app/oracle/oradata/test/'
LOG_FILE_NAME_CONVERT='/archivelog/','/archivelog/'
备库上几个主要参数:
DB_UNIQUE_NAME=stdby
LOG_ARCHIVE_CONFIG='DG_CONFIG=(stdby,test)'
LOG_ARCHIVE_DEST_1='LOCATION=/archivelog/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=stdby'
LOG_ARCHIVE_DEST_2='SERVICE=test LGWR SYNC AFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=test'
FAL_SERVER=test
FAL_CLIENT=stdby
DB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/test','/u01/app/oracle/oradata/stdby/'
LOG_FILE_NAME_CONVERT='/archivelog/','/archivelog/'