Notifications
Clear all

[Solved] How to fix ORA-12541: TNS:no listener

4 Posts
2 Users
0 Reactions
1,269 Views
0
Topic starter

I am getting this error when I tried to build

c:\views\rtvn-15.0>sqlplus wks_pmallaya_rtv_14_0/password@localhost:1521/ORCL

SQL*Plus: Release 11.2.0.1.0 Production on Tue Jun 9 11:49:03 2015

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

ERROR:
ORA-12541: TNS:no listener

I verified that listener service is running

tnsnames.ora config

ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = wks-pmallaya)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

listener.ora config

    SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\oracle\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:\oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )
2 Answers
0
Topic starter

After a lot of trial and errors, here's what worked for me.

  1. Stopped TNSlistener.
  2. Opened up Oracle net manager and deleted the old listener and created a new one.
  3. Removed all entries from tnsnames.ora and created new entry for ORCL with oracle net config assistant.
  4. Updated tnsnames.ora manually with additional settings as follows:

    # tnsnames.ora Network Configuration File: C:\oracle\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    
    LISTENER_ORCL =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    
    ORACLR_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
        (CONNECT_DATA =
          (SID = CLRExtProc)
          (PRESENTATION = RO)
        )
      )
    
    ORCL =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = ORCL)
        )
      )
    
0

localhost interface is not the same as your tns setup which is wks-pmallaya. you should use sqlplus wks_pmallaya_rtv_14_0/password@wks-pmallaya:1521/ORCL

prasanth Topic starter 2015-06-09 12:06:00

sergey, I tried that. But I still get the 'No Listener' error

Sergey Soshnikov 2015-06-09 12:06:00

basically your listener service and tns are on different interfaces. also your tns points to a service however it should point to a SID=ORCL. once you fix tns with the listener to match along with sqlplus string to be sqlplus user/pwd@orcl then it should work