does not currently know of SID given

简介:

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

相关文章
|
6月前
|
Oracle 关系型数据库 Java
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
1276 0
|
Oracle 关系型数据库
Oracle查看sid
Oracle查看sid
96 0
|
SQL
ORA-00030: User session ID does not exist.
同事在Toad里面执行SQL语句时,突然无线网络中断了,让我检查一下具体情况,如下所示(有些信息,用xxx替换,因为是在处理那些历史归档数据,使用的一个特殊用户,所以可以用下面SQL找到对应的会话信息): SQL> SELECT B.
1929 0
|
SQL 测试技术 数据库
0131 ORA-00942 and AUTHID CURRENT_USER
[20180131]ORA-00942 and AUTHID CURRENT_USER.txt --//偶尔写一个存储过程调用一些系统视图.经常遇到一些ORA-00942,有时候很烦.
1155 0
|
安全 Windows Shell
|
SQL Oracle 关系型数据库