java.sql.SQLException: Listener refused the connection with the following error:

这是什么错误啊
2024-12-18 18:20:40
推荐回答(3个)
回答1:

查看listener.ora的内容:
# listener.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)

原来本机的ip发生改变后,就出现了上述问题,改变数据库的监听ip地址:
把(ADDRESS = (PROTOCOL = TCP)(HOST =localhost)(PORT = 1521))
改成
(ADDRESS = (PROTOCOL = TCP)(HOST = 计算机名)(PORT = 1521))

如果不是这个错误 那就是连接数超标 修改连接数

回答2:

sid写错了。
解决办法是要知道数据库的sid,

回答3:

数据库连接异常.具体的不太清楚了.检查一下数据库连接.数据库服务.SQL语句.还有连接驱动.