java.sql.SQLException:Listener refused the connection with the following err 10
具体信息如下:java.sql.SQLException:Listenerrefusedtheconnectionwiththefollowingerror:ORA—12...
具体信息如下:
java.sql.SQLException:Listener refused the connection with the following error:ORA—12505,TNS:Listener dose not currentlly kown of SID given in connect descriptor the connection description used by client was 127.0.0.1:1521:yxerp
我是JAVA连接数据库的 请问要导入哪个JAVA包,怎么导?
谢谢 展开
java.sql.SQLException:Listener refused the connection with the following error:ORA—12505,TNS:Listener dose not currentlly kown of SID given in connect descriptor the connection description used by client was 127.0.0.1:1521:yxerp
我是JAVA连接数据库的 请问要导入哪个JAVA包,怎么导?
谢谢 展开
4个回答
展开全部
可能不是包的问题 你先用pl/sql链接试试 如果不行的话 吧下面的代码考到相应的文件中:
sqlnet.ora:
# sqlnet.ora Network Configuration File: F:\oracle\product\10.1.0\Db_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
tnsnames.ora:
# tnsnames.ora Network Configuration File: F:\oracle\product\10.1.0\Db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
listener.ora:
# listener.ora Network Configuration File: F:\oracle\product\10.1.0\Db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = F:\oracle\product\10.1.0\db_1)
(PROGRAM = extproc)
)
)
(SID_DESC =
(GLOBAL_DBNAME = ORACLE)
(ORACLE_HOME = F:\oracle\product\10.1.0\db_1)
(SID_NAME = orcl)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
)
里面的路径自己改下.
sqlnet.ora:
# sqlnet.ora Network Configuration File: F:\oracle\product\10.1.0\Db_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
tnsnames.ora:
# tnsnames.ora Network Configuration File: F:\oracle\product\10.1.0\Db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
listener.ora:
# listener.ora Network Configuration File: F:\oracle\product\10.1.0\Db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = F:\oracle\product\10.1.0\db_1)
(PROGRAM = extproc)
)
)
(SID_DESC =
(GLOBAL_DBNAME = ORACLE)
(ORACLE_HOME = F:\oracle\product\10.1.0\db_1)
(SID_NAME = orcl)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
)
里面的路径自己改下.
展开全部
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这个和包没有关系,检查你需要调用的数据库名是否在制定机器上存在
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
oracle的驱动jar包,你的sid写错了~看:http://qingfengjushi1.javaeye.com/blog/698519
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询