ORA-12170错误的解决办法
在客户端上面的查询是出现的错误如下
SQL> select * from account_manager@testlink;
select * from account_manager@testlink
*
第 1 行出现错误:
ORA-12170: TNS: 连接超时
[oracle@zeng ~]$ oerr ora 12170
12170, 00000, "TNS:Connect timeout occurred"
// *Cause: The server shut down because connection establishment or
// communication with a client failed to complete within the allotted time
// interval. This may be a result of network or system delays; or this may
// indicate that a malicious client is trying to cause a Denial of Service
// attack on the server.
// *Action: If the error occurred because of a slow network or system,
// reconfigure one or all of the parameters SQLNET.INBOUND_CONNECT_TIMEOUT,
// SQLNET.SEND_TIMEOUT, SQLNET.RECV_TIMEOUT in sqlnet.ora to larger values.
// If a malicious client is suspected, use the address in sqlnet.log to
// identify the source and restrict access. Note that logged addresses may
// not be reliable as they can be forged (e.g. in TCP/IP).
可以看出导致的原因有服务器已经关闭了,网络时延,或者是服务器探测到客服端在进行
拒绝服务攻击等,此处是因为服务器端的防火墙没有把客户端需要连接的端(1521)打开.
先通过关闭远程服务器中的防火墙(当然这不是一个好方法,正确的方法应该是适当的配置防火墙。)我这里简单的关闭防火墙或者执行iptables -F。
再在
客户端上面使用dblink。
[root@zeng ~]# service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
SQL> select * from account_manager@testlink;
ID NAME EMPLOYMENT_DAT
---------- -------------------------------------------------- --------------
SALARY COMMISSION RE
---------- ---------- --
10000 smith 05-2月 -12
10000 3000 N
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26110315/viewspace-717145/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26110315/viewspace-717145/