解决Oracle ORA-12505, TNS:listener does not currently know of SID given in connect(转)

http://anthon-lx.iteye.com/blog/811460

完整的错误信息如下:

java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
192.168.149.128:1521:orcl
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at oracle.eclipse.tools.database.connectivity.db.OracleJDBCConnection.createConn(OracleJDBCConnection.java:199)
at oracle.eclipse.tools.database.connectivity.db.OracleJDBCConnection.createConnection(OracleJDBCConnection.java:149)
at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:104)
at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:53)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:72)
at oracle.eclipse.tools.database.connectivity.db.OracleJDBCConnectionFactory.createConnection(OracleJDBCConnectionFactory.java:42)
at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)
at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:355)
at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)
at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

解决方法:

打开Oracle的 listener.ora 文件:

(oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora)

修改前:

# listener.ora Network Configuration File:
/app/oracle/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 =
/app/oracle/oracle/product/10.2.0/db_1)
     
(PROGRAM = extproc)
    )
  )

LISTENER
=
  (DESCRIPTION_LIST =
    (DESCRIPTION
=
      (ADDRESS = (PROTOCOL = IPC)(KEY =
EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST =
suse10.site)(PORT = 1521))
    )
  )

------------------------------------------------------------------------------------------------------------------------------

修改后:

# listener.ora Network Configuration File: /app/oracle/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 = /app/oracle/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = /app/oracle/oracle/product/10.2.0/db_1)
(SID_NAME = ORCL)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = suse10.site)(PORT = 1521))
)
)

上面的红色文字是增加的内容。 (ORCL -- 是你的SID
数据库名)

重启Oracle的监听器。

问题解决。

解决Oracle ORA-12505, TNS:listener does not currently know of SID
given in connect(转),码迷,mamicode.com

解决Oracle ORA-12505, TNS:listener does not currently know of SID
given in connect(转)

时间: 2024-10-27 10:30:21

解决Oracle ORA-12505, TNS:listener does not currently know of SID given in connect(转)的相关文章

解决Oracle ORA-12505, TNS:listener does not currently know of SID given in connect

完整的错误信息如下: java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: 192.168.149.128:1521:orcl

连接oracle数据库出现:ORA-12505,TNS:listener does not currently know of SID given in connect descriptor

Java使用 jdbc:oracle:thin:@11.1.0.14:1521:orcl 连接oracle数据库出现: ORA-12505,TNS:listener does not currently know of SID given in connect descriptor 错误. 表明服务器上sid为orcl的服务并不存在,可以换个方式直接连接服务:把最后一个冒号换为斜杠.顺利连上数据库 jdbc:oracle:thin:@11.1.0.14:1521/orcl

java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

问题描述: 在使用JDBC连接数据库的时候,报错: java.sql.SQLException: Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptor 解决方案: 经检查,是由于连接的URL写错导致,原URL:"jdbc:oracle:thin:@localhost:152

ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

引子: 本项目在老电脑上用的是oracle10g,换新电脑装的是oracle11g,但运行项目本没有什么关系,本来说创建个用户,用PLSQL手工导入数据,再改几下配置文件即可跑起来--但实际启动中遇到以下异常导致eclipse不能启动: 2016-01-25 11:34:39,694 DEBUG (com.mchange.v2.resourcepool.BasicResourcePool:1831) - An exception occurred while acquiring a poolab

TNS-12505: TNS:listener does not currently know of SID given in connect descriptor

oracle中log.xml报错信息 plsql登录报错信息: 无法请求描述符中的服务 百度了很多,都是一种处理方法,可是对我这里完全不管用,下面是我遇到的两次异常的解决方法: 1.看/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora这个配置文件 # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/ne

ORA-12505, TNS:listener does not currently know of SID given in connect desc .

这种情况一般因为数据库的实例名没有给,只给了数据库的服务名 什么是数据库实例名?  数据库实例名是用于和操作系统进行联系的标识,就是说数据库和操作系统之间的交互用的是数据库实例名.实例名也被写入参数文件中,该参数为instance_name,在winnt平台中,实例名同时也被写入注册表.  数据库名和实例名可以相同也可以不同.  在一般情况下,数据库名和实例名是一对一的关系,但如果在oracle并行服务器架构(即oracle实时应用集群)中,数据库名和实例名是一对多的关系. 这种情况一般因为数据

Oracle中Error while performing database login with the XXXdriver; Listener refused the connection with the following error; ORA-12505,TNS:listener does not currently know of SID given inconnect descrip

欢迎关注大数据和人工智能技术文章发布的微信公众号:清研学堂,在这里你可以学到夜白(作者笔名)精心整理的笔记,让我们每天进步一点点,让优秀成为一种习惯! 一次连接数据库怎么也连接不上,查了多方面资料,终于找到答案,总结 首先应该保证数据库的服务启动 在myeclipse的数据库视图中点 右键->new 弹出database driver的窗口, Driver template选择oracle(thin driver), Driver name 输入oracle   connection URL=j

ORA-12514: TNS:listener does not currently know of service requested in connect

1,登录报错如下: [oracle@oracle_yueworld admin]$ rlwrap sqlplus system/system51@st1 SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 3 16:33:26 2015 Copyright (c) 1982, 2009, Oracle. All rights reserved. ERROR: ORA-12514: TNS:listener does not currently k

listener does not currently know of SID given in connect descriptor

一次连接数据库怎么也连接不上,查了多方面资料,终于找到答案,总结 首先应该保证数据库的服务启动 在myeclipse的数据库视图中点 右键->new 弹出database driver的窗口, Driver template选择oracle(thin driver), Driver name 输入oracle   connection URL=jdbc:oracle:thin:@localhost:1521:oracle 注意localhost:1521:oracle中的oracle是数据库得s