TNS-12541 ERR WITH Toad for oracle version 12.6

Hi all,

I have a prob with Toad for Oracle version 12.6 and Oracle 12c installed on my notebook.

whenever I try to connect to my database using toad i have the following error message:

ORA-12541: TNS: no listener

Note that I am able to connect to the user system using sqlplus

I am new on oracle configuration. could you please help me so that i can practice on my computer?

thanks in advance

plz help

When you connect via SQL Plus, are you connecting without the “@Database”? If so, then SQL*Plus is not using the listener to connect.

To get your listener running, you might check the listener.ora file - it may have an IP address in there instead of your machine name (where it says HOST=…). After you make a change, you can go to a dos prompt and type: LSNRCTL STOP, then LSNRCTL START, or just restart your laptop.

What do you mean by my “@database”?

Are you talking about the name of my database?

With command prompt i am able to connect to the user system and the password that i have choosen.

For the listener i used the ip @ of my notebook as well i used the name of it. I still have the same results. If you want i can send you the information as i have them so that you can have a better view.

Sent from Samsung Mobile

I mean, when you just type in SQLPlus , then enter your username and password when it asks, SQLPlus will connect to the database on the local machine without going through the listener.

But if you type in sqlplus user/password@database, then SQL*Plus will use the listener.

So I am guessing that you connected via the former method.

Try going to a dos prompt and type: lsnrctl status

Then post here what it displays. Also post your listener.ora.

You should have a windows service for the listener…make sure it is set to start automatically. It is probably called something like OracleOraDb12c_home1TNSListener

this what i get when I enter lsnrctl status

C:\Users\Beaudouin>lsnrctl status

LSNRCTL for 64-bit Windows: Version 12.1.0.1.0 - Production on 02-JAN-2015 14:51

:51

Copyright © 1991, 2013, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=BEAUDOPC)(PORT=1521)))

TNS-12541: TNS:no listener

TNS-12560: TNS:protocol adapter error

TNS-00511: No listener

64-bit Windows Error: 61: Unknown error


ORA-12541: TNS:no listener

Items Checked

TNS_ADMIN environment variable is defined as “C:\instantclient_12_1”

“C:\instantclient_12_1\tnsnames.ora” was located

The following connect descriptor was found for BODODWH in the tnsnames.ora file

BODODWH =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = BEAUDOPC)(PORT = 1521))

)

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = BODODWH)

)

)

“C:\instantclient_12_1\sqlnet.ora” was located

NAMES.DIRECTORY_PATH specifies TNSNAMES in the sqlnet.ora file

Steps to Take

Verify that the port specified in the connect descriptor is correct in the tnsnames.ora file

Verify that the listener is running and that it is properly configured

My lister:

listener.ora Network Configuration File: C:\instantclient_12_1\listener.ora

Generated by Oracle configuration tools.

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = CLRExtProc)

(ORACLE_HOME = C:\app\beremy\product\12.1.0\dbhome_4)

(PROGRAM = extproc)

(ENVS = “EXTPROC_DLLS=ONLY:C:\app\beremy\product\12.1.0\dbhome_4\bin\oraclr12.dll”)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = BEAUDOPC)(PORT = 1521))

when i connect as sysdba with the user/password system/***** i am conncted but on toad with the same user i have the err

If that is your entire listener.ora, it looks like maybe a few closing parenthesis are missing from the end.

And what happens if you try: lsnrctl start

?

Toad is trying to connect through the listener. It seems like the way you are connecting in SQLPlus, the listener is not being used, which is why you can connect via SQLPlus but not Toad.

Microsoft Windows [Version 6.3.9600]

© 2013 Microsoft Corporation. All rights reserved.

C:\Users\Beaudouin>lsnrctl

LSNRCTL for 64-bit Windows: Version 12.1.0.1.0 - Production on 02-JAN-2015 15:10

:28

Copyright © 1991, 2013, Oracle. All rights reserved.

Welcome to LSNRCTL, type “help” for information.

LSNRCTL> lsnrctl start

NL-00853: undefined command “lsnrctl”. Try “help”

LSNRCTL>

No, type the whole thing “lsnrctl start” at the dos prompt. Like this:

Microsoft Windows [Version 6.1.7601]

Copyright © 2009 Microsoft Corporation. All rights reserved.

C:>lsnrctl start

LSNRCTL for 64-bit Windows: Version 12.1.0.1.0 - Production on 02-JAN-2015 14:36:49

Copyright © 1991, 2013, Oracle. All rights reserved.

Starting tnslsnr: please wait…

TNSLSNR for 64-bit Windows: Version 12.1.0.1.0 - Production

System parameter file is C:\Oracle\product\12.1.0\dbhome_1\network\admin\listener.ora

Log messages written to C:\Oracle\diag\tnslsnr\JD-ORCL12\listener\alert\log.xml

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\.\pipe\EXTPROC1521ipc)))

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=JD-ORCL12)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

STATUS of the LISTENER


Alias LISTENER

Version TNSLSNR for 64-bit Windows: Version 12.1.0.1.0 - Production

Start Date 02-JAN-2015 14:36:51

Uptime 0 days 0 hr. 0 min. 4 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File C:\Oracle\product\12.1.0\dbhome_1\network\admin\listener.ora

Listener Log File C:\Oracle\diag\tnslsnr\JD-ORCL12\listener\alert\log.xml

Listening Endpoints Summary…

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\.\pipe\EXTPROC1521ipc)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=JD-ORCL12)(PORT=1521)))

Services Summary…

Service “CLRExtProc” has 1 instance(s).

Instance “CLRExtProc”, status UNKNOWN, has 1 handler(s) for this service…

The command completed successfully

C:>

c:>lsnrctl start

LSNRCTL for 64-bit Windows: Version 12.1.0.1.0 - Production on 02-JAN-2015 15:41

:42

Copyright © 1991, 2013, Oracle. All rights reserved.

Starting tnslsnr: please wait…

Unable to OpenSCManager: err=5

TNS-12560: TNS:protocol adapter error

TNS-00530: Protocol adapter error

c:>

Are you logged into windows as an administrator?

yes I do. my user is admin

I was able to reproduce your problem by enabling User Account Control on windows. If you run your dos prompt as an administrator (Rt-click and choose “Run as Administrator”) then you should be able to get past the OpenSCManager error.

If that doesn’t solve the problem, I would suggest turning off UAC completely. To do that, go to Control Panel, then User Accounts, then “Change User Account Control settings”. Move the slider all the way down, and reboot your computer.

i do pass it when i run cmd as admin. i have this result:

c:>lsnrctl status

LSNRCTL for 64-bit Windows: Version 12.1.0.1.0 - Production on 02-JAN-2015 16:00

:41

Copyright © 1991, 2013, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=BEAUDOPC)(PORT=1521)))

TNS-12541: TNS:no listener

TNS-12560: TNS:protocol adapter error

TNS-00511: No listener

64-bit Windows Error: 61: Unknown error

c:>

That’s lsnrctl status. When you do “lsnrctl start” from cmd as admin do you still get the “Unable to OpenSCManager: err=5” error? If so, is UAC completely disabled?

c:>lsnrctl start

LSNRCTL for 64-bit Windows: Version 12.1.0.1.0 - Production on 02-JAN-2015 16:07

:21

Copyright © 1991, 2013, Oracle. All rights reserved.

Starting tnslsnr: please wait…

Failed to start listener service, error 2: The system cannot find the file speci

fied.

TNS-12560: TNS:protocol adapter error

TNS-00530: Protocol adapter error

c:>

I am not sure what that error means and I am not having any luck yet finding information on it. If you haven’t completely disabled UAC and rebooted your computer, then do that now.

could you please tell me how to do that on windows 8.1?