解决ORA-12170:TNS connect timeout occurred问题
公司服务器周末要加硬盘,周一来后应用连不上了。报错如下 报错: ora-12170:tns connect timeout occurred
第一反应是监听没开:
1. 测试了一下, 连接超时没用ping 通
c:\users\administrator>tnsping brorcl
tns ping utility for 64-bit windows: version 11.2.0.1.0 - production on 15-6月 -2015 09:45:43
copyright (c) 1997, 2010, oracle. all rights reserved.
已使用的参数文件:
d:\oracle\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
已使用 tnsnames 适配器来解析别名
尝试连接 (description = (address = (protocol = tcp)(host = 192.14.147.112)(port = 42525)) (connect_data = (server = dedicated) (service_name = brorcl)))
tns-12535: tns: 操作超时
2. 我登陆到远程服务器上,查看了一下监听的状态
c:\documents and settings\administrator>lsnrctl status
lsnrctl for 64-bit windows: version 11.2.0.1.0 - production on 15-6月 -2015 09:52:54
copyright (c) 1991, 2010, oracle. all rights reserved.
connecting to (description=(address=(protocol=ipc)(key=extproc1521)))
status of the listener
------------------------
alias listener
version tnslsnr for 64-bit windows: version 11.2.0.1.0 - production
start date 15-6月 -2015 09:36:02
uptime 0 days 0 hr. 16 min. 55 sec
trace level off
security on: local os authentication
snmp off
listener parameter file f:\app\administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
listener log file f:\app\administrator\product\11.2.0\dbhome_1\network\log\listener.log
listening endpoints summary...
(description=(address=(protocol=ipc)(pipename=\\.\pipe\extproc1521ipc)))
(description=(address=(protocol=tcp)(host=x3650m3)(port=47512)))
(description=(address=(protocol=tcp)(host=127.0.0.1)(port=47512)))
services summary...
service "bankassist" has 1 instance(s).
instance "brorcl", status ready, has 1 handler(s) for this service...
service "clrextproc" has 1 instance(s).
instance "clrextproc", status unknown, has 1 handler(s) for this service...
service "brorcl" has 2 instance(s).
instance "brorcl", status unknown, has 1 handler(s) for this service...
instance "brorcl", status ready, has 1 handler(s) for this service...
service "brorclxdb" has 1 instance(s).
instance "brorcl", status ready, has 1 handler(s) for this service...
the command completed successfully
看到监听也正常,本地连接进去也很正常。
3. 我想了一下本地能访问远程连接不上是不是防火墙问题,于是我关闭了windows防火墙,果然在远程tnsping 能ping通了;
4. 结果:应该是防火墙有改动了,最后把 服务器防火墙的 ip和端口添加为例外,应用恢复正常了。
总结:
一般遇到tns 的问题通常都是监听或者是网络问题
1. 查看监听是否正常
2. 查看 ip 或端口有没有改动
3. 查看防火墙
以上所述是小编给大家介绍的解决ora-12170:tns connect timeout occurred问题,希望对大家有所帮助!