does not currently know of SID given

  1. 云栖社区>
  2. 博客>
  3. 正文

does not currently know of SID given

科技小能手 2017-11-12 18:20:00 浏览523
展开阅读全文

oracle中log.xml报错信息

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

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.23.*.55)(PORT = 1521))

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

    )

  )


ADR_BASE_LISTENER = /u01/app/oracle

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

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

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

[oracle@esboracle55 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.*.* esboracle55

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





可能存在SID的文件

tnsname.ora

listerner,ora

profile

[root@esboracle55 admin]# su - oracle

[oracle@esboracle55 ~]$ 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='[\u@\h \W]\$ ';  # default value



本文转自aaa超超aaa 51CTO博客,原文链接:http://blog.51cto.com/10983441/1881019

网友评论

登录后评论
0/500
评论
科技小能手
+ 关注