Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have tried to connect to an Oracle database using the below command:

sqlplus -s LOGIN/PASSSWD@SERVERNAME:ORA_PORT/SERVICE_NAME

However I couldn't connect. It was throwing the following error:

ORA-12541: TNS: no listener.

How can I fix this?

share|improve this question
    
check if your listener is up and running – Sathya Dec 16 '11 at 18:10
    
Yes its up only..i can able to connect through sqlplus but couldn't able to do it through shell script.. – Vel Dec 16 '11 at 18:14
    
and how are you connection to SQLPlus? What's the exact command? – Sathya Dec 17 '11 at 6:29
    
conn username/password is command i used to connect through SQLPlus..Also system throws ORA-12162 TNS:net service name is incorrectly specified error after ORA-12541: TNS: no listener.. – Vel Dec 17 '11 at 7:33
up vote 0 down vote accepted

You're entering the wrong TNS Name while connecting. Check the TNSNames defined in $oracle_home\network\admin\tnsnames.ora and use the defined TNS Name as

sqlplus -s LOGIN/PASSSWD@tnsname
share|improve this answer
    
It works perfectly.. Thanks – Vel Dec 19 '11 at 7:40
    
you're welcome @Vel. – Sathya Dec 19 '11 at 8:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .