ORA-12170:TNS:发生连接超时 [英] ORA-12170: TNS:Connect timeout occurred

查看:673
本文介绍了ORA-12170:TNS:发生连接超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Oracle Toad连接到笔记本电脑中的数据库,但我一直出现此错误:

I was trying to connect to the database here in my laptop using Oracle Toad but I kept on having this error:

ORA-12170:TNS:发生连接超时

ORA-12170: TNS:Connect timeout occurred

为什么我继续出现此错误是什么原因?

What are the possible reasons why I kept on having this error?

我昨天访问了同一个数据库,并且能够访问它.

I accessed the same database yesterday and was able to accessed it.

推荐答案

[收集评论中的答案]

问题是Oracle服务在IP地址上运行,并且主机配置了另一个IP地址.

The problem is that the Oracle service is running on a IP address, and the host is configured with another IP address.

要查看Oracle服务的IP地址,请发出lsnrctl status命令并检查报告的地址(在本例中为127.0.0.1,即本地主机):

To see the IP address of the Oracle service, issue an lsnrctl status command and check the address reported (in this case is 127.0.0.1, the localhost):

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

要查看主机IP地址,请发出ipconfig(在Windows下)或ifconfig(在Linux下)命令.

To see the host IP address, issue the ipconfig (under windows) or ifconfig (under linux) command.

Howewer,在我的安装中,如果在本地主机地址上设置Oracle服务不起作用,则必须设置真实主机IP地址(例如 192.168.10.X ).

Howewer, in my installation, the Oracle service does not work if set on localhost address, I must set the real host IP address (for example 192.168.10.X).

为避免将来出现此问题,请不要使用DHCP分配主机的IP地址,而应使用静态地址.

To avoid this problem in the future, do not use DHCP for assigning an IP address of the host, but use a static one.

这篇关于ORA-12170:TNS:发生连接超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆