Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle client ORA-12541: TNS:no listener [closed]

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?

like image 608
aliasosx Avatar asked Nov 13 '12 09:11

aliasosx


People also ask

How do I fix ORA 12541 TNS no listener?

First check the tnsnames. ora file and ensure that it points to the correct server and port. If the Forms server is on another machine, test the TNS resolve with tnsping from the command prompt. Finally, check the listener.

What does TNS no listener mean?

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.

How do I fix ORA 12514 TNS listener does not currently know of service requested in connect descriptor?

Action: Wait a moment and try to connect a second time. Check which services are currently known by the listener by executing: lsnrctl services. Check that the SERVICE_NAME parameter in the connect descriptor of the net service name used specifies a service known by the listener.


2 Answers

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

like image 62
Mikael Holmgren Avatar answered Sep 21 '22 13:09

Mikael Holmgren


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.

like image 24
subhashis Avatar answered Sep 24 '22 13:09

subhashis