简体   繁体   中英

Listener failed to start

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

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_ 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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