侦听器无法启动 [英] Listener failed to start

查看:260
本文介绍了侦听器无法启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VMWare Player上有一个虚拟机:Linux Centos上的Oracle 11g。
因为我没有使用它2年,我不记得几乎任何东西,当我尝试启动数据库时,它说监听器是关闭的,当我尝试启动监听器,它说:

I have a virtual Machine on VMWare Player: Oracle 11g on Linux Centos. Since I haven't used it for 2 years, I don't remember almost anything,and when I try to startup the db it says listener is down, and when I try to start listener it says:

TNSLSNR for Linux Version 11.2. 0.1.0 - Production
System Parameter file is /oracle/product/11gR2/network/admin/listener.ora
Log messages written to /oracle/diag/tnslsnr/srvlinux/listener/alert/log.xml
Error listening on: (ADRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12542: TNS:address already in use
 TNS-12560: TNS:protocol adater error
  TNS-00512: Address already in use
   Linux Error: 98: Address already in use

我需要配置什么?提前感谢。

What do I have to configure exactly? Thanks in advance.

编辑:

netstat -tulpn | grep:1521

netstat -tulpn | grep :1521

tcp 0 0 :::1521 :::* LIST 
EN 3369/tnslsnr

编辑:

lsnrctl status

lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 11-DEC-2012 16:09:54

sqlplus / as sysdba

sqlplus / as sysdba

ERROR:
ORA-12162: TNS:net service name is incorrectly specified


推荐答案

ORA-12162通常意味着你没有 ORACLE_SID 设置 - 不是它的错误,而是它根本没有设置,已导出(取决于您的shell)。这不会告诉你关于数据库是否已启动,并且不暗示侦听器已关闭 - 所以不知道你是否有不同的消息从不同的连接尝试。显然,监听器在端口1521上,从您添加到问题的详细信息。

ORA-12162 usually means you don't have ORACLE_SID set - not that it's wrong, but it hasn't been set at all, or has not been exported (depending on your shell). That doesn't tell you anything about whether the database is up, and doesn't imply the listener is down - so don't know if you got a different message from a different connection attempt. Clearly the listener is up on port 1521, from the details you added to the question.

如果您使用Bourne-y(sh,ksh,bash等) )您需要设置并导出 ORACLE_SID

If you're using something Bourne-y (sh, ksh, bash etc.) you need to set and export your ORACLE_SID:

export ORACLE_SID=my_sid

如果你不记得SID,你可以去 grep -ef | grep ora_pmon _ ;如果显示任何内容,则SID是进程名称的结尾,并且数据库已启动。如果它不然然后看看 lsnrctl status 的输出,看看是否有任何注册,或查看 $ ORACLE_HOME / dbs

If you can't remember the SID you can go grep -ef | grep ora_pmon_; if that shows anything then the SID is the end of the process name, and the database is up. If it doesn't then look at the output of lsnrctl status and see if anything is registered, or look in $ORACLE_HOME/dbs - files in there might include the SID in their names too.

您可能还需要 export ORACLE_HOME 如果你还没有,但听起来像你有,可能从你的 .profile / .bashrc 等。

You might also need to export ORACLE_HOME if you haven't already, but it sounds like you have, probably from your .profile/.bashrc etc.

这篇关于侦听器无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆