具体信息如下: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:yx
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/19 03:17:38
具体信息如下: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:yx
具体信息如下:
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:yx
看这个
SID不正确,跟包没关系
可能不是包的问题 你先用pl/sql链接试试 如果不行的话 吧下面的代码考到相应的文件中:
sqlnet.ora:
# sqlnet.ora Network Configuration File: F:\oracle\product\10.1.0\Db_1\network\admin\sqlnet.ora
# Generated by Oracle configuratio...
全部展开
可能不是包的问题 你先用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))
)
)
)
里面的路径自己改下.
收起
这个和包没有关系,检查你需要调用的数据库名是否在制定机器上存在
oracle的驱动jar包,你的sid写错了~看:http://qingfengjushi1.javaeye.com/blog/698519