I keep getting "TNS - no listener" error and can't connect in database


I keep getting the no listener error and cannot connect to database. Whenever I run localhost I get this:

Source Error
 a un handled exception was        generated during the execution of the    current web zequest. Internasion      regarding the origin and location of the exception can be identified
using the exception stack trace below.
Stack trace:
[oracleException (0x80004005): ORA-125 41: TNS: No listener]
Oracle DataAccess.Client.oracleException. HandleError Helper (Int32 errcode, Oracleconnection conn, IntPtr opsErrctx, Oposgivalctx poposgivalctx
Oracle.DataAccess.client.oracleException. HandleError(Int32 errcode, Oracleconnection conn, IntPtr opsErrctx, object src) +41
Oracle.DataAccess.client.oracleconnection.Open +3288
JaxomLogin. Login +219
JaxiomLogin.Page_Load(object sender, EventArgs e) +26
system.Web.util.CalliHelper. EventArgFunctioncaller (IntPtr fp, Object o, object t, EventArgs e) +14
system.Web. Util.calli EventHandlerDelegateProxy.Callback(object sender, EventArgs e) +35
system.Web.UI. Control. OnLoad(EventArgs e) +99
system.Web.UI. Control. LoadRecursive +50
system.Web.UI. Page. ProcessRequestMain(s001ean includestages beforeAsyncPoint, Boolean includestagesAfter AsyncPoint) +627

Listener.Ora file:

# Listener.ora Network Configuration File:
E: \app\Administrator product\11.1.0\db_2\network\admin listener.Qia
# Generated by Oracle configuration tools.
(PROTOCOL = TCP) (HOST = SERVER) (PORT = 1521) ) ) )

Tnsnames.ora file:

# Tnsnames.ora Network Configuration File:
E: \app\Administrator\product\11.1.0\db_2\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

What I tried in order to solve the error ana didn’t work:

1-changing HOST in listener.Ora to and to computer’s name 2-removing spaces in tnsnames.Ora 3-Turning firewall off 4-Usung service name instead of SID 5-Restarting lcnrctl from command prompt 6-Restarting Oracle services

I also can’t find the service named Oracle listener in the services.

When I type lcnrctl status in command prompt I get this: enter image description here

What is wrong and how to solve the problem and connect normally to the database?

asked on Stack Overflow May 20, 2021 by Reem Rizk • edited May 20, 2021 by marc_s

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0