Oracle - ORA-12505, TNS:listener does not currently know of SID given in connect descriptor 解决
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)
原因/解决方法:1、分析Oracle的启动过程,没有发现问题,其启动信息如下:oracle@suse10:~> lsnrctl start LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 17-APR-2010 17:05:04 Copyright (c) 1991, 2005, Oracle. All rights reserved. Starting /app/oracle/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /app/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /app/oracle/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=suse10.site)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 17-APR-2010 17:05:06
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /app/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /app/oracle/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=suse10.site)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
oracle@suse10:~> sqlplus / as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Sat Apr 17 17:05:07 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance. SQL> startup
ORACLE instance started. Total System Global Area 436207616 bytes
Fixed Size 1219832 bytes
Variable Size 125829896 bytes
Database Buffers 301989888 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.2、在sqlplus中查询数据,同样正常:
oracle@suse10:/app/oracle/oracle/product/10.2.0/db_1/network/admin> sqlplus servicemn/servicemn SQL*Plus: Release 10.2.0.1.0 - Production on Sat Apr 17 18:56:50 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options SQL> select abstract_service_code,status,perdefined from abstract_service; ABSTRACT_SERVICE_CODE STATUS PERDEFINED
--------------------- ---------- ----------
1001 1 1
1002 1 0
7777 5 0
2002 1 0
4.4444E+15 5 0
8888 5 0
1003 5 0
2001 1 0
1109 5 0
1 5 0
9999 5 0
11 rows selected.看来,数据库是没有问题的,那问题应该出在了监听器上。 3、打开Oracle的 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))
)
)修改它的 SID_LIST_LISTENER 中的内容,修改后的内容如下:# 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))
)
)上面的粗体文字是增加的内容。 4、重启Oracle的监听器。
Oracle - ORA-12505, TNS:listener does not currently know of SID given in connect descriptor 解决的更多相关文章
- Connection to Oracle failed. [66000][12505] Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor .
我安装了Oracle数据库,默认的数据库用户名是system,密码口令是安装过程中你自己设置的.可以先使用命令框,输入 sqlplus system; 然后再输入密码即可. 然后我的数据库连接工具使用 ...
- 连接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 currentl ...
- ORA-12505, TNS:listener does not currently know of SID given in connect descriptor (二)
异常及解决 在连接sqldeveloper出现的异常信息 在ORA-12505, TNS:listener does not currently know of SID given in connec ...
- ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
引子: 本项目在老电脑上用的是oracle10g,换新电脑装的是oracle11g,但运行项目本没有什么关系,本来说创建个用户,用PLSQL手工导入数据,再改几下配置文件即可跑起来--但实际启动中遇到 ...
- 关于ORA-12505, TNS:listener does not currently know of SID given in connect descriptor报错问题解决办法
1.本机tnsnames.ora 配置如下 test4= (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.1 ...
- 项目连接oracle报错:listener does not currently know of SID given in connect descriptor
今天练习用IDEA搭建了一个ssm框架,数据库是oracle,在执行mybatis-generator时,一直报错listener does not currently know of SID giv ...
- 66000][12505] Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor oracle.n et.ns.NetException: Listener refuse
新装的idea开发工具后连接数据库出现如题所示错误. 1.网上搜了不少的文章,没有解决我的问题.后来细心看了一下url: 一开始url是这样子的. jdbc:oracle:thin:@:s21_pdb ...
- 【java】ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
如果是负载均衡,则 jdbc.url=jdbc:oracle:thin:@(description=(address_list= (address=(host=XX.XXX.X.XX) (protoc ...
- ORA_12514:TNS:listener does not currently know of service requested in connect descriptor
问题描述 ORA_12514:TNS:listener does not currently know of service requested in connect descriptor 解决方式 ...
随机推荐
- linux epoll模型使用注意点
1.默认使用的水平触发方式会多次触发回调函数,但是事实上这时并不需要回调,会浪费系统性能,就是在注册
- KnockoutJS 3.X API 第四章 数据绑定(1) 文本及样式绑定
目录 本节将介绍六种文本绑定方式: visible绑定 text绑定 html绑定 css绑定 style绑定 attr绑定 可见文本绑定(visible) 使用visible绑定,来控制DOM元素的 ...
- KnockoutJS 3.X API 第四章 表单绑定(11) options绑定
目的 options绑定主要用于下拉列表中(即<select>元素)或多选列表(例如,<select size='6'>).此绑定不能与除<select>元素之外的 ...
- Flume官方文档翻译——Flume 1.7.0 User Guide (unreleased version)(一)
Flume 1.7.0 User Guide Introduction(简介) Overview(综述) System Requirements(系统需求) Architecture(架构) Data ...
- Unsafe的应用
要想把java并发包学好,并明白其底层的设计原理,Unsafe类你不能不去研究一下.下面介绍一下Unsafe类的功能以及它在JDK中的应用. 一.分配内存和释放内存 功能:类中提供的3个本地方法all ...
- 【Pig源码分析】谈谈Pig的数据模型
1. 数据模型 Schema Pig Latin表达式操作的是relation,FILTER.FOREACH.GROUP.SPLIT等关系操作符所操作的relation就是bag,bag为tuple的 ...
- html/css基础篇——html代码编写过程中的几个警惕点
本文想说的警惕点与浏览器兼容无关,主要是几个本人在项目中遇到的几个小问题的总结,问题虽小,但是却有时很困扰人,在此记录一下,如果后期有此类问题会持续添加到这里. 1.内联标签之间的空格 正常情况下书写 ...
- 理解SQL Server是如何执行查询的 (1/3)
查询执行的总图: 根据总图的流程,详细说明每个部分: 1. 请求(Request) SQL Server是C/S架构的平台.与它交互的唯一方式就是发送包含数据库命令的请求.应用程序和数据库之前的通信协 ...
- CSS 居中方法集锦
记录收集纯CSS层面实现的水平.垂直居中方法可用于块级.行内快.内联元素以及文字图片等. 水平或垂直居中 1.1 text-align 1.2 margin 1.3 line-height 1.4 p ...
- .Net语言 APP开发平台——Smobiler学习日志:Poplist控件在APP中的应用场景以及代码
最前面的话:Smobiler是一个在VS环境中使用.Net语言来开发APP的开发平台,也许比Xamarin更方便 一.目标样式 我们要实现上图中的效果,需要如下的操作: 1.从工具栏上的”Smobil ...
上面的粗体文字是增加的内容。
4、重启Oracle的监听器。