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

book

Article ID: 159658

calendar_today

Updated On:

Products

Data Loss Prevention Enforce

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

Perform the following steps to check the listener status and start it if it is not running.

  1. Open a elevated command prompt
  2. Type lsnrctl status
C:\>lsnrctl status
LSNRCTL for 64-bit Windows: Version 11.2.0.4.0 - Production on 18-JUL-2016 13:48:08
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.4.0 - Produ
ction
Start Date                02-JUN-2016 07:04:49
Uptime                    46 days 6 hr. 43 min. 18 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   C:\oracle\product\11.2.0.4\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...
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 11.2.0.4.0 - Production on 18-JUL-2016 15:34:04
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Starting tnslsnr: please wait...
TNSLSNR for 64-bit Windows: Version 11.2.0.4.0 - Production
System parameter file is C:\oracle\product\11.2.0.4\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=tehb0x-2008)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\PROTECTipc)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=tehb0x-2008.spr.spt.symantec.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.4.0 - Production
Start Date                18-JUL-2016 15:34:09
Uptime                    0 days 0 hr. 0 min. 5 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   C:\oracle\product\11.2.0.4\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 11.2.0.4.0 - Production on 18-JUL-2016 15:38:28
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Connecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOSTIPADDRESS)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
Service "protect" has 1 instance(s).
  Instance "protect", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER
The command completed successfully

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