ORA-12170: TNS:Connect timeout occurred(ORA-12170: TNS:Connect 超时发生)
问题描述
我尝试使用 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:Connect 超时发生
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.
但是,在我的安装中,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:Connect 超时发生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:ORA-12170: TNS:Connect 超时发生


- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 更改自动增量起始编号? 2021-01-01
- SQL 临时表问题 2022-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01