在sqlnet.ora文件中将tcp.validnode_checking的值设为no。然后重v刹启数据库与服务就可以了。
mos上面解释
oracle e-business suite release 11.5.10 introduced support for the oracle net security feature, tcp.validnode_checking, which is used to prevent unauthorized oracle net access (for example via sql*plus) to the applications database. if a node or pc is not registered, the connection attempt will fail with the error ora-12537: tns: connection closed.
第一种方法
第一种
在sqlnet.ora文件中将tcp.validnode_checking的值设为no。然后重v刹启数据库与服务就可以了。
第二种方法
客户,在使用pl/sql连接数据库的时候提示ora-12537:tns:连接关闭。
查看过程:
1)查看客户端tnsname.ora文件信息如下:# tnsnames.ora network configuration file: e:\oracle\network\admin\tnsnames.ora
# generated by oracle configuration tools.
rhys =
(description =
(address_list =
(address = (protocol = tcp)(host = 192.168.20.1)(port = 1521))
)
(connect_data =
(service_name = test)
)
)
没有问题
2)查看服务器监听状态
[oracle@oracle-one ~]$ lsnrctl status
lsnrctl for linux: version 11.2.0.4.0 - production on 01-nov-2013 11:19:35copyright (c) 1991, 2013, oracle. all rights reserved.
connecting to (description=(address=(protocol=tcp)(host=oracle-one)(port=1521)))
status of the listener
------------------------
alias listener
version tnslsnr for linux: version 11.2.0.4.0 - production
start date 01-nov-2013 11:08:41
uptime 0 days 0 hr. 10 min. 54 sec
trace level off
security on: local os authentication
snmp off
listener parameter file /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
listener log file /opt/app/oracle/diag/tnslsnr/oracle-one/listener/alert/log.xml
listening endpoints summary...
(description=(address=(protocol=tcp)(host=oracle-one)(port=1521)))
(description=(address=(protocol=ipc)(key=extproc1521)))
services summary...
service "test" has 1 instance(s).
instance "test", status ready, has 1 handler(s) for this service...
service "rhysxdb" has 1 instance(s).
instance "test", status ready, has 1 handler(s) for this service...
the command completed successfully
[oracle@oracle-one ~]$ sqlplus / as sysdba
sql*plus: release 11.2.0.4.0 production on fri nov 1 11:19:38 2013copyright (c) 1982, 2013, oracle. all rights reserved.
connected to:
oracle database 11g enterprise edition release 11.2.0.4.0 - 64bit production
with the partitioning, olap, data mining and real application testing options
sql> show parameter service name type value
------------------------------------ ----------- ------------------------------
service_names string test
sql>
正常
3)在客户端使用tnsping:
c:\users\administrator>tnsping rhystns ping utility for 32-bit windows: version 11.2.0.1.0 - production on 01-11月-
2013 11:10:05copyright (c) 1997, 2010, oracle. all rights reserved.已使用的参数文件:
e:\softsetup\oracle_client\oracle_base\network\admin\sqlnet.ora
已使用 tnsnames 适配器来解析别名
尝试连接 (description = (address_list = (address = (protocol = tcp)(host = 192.1
68.20.1)(port = 1521))) (connect_data = (service_name = test)))
tns-12547: tns: 丢失连接
c:\users\administrator>
4)在服务器查看sqlnet.ora文件内容如下:
tcp.validnode_checking=yes
tcp.invited_nodes=(192.168.56.101)
可以看出,正是由于存在tcp.validnode_checking=yes才去检查tcp.invited_nodes定义的节点,将客户端ip地址192.168.56.1加入该文件中即可。
tcp.validnode_checking=yes
tcp.invited_nodes=(192.168.56.101,192.168.56.1)
"sqlnet.ora" 1118l, 32887c written
[oracle@oracle-one admin]$
由于操作的是正在运行的服务器,,因此不能重启该监听,但是reload可以实现。
[oracle@oracle-one admin]$
lsnrctllsnrctl for linux: version 11.2.0.4.0 - production on 01-nov-2013 11:22:57copyright (c) 1991, 2013, oracle.
all rights reserved.welcome to lsnrctl, type "help" for information.
lsnrctl> help
the following operations are available
an asterisk (*) denotes a modifier or extended command:start stop status
services version reload
save_config trace spawn
change_password quit exit
set* show* lsnrctl> reload
connecting to (description=(address=(protocol=tcp)(host=oracle-one)(port=1521)))
the command completed successfully
lsnrctl> exit
5)在客户端测试:
c:\users\administrator>tnsping rhys
tns ping utility for 32-bit windows: version 11.2.0.1.0 - production on 01-11月-
2013 11:23:14copyright (c) 1997, 2010, oracle. all rights reserved.已使用的参数文件:
e:\softsetup\oracle_client\oracle_base\network\admin\sqlnet.ora
已使用 tnsnames 适配器来解析别名
尝试连接 (description = (address_list = (address = (protocol = tcp)(host = 192.1
68.56.101)(port = 1521))) (connect_data = (service_name = rhys)))
ok (10 毫秒)c:\users\administrator>
问题得到解决
本文永久更新链接地址:











