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

4

102

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?

Bursiform answered 13/11, 2012 at 9:58 Comment(10)
should be a serverfault.com / dba.stackexchange.com questionPeltier
But when I connect to database by using other server You mean to say that when you try to connect the same database from server?Dextrocular
I mean I connect to Database server by client by sqlplus or sql developer on Sqldeveloper Error "An error was encountered performing the requested operation: The Network Adapter could not establish the connection Vendor code 20"Bursiform
So you are able to connect to database using sqlplus but not from SQL Developer?Dextrocular
you've verified the listener is up on the "server1" box, verified its port number, and checked the TNSNames/connection string on the other server that it matches the ip/hostname and port?Thi
every client cannot connect to database server, but I check on firewall is disableBursiform
@Bursiform In SQL Developer when you create connection, are you using Basic or TNS as Connection Type?Dextrocular
any final solution with full source code sample working about it ?Hornwort
I got the same error, when I missed port number in the sqlldrHemophilia
Also you can delete and re-create the listener Click "Start - Programs - Oracle - OraDb10g_home1 - Configuration and Migration Tools - Net Configuration Assistant" and configure the same in tnsnames.ora fileTerminology
J
120

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

Jus answered 19/2, 2014 at 14:58 Comment(10)
Finally after one day of hardship, it works!Aqualung
Thanks! this solved my problem. The Listener in the DB Server set to localhost. Put the hostname for the computer solve my problem.Sharpset
hi, my problem is i cannot find oracleservice in service, what should i do? thank uChronister
my admin folder doesn't have a lister.ora file, and my Services don't list "Oracle [anything]"Pammie
Also after this change, if you see ora-12514 you should replace localhost to 0.0.0.0 in tnsnames.oraChigger
where is %ORAACLE_HOME% directory and how to get it ?Defroster
Example for Oracle 12c: ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1; export ORACLE_HOMEItis
How do I get here? Windows: %ORACLE_HOME%\network\admin\listener.ora.Wasp
@MichaelTolsma take mine as an example it is like: D:\app\administrator\product\12.1.0\dbhome_1\NETWORK\ADMIN\listener.oraThoria
For someone has trouble finding where %ORACLE_HOME% on windows: dba.stackexchange.com/a/140582/224466Matti
K
15

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.

Kettie answered 1/7, 2013 at 5:53 Comment(2)
i solve my problem by your way. my problem raise after updating OS .Dismount
If answers here not work, since this quesiton is closed. here is my answer: 1. use cmd with admin and run tnsping YourOracleSID, if there is error, see the solution here, such as try LSNRCTL.EXE start: sort.veritas.com/public/documents/ccser/5.2/windowsandunix/…Eggnog
F
5

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

Best regards

Fitts answered 31/10, 2013 at 0:31 Comment(0)
C
-1

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.
Chiropteran answered 13/11, 2012 at 11:37 Comment(1)
This is of no help to anyone who doesn't know how to perform the suggested action.Pammie

© 2022 - 2024 — McMap. All rights reserved.