sqlnet.ora 引數tcp.validnode_checking尷尬

myhuaer發表於2009-06-12

如果要對Oracle 進行IP Check合法性,就必須在Server 的sqlnet.ora中增加引數  tcp.validnode_checking=yes 。但引數tcp.validnode_checking  在sqlnet.ora 中設定後,如果要對Listener進行管理時出現下面錯誤:

[oracle@itc-test9 admin]more sqlnet.ora
tcp.validnode_checking=yes
#tcp.inited_nodes=(10.89.53.90)

[oracle@itc-test9 admin]lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 12-JUN-2009 10:04:53

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Starting /disk/oracle/OCM/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /disk/oracle/OCM/network/admin/listener.ora
Log messages written to /disk/oracle/OCM/network/log/listener.log
Error listening on: (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12560: TNS:protocol adapter error
 TNS-00583: Valid node checking: unable to parse configuration parameters

讓我們做另一個測試:
刪掉sqlnet.ora 中的 tcp.validnode_checking=yes

[oracle@itc-test9 admin]more sqlnet.ora
#tcp.validnode_checking=yes
#tcp.inited_nodes=(10.89.53.90)

[oracle@itc-test9 admin]lsnrctl start ABC

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 12-JUN-2009 10:15:27

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Starting /disk/oracle/OCM/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /disk/oracle/OCM/network/admin/listener.ora
Log messages written to /disk/oracle/OCM/network/log/abc.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.89.53.63)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.89.53.63)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     ABC
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                12-JUN-2009 10:15:27
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /disk/oracle/OCM/network/admin/listener.ora
Listener Log File         /disk/oracle/OCM/network/log/abc.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.89.53.63)(PORT=1521)))
Services Summary...
Service "study" has 1 instance(s).
  Instance "study", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

能正常啟動Listener 。
那我們現在修改 sqlnet.ora 增加引數 tcp.validnode_checking=yes
Client 端一樣能正常連線。

引數tcp.validnode_checking=yes  的作用是為了check sqlnet.ora 中
引數 TCP.INVITED_NODES 中的IP address 合法性的。
如果由一個IP Address 或 Hostname 不能正常訪問,就會導致Listener 不能正常啟動。

進場會有一些Client 的使用者由於機器改變,或關機。這樣的情況下資料庫的Listener 就不能正常開啟,雖然Oracle 資料庫的Lisenter 不是經常的開啟關閉但我認為這個引數設定比較尷尬,在Oracle 9i 大到 11.1.0.6都有這種情況。
我希望在11R2中能將這個引數去掉,確實沒有什麼大用處。

 

metalink 對這種情況給出下列解釋 “This behavior. is by design.”,

我認為這個設計很不好,應該去掉。

如果你看到這個引數,你是否認為合理呢?

Changes

Applied the patch for security alert # 68 or if this is a new installation.  If some hostname changes have occurred on your network, this problem may also appear.

Cause

There is an invalid or unreachable hostname in the TCP.INVITED_NODES list in the sqlnet.ora file.

Oracle no longer  allows  the listener to startup if an invalid hostname or ip address is specified in the invited_nodes list.  The listener will not start if any of the hosts or ip addresses are unreachable.   The only solution to this issue is to ensure that all the hostnames and ip addresses in the invited nodes list are reachable from the host where the listener is starting.

Solution

This behavior. is by design. 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/34596/viewspace-605999/,如需轉載,請註明出處,否則將追究法律責任。

相關文章