本机用PL/SQL可以连上, 在其他机器上连本机的时候总提示TNS连接超时.

本文介绍了解决Oracle数据库远程连接出现TNS超时错误的方法。通过检查防火墙设置及端口监听状态,最终成功实现远程访问。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

我在本机装了一个oracle,导了一个DMP, 在本机用PL/SQL可以连上, 在其他机器上连本机的时候总提示TNS连接超时。

 

其它机器tnsping也报同样的错误, 如下:

C:/Documents and Settings/zhujunli>tnsping 87

 

TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 24-6 -

2009 09:39:40

 

Copyright (c) 1997, 2005, Oracle.  All rights reserved.

 

已使用的参数文件:

F:/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora

 

 

已使用 TNSNAMES 适配器来解析别名

Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)

(HOST = 192.168.3.87)(PORT = 1521))) (CONNECT_DATA = (SID = ORCL)))

TNS-12535: TNS: 操作超时

 

其他机器可以ping通。

 

本机用netstat –a查看,可以看到1521端口是打开的:

C:/Documents and Settings/chendaiyuan>netstat -a

 

Active Connections

 

  Proto  Local Address          Foreign Address        State

  TCP    furtherchan:epmap      furtherchan.MediInfo.com.cn:0  LISTENING

  TCP    furtherchan:microsoft-ds  furtherchan.MediInfo.com.cn:0  LISTENING

  TCP    furtherchan:3389       furtherchan.MediInfo.com.cn:0  LISTENING

  TCP    furtherchan:1057       furtherchan.MediInfo.com.cn:0  LISTENING

  TCP    furtherchan:1093       furtherchan.MediInfo.com.cn:0  LISTENING

  TCP    furtherchan:1108       furtherchan.MediInfo.com.cn:0  LISTENING

  TCP    furtherchan:5354       furtherchan.MediInfo.com.cn:0  LISTENING

  TCP    furtherchan:netbios-ssn  furtherchan.MediInfo.com.cn:0  LISTENING

  TCP    furtherchan:1080       192.168.1.121:49112    ESTABLISHED

  TCP    furtherchan:1090       192.168.1.121:49115    ESTABLISHED

  TCP    furtherchan:1105       mediinfo1.mediinfo.com.cn:http  CLOSE_WAIT

  TCP    furtherchan:1403       119.147.18.89:https    CLOSE_WAIT

  TCP    furtherchan:1521       furtherchan.MediInfo.com.cn:0  LISTENING

  TCP    furtherchan:2400       192.168.1.122:3389     ESTABLISHED

  TCP    furtherchan:2406       mediinfo2.mediinfo.com.cn:2572  ESTABLISHED

  TCP    furtherchan:2408       mediinfo2.mediinfo.com.cn:1025  ESTABLISHED

  TCP    furtherchan:2409       mediinfo2.mediinfo.com.cn:1025  ESTABLISHED

  TCP    furtherchan:2410       mediinfo2.mediinfo.com.cn:1025  ESTABLISHED

………

然后telnet  本机IP 1521:

 

C:/Documents and Settings/chenxiao>telnet 192.168.3.87 1521

正在连接到192.168.3.87...不能打开到主机的连接, 在端口 1521: 连接失败

 

想到可能是Windows防火墙造成的, 关闭防火墙后, 其他机器用PL/SQL连接成功!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值