关于oracle连接超时的问题
我今天遇到这种情况,头都想大了,还是没解决,,真是郁闷啊。。。
情况:
有两台电脑A和B,在同一个局域网内,但在不同的城市。这两台电脑都装了oracle9i,现两台电脑运行都正常,ping对方也都ping的通。现在B电脑上访问A电脑上的数据库,用tnspingA的数据库服务名,结果连接超时?(用户名,密码,数据库服务名都正确)无论是用sqlplus还是pl/sql工具还是net manager测试,都显示连接超时??你们说会是啥原因呢
问题点数:20、回复次数:3Top
1 楼wffffc(飞)回复于 2006-03-02 20:53:49 得分 0
看看ttl值是多少?Top
2 楼cenlmmx(学海无涯苦作舟)回复于 2006-03-02 22:02:49 得分 0
有防火墙先关了再试,还不行如果又是windows系统的话看看下面说明.
If you enable connects through port 1521 on your firewall, you will see that after the REDIRECT packket has been sent to the client, the connectio will fail because the "random port" is not enabled in hte firewall. The REDIRECT port gets generated entirely at random. You cannot enable access through multiple ports in the firewall as you have no idea which ports will get allocated.
To workaround this problem there are several options:
1. Configure the firewall to limit IP addresses rather than port numbers. This is not a very secure option.
2. Use Connection Manager so the TNS CONNECT following the REDIRECT happens on the server side of the firewall.
3. If you are on Oracle 8 on Windows NT, you can use a WINSOCK V2 API feature called Shared Sockets. This allows a socket to be shared (or passed) between multiple processes. To use this functionality in a single Oracle Home environment, set USE_SHARED_SOCKET=TRUE in the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE section of the registry. If you are using Multiple Oracle Homes, change to the desired Oracle8 Home and view the oracle key file in ORACLE_HOME/BIN to find which registry key to add USE_SHARED_SOCKET to.
Please Note that as WINSOCK V2 allows a socket to be shared between multiple processes, you cannot restart the listener without takeing the database down first.
也就是在注册表set USE_SHARED_SOCKET=TRUE (HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE)Top
3 楼laowai310(杭州)回复于 2006-03-09 19:41:00 得分 0
呵呵,查出来了,是远程电脑A上装了防火墙了,关了就OK了...
谢谢各位!!!Top




