今天遇到一个问题,发现主库不往备库发送日志了,检查主库日志状态:
LOG_ARCHIVE_DEST_2 ERROR create archive failed 23:5602
检查报警日志文件当前信息,并没有抱错.
不过,trace当时确实有错:
,检查trace文件:
*** 2016-08-01 23:51:53.736
krsb_bcb_get: Error 272 performing stall for 1 BCB I/O completion check
*** 2016-08-01 23:51:53.736 2961 krsi.c
krsi_dst_fail: dest:2 err:272 force:0 blast:1
kcrrwkx: unknown error:272
*** 2016-08-01 23:52:00.565
FAL[server]: Selected inactive destination; resetting temporarily
Redo shipping client performing standby login
*** 2016-08-01 23:52:00.612 4681 krsu.c
Logged on to standby successfully
Client logon and security negotiation successful!
*** 2016-08-01 23:52:04.874
FAL[server]: FAL archival, archive destination LOG_ARCHIVE_DEST_2 made inactive: File close error
*** 2016-08-01 23:52:04.874 2961 krsi.c
以为是备库空间有问题,检查发现,空间只有100g左右,按理说现在应该没有问题,再把备库日志做了部分处理,主库依然没有向备库写日志,
上网搜文档,看到一篇文档问题和我的一样,重新修改log_archive_dest_state_2=defer,然后,再去修改为enable,就可以.
之后去修改,确实难得一见的lns进程又出现了.
LNS: Standby redo logfile selected for thread 1 sequence 126536 for destination LOG_ARCHIVE_DEST_2
Thu Aug 04 22:53:35 2016
ARC4: Archive log rejected (thread 1 sequence 126230) at host 'STDBYTNS'
FAL[server, ARC4]: FAL archive failed, see trace file.
ARCH: FAL archive failed. Archiver continuing
ORACLE Instance orcl1 - Archival Error. Archiver continuing.
Thu Aug 04 22:55:47 2016
但过了没有多久,看到报警日志文件中,又有了归档错误:
ARC8: Archive log rejected (thread 1 sequence 126234) at host 'STDBYTNS'
FAL[server, ARC8]: FAL archive failed, see trace file.
ARCH: FAL archive failed. Archiver continuing
ORACLE Instance orcl1 - Archival Error. Archiver continuing.
察看日志:
Logged on to standby successfully
Client logon and security negotiation successful!
Error 16401 creating standby archive log file at host 'STDBYTNS'
经检查,发现主库的log_archive_dest_2是这样设置的:
log_archive_dest_2 string service=STDBYTNS NOAFFIRM max_
failure=10 max_connections=5 r
eopen=180 valid_for=(online_lo
gfiles,primary_role) db_unique
_name=stdby
SQL> show parameter fal
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
fal_client string primarytns
fal_server string STDBYTNS
备库的fal设置:
SQL> show parameter fal
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
fal_client string primarytns
fal_server string STDBYTNS
备库和主库一样了,备库的fal_client的值,应该和主库的service=STDBYTNS 一样才对.
SQL> alter system set fal_client=STDBYTNS ;
System altered.
SQL> alter system set fal_server=primarytns;
System altered.
修改后,发现指到主库的连接串primarytns对应的ip为某一个节点,修改为scanip
修改前:
[dbserver1::/u01/app/oracle/product/11.2.0/db_1/network/admin]$cat tnsnames.ora
STDBYTNS =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbserver1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = stdby)
)
)
primarytns =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.202)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
(INSTANCE_NAME = orcl2)
)
)
修改后:
primarytns =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.100)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
发现,修改后,还有这种错误,再查看log_archive_max_processes=10,应该是以前还记得,修改为1个,然后再修改为4个,即可.
如果有条件,最好重起一下主备库.
附/etc/hosts文件:
# public network (eth0)
192.168.10.201 rac01
192.168.10.202 rac02
192.168.10.221 rac03
192.168.10.222 rac04
#private network
180.180.0.1 rac01-priv
180.180.0.2 rac02-priv
180.180.0.3 ra03-priv
180.180.0.4 ra04-priv
#vip
192.168.10.101 rac01-vip
192.168.10.102 rac02-vip
192.168.10.103 rac03-vip
192.168.10.104 rac04-vip
#scan
192.168.10.100 rac-scan
192.168.10.91 dbserver1
|