Error: "ORA-12541: TNS:no listener"
search cancel

Error: "ORA-12541: TNS:no listener"

book

Article ID: 159658

calendar_today

Updated On:

Products

Data Loss Prevention Enforce Data Loss Prevention

Issue/Introduction

You see the error "ORA-12541: TNS:no listener" on the Symantec Data Loss Prevention Enforce server. Learn how to check the status of the Oracle listener service, and start or restart the service if necessary.

ORA-12541: TNS:no listener

Cause

The root cause could be a number of issues ranging from listener stopped, incorrectly registered, and corrupt listener configuration files.

Resolution

On the Oracle server, perform the following steps to check the listener status and start it if it is not running.

  1. Open an elevated command prompt
  2. Type lsnrctl status

C:\>lsnrctl status

LSNRCTL for 64-bit Windows: Version 19.0.0.0.0 - Production on 25-JAN-2023 13:05:26

Copyright (c) 1991, 2020, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=HOSTIPADDRESS)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 19.0.0.0.0 - Production
Start Date                22-JUL-2022 15:26:06
Uptime                    186 days 22 hr. 39 min. 19 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   C:\Oracle\Product\19.3.0.0\db_1\network\admin\listener.ora
Listener Log File         C:\oracle\diag\tnslsnr\SERVERNAME\listener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOSTIPADDRESS)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\protectipc)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "protect" has 1 instance(s).
  Instance "protect", status READY, has 1 handler(s) for this service...
Service "protectXDB" has 1 instance(s).
  Instance "protect", status READY, has 1 handler(s) for this service...
The command completed successfully

If the listener service "protect" does not appear to be READY then use the following command to start the listener.

lsnrctl start

LSNRCTL for 64-bit Windows: Version 19.0.0.0.0 - Production on 25-JAN-2023 13:08:12

Copyright (c) 1991, 2020, Oracle.  All rights reserved.

Starting tnslsnr: please wait...

TNSLSNR for 64-bit Windows: Version 19.0.0.0.0 - Production
System parameter file is C:\Oracle\Product\19.3.0.0\db_1\network\admin\listener.ora
Log messages written to C:\oracle\diag\tnslsnr\SERVERNAME\listener\alert\log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOSTIPADDRESS)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\protectipc)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=HOSTIPADDRESS)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 19.0.0.0.0 - Production
Start Date                25-JAN-2023 13:08:18
Uptime                    0 days 0 hr. 0 min. 12 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   C:\Oracle\Product\19.3.0.0\db_1\network\admin\listener.ora
Listener Log File         C:\oracle\diag\tnslsnr\SERVERNAME\listener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOSTIPADDRESS)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\protectipc)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

After starting the listener, wait a few minutes and run the following command:

lsnrctl services

LSNRCTL for 64-bit Windows: Version 19.0.0.0.0 - Production on 25-JAN-2023 13:20:30

Copyright (c) 1991, 2020, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=HOSTIPADDRESS)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 19.0.0.0.0 - Production
Start Date                25-JAN-2023 13:08:18
Uptime                    0 days 0 hr. 12 min. 16 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   C:\Oracle\Product\19.3.0.0\db_1\network\admin\listener.ora
Listener Log File         C:\oracle\diag\tnslsnr\SERVERNAME\listener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOSTIPADDRESS)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\protectipc)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "protect" has 1 instance(s).
  Instance "protect", status READY, has 1 handler(s) for this service...
Service "protectXDB" has 1 instance(s).
  Instance "protect", status READY, has 1 handler(s) for this service...
The command completed successfully

The expected result is the "protect" service is listed and has a status of READY.