DataGuard - 备用数据库方案中举足轻重的一个操作系统参数

如果TCP/IP KeepAlive 设置过长,那么在Pirmary意外down机之后,Standby上的partially filled archived log 无法被正常register,会报ORA-332错误。

修改操作系统的TCP/IP KeepAlive值就可以了。

以下总结了几种操作系统中修改TCP/IP KeepAlive值的方法。

Problem Description: 
How to implement Solaris TCP/IP KeepAlive mechanism.

To change the keepalive interval on Solaris (SPARC) servers you have to use the maintenance command ndd.

 It is not possible to configure this information in the /etc/system file. 
To find out the current value of the TCP/IP keepalive interval use the following command:    
 ndd /dev/tcp tcp_keepalive_interval 
The value returned is in units of milliseconds, eg.     
% ndd /dev/tcp tcp_keepalive_interval    
Which in this case works out to 2 hours. 
To change this value you use ndd with the '-set' flag, eg:     
 # ndd -set /dev/tcp tcp_keepalive_interval 1200000

Problem Description: 
How to implement Windows NT TCP/IP KeepAlive mechanism.
Problem Explanation: 
It is important to implement the Windows NT TCP/IP KeepAlive mechanism  to prevent dead sessions from accumulating when SQL*Net/Net8 Dead Connection Detection [SQLNET.EXPIRE_TIME] is set to zero or unset in the SQLNET.ORA file. 

Solution Description: 
To implement the Windows NT TCP/IP KeepAlive mechanism, click:  
   Start > Run > Regedit.exe 
In the Registry,navigate to:
   Edit - Add value: KeepAliveTime (REG_DWORD)
      Decimal  -> 180000 (for example = 3 minutes)
   The parameter will not be present the first time you modify the parameter,
   so you will need to add it. The default value is 2 hours.

Problem Description: 
How to implement Linux TCP/IP KeepAlive mechanism.

# echo 120 > /proc/sys/net/ipv4/tcp_keepalive_time

想对作者说点什么? 我来说一句