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/network/admin/listener.ora

# Generated by Oracle configuration tools.

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = 10.230.21.55)(PORT = 1521))

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

)

)

ADR_BASE_LISTENER = /u01/app/oracle

标红处之前是localhost,可是主机名已经不是这个了,就改成主机IP或现在的主机名,成功处理问题。

2、上面处理方法已经不管用,报错信息还是一样,

最终发现是/etc/hosts这个配置文件

[[email protected] admin]$ cat /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

#192.168.67.236 localhost.localdomain

#127.0.0.1esboracle55

10.230.21.55esboracle55

标红处注释掉,就成功的解决了问题。

可能存在SID的文件

tnsname.ora

listerner,ora

profile

[[email protected] admin]# su - oracle

[[email protected] ~]$ cat .bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

#use_for_oracle

export ORACLE_BASE=/u01/app/oracle

export ORACLE_SID=orcl

#export ogg=/oracle/ogg

#export JAVA_HOME=/ora_bck/java/jdk1.6.0_32

#export CLASSPATH=/lib/dt.jar:/lib/tools.jar

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1

export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/usr/ccs/bin:/bin

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export ORACLE_TERM=xterm

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/lib64:/usr/lib64

export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"

export NLS_LANG=AMERICAN_AMERICA.AL32UTF8;

export PS1=‘[\[email protected]\h \W]\$ ‘;  # default value

时间: 2024-08-10 18:13:57

TNS-12505: TNS:listener does not currently know of SID given in connect descriptor的相关文章

连接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

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

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

解决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 th

解决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

ORA 12505 Listener does not currently know of SID given in connection descriptor

一..和以往一样新建完一个Android项目之后,会报android.support.v4....或者V7找不到的错误. 这是因为这两个包在另一个附带的项目(android-support-v7-appcompat)下. 解决办法:右键你刚才建 的项目〉Properties>Android 在下边 点Add  然后把android-support-v7-appcompat添加上就好了. 二.从别的地方直接Import的项目也会报这个错...若是eclipse已经有android-support-

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

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

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

1. 环境: oracle 11g x64 2. sqlplus 可以正常使用,PLSQLDeveloper登录出错如下: 2. 解决方法:参考http://www.linuxidc.com/Linux/2012-09/69678.htm