出现数据库的连接问题可在命令行下使用 tnsping 服务名 来检查出错原因。
常见错误有:
ORA-12535: TNS: 操作超时
首先关闭防火墙,这是最常见的连接出错原因。
如果仍然不行,检查 tnsnames.ora 文件配置,主要是主机名称是否正确
# TNSNAMES.ORA Network Configuration File: E:oracleora92etworkadminnsnames.ora
# Generated by Oracle configuration tools.
ORCL.DBSE.LAMOST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.1)(PORT = 1521))
)
(CONNECT_DATA =
(SID = orcl)
(SERVER = DEDICATED)
)
) [ 查看全文 ]