Oracle client ORA-12541: TNS:no listener

OracleListener

Oracle Problem Overview


I am new on Oracle database, but I have one issue. On my Database server (server1) listener and database instance run correctly and I can use sqlplus to connect to this DB. When I connect to database by using other server, I check the TNS configuration and it is correct but system says:

> ERROR: > ORA-12541: TNS:no listener

My database is Oracle 10gR2

So how can I solve this issue?

Oracle Solutions


Solution 1 - Oracle

You need to set oracle to listen on all ip addresses (by default, it listens only to localhost connections.)

###Step 1 - Edit listener.ora

This file is located in:

  • Windows: %ORACLE_HOME%\network\admin\listener.ora.
  • Linux: $ORACLE_HOME/network/admin/listener.ora

Replace localhost with 0.0.0.0

# ...

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
    )
  )

# ...

###Step 2 - Restart Oracle services

  • Windows: WinKey + r

      services.msc
    
  • Linux (CentOs):

      sudo systemctl restart oracle-xe
    

enter image description here

Solution 2 - Oracle

I also faced the same problem but I resolved the issue by starting the TNS listener in control panel -> administrative tools -> services ->oracle TNS listener start.I am using windows Xp and Toad to connect to Oracle.

Solution 3 - Oracle

Check out your TNS Names, this must not have spaces at the left side of the ALIAS

Best regards

Solution 4 - Oracle

According to oracle online documentation

> ORA-12541: TNS:no listener

Cause: The connection request could not be completed because the listener is not running.

Action: Ensure that the supplied destination address matches one of the addresses used by 
the listener - compare the TNSNAMES.ORA entry with the appropriate LISTENER.ORA file (or  
TNSNAV.ORA if the connection is to go by way of an Interchange). Start the listener on 
the remote machine.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionaliasosxView Question on Stackoverflow
Solution 1 - OracleMikael HolmgrenView Answer on Stackoverflow
Solution 2 - OraclesubhashisView Answer on Stackoverflow
Solution 3 - OracleArmandView Answer on Stackoverflow
Solution 4 - OracledariyooshView Answer on Stackoverflow