简体   繁体   English

侦听器无法启动

[英]Listener failed to start

I have a virtual Machine on VMWare Player: Oracle 11g on Linux Centos. 我在VMWare Player上有一个虚拟机:在Linux Centos上是Oracle 11g。 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. 提前致谢。

EDIT: 编辑:

netstat -tulpn | netstat -tulpn | grep :1521 grep:1521

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

EDIT: 编辑:

lsnrctl status lsnrctl状态

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

sqlplus / as sysdba sqlplus /作为sysdba

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

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). ORA-12162通常意味着您没有设置ORACLE_SID并不是说它是错误的,但是它根本没有设置,或者尚未导出(取决于您的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. 显然,根据您添加到问题中的详细信息,侦听器位于端口1521上。

If you're using something Bourne-y (sh, ksh, bash etc.) you need to set and export your ORACLE_SID : 如果您使用的是Bourne-y(sh,ksh,bash等),则需要设置和导出ORACLE_SID

export ORACLE_SID=my_sid

If you can't remember the SID you can go grep -ef | grep ora_pmon_ 如果您不记得SID,可以转到grep -ef | grep ora_pmon_ grep -ef | grep ora_pmon_ ; grep -ef | grep ora_pmon_ ; if that shows anything then the SID is the end of the process name, and the database is up. 如果显示任何内容,则SID为进程名称的末尾,并且数据库已启动。 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. 如果没有,则查看lsnrctl status的输出,查看是否已注册任何内容,或者查看$ORACLE_HOME/dbs文件名称中也可能包含SID。

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. 如果还没有的话,您可能还需要export ORACLE_HOME ,但这听起来像是已经存在了,可能是从.profile / .bashrc等文件中export ORACLE_HOME

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM