标签:network 配置文件 product listener currently
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.230.21.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.21.55esboracle55
标红处注释掉,就成功的解决了问题。
可能存在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
TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
标签:network 配置文件 product listener currently
原文地址:http://10983441.blog.51cto.com/10973441/1881019