首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

Oracle设定容许访问数据库的IP

2012-11-11 
Oracle设定允许访问数据库的IPoracle服务器 192.168.1.9 Linuxoracle客户机 192.168.1.6 Windows192.168.1

Oracle设定允许访问数据库的IP

oracle服务器 192.168.1.9 Linux

oracle客户机 192.168.1.6 Windows

192.168.1.6 tnsping 192.168.1.9

Microsoft Windows [版本 5.2.3790](C) 版权所有 1985-2003 Microsoft Corp.C:\Documents and Settings\Administrator>tnsping 192.168.1.9TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 09-11月-2012 10:20:40Copyright (c) 1997, 2010, Oracle.  All rights reserved.已使用的参数文件:C:\oracle11g\product\11.2.0\dbhome_2\NETWORK\ADMIN\sqlnet.ora已使用 EZCONNECT 适配器来解析别名尝试连接 (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.95)(PORTOK (20 毫秒)

?修改192.168.1.9上的sqlnet.ora,添加

tcp.validnode_checking = yestcp.invited_nodes = (192.168.1.9)

之后运行

lsnrctl reload
?

?

然后在192.168.1.6上重新tnsping 192.168.1.9

C:\Documents and Settings\Administrator>tnsping 192.168.1.9TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 09-11月-2012 10:21:07Copyright (c) 1997, 2010, Oracle.  All rights reserved.已使用的参数文件:C:\oracle11g\product\11.2.0\dbhome_2\NETWORK\ADMIN\sqlnet.ora已使用 EZCONNECT 适配器来解析别名尝试连接 (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.95)(PORTTNS-12547: TNS: 丢失连接

?192.168.1.6上的Toad 连192.168.1.9,报错ORA-12537: TNS:connection closed

?

另有tcp.excluded_nodes可用,与tcp.invited_nodes同时存在的话,优先使用tcp.invited_nodes

?

?

当192.168.1.9不在tcp.invited_nodes中时,192.168.1.6上的tomcat报错如下:

2012-11-09 10:54:23,093 WARN [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 17002, SQLState: null2012-11-09 10:54:23,093 ERROR [org.hibernate.util.JDBCExceptionReporter] - Io 异常: Got minus one from a read call

热点排行