Listener failed to start

孤街浪徒 提交于 2019-12-24 19:18:27

问题


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.

EDIT:

netstat -tulpn | grep :1521

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

EDIT:

lsnrctl status

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

sqlplus / as sysdba

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

回答1:


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.

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

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.

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.



来源:https://stackoverflow.com/questions/18300464/listener-failed-to-start

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!