#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    25
    Rep Power
    0

    Oracle 8.1.7: TNS-12541: TNS No Listener


    The OracleHOME_SVRTNSListener service is running. The listener.log file correctly states this fact. When I connect from SQL*Plus Worksheet (username@dbname/pw) it do connects me. Connecting from Dev 6i forms is also ok. Accessing from PHP script also works well. However, all of the below cases give this error "TNS-12541: TNS No Listener".

    a. Connecting from SQL*Plus.

    b. exp/imp utility program. (if i misspell connect string, the error is as expected i.e. TNS protocol adapter error. For correct connect string as defined in TNSNames.ora, the above error appears).

    c. Running lsnrctl.exe and giving 'stop' command also gives the same error. However, 'start' says that the aformentioned service is already running and then gives the same error message.

    Plz Note:
    The last thing I did after which this problem got in was to run Database Configratio Assistant to make script of a 3rd DB on my system (Intel P-IV, Win 2K A server) and then run the generated batch file.
    Also note that the newly created DB is working fine and accessable as well i.e. from sql plus worksheet and php scripts.

    Any help will be appreciated.

    Regards, Rashid.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    25
    Rep Power
    0
    The sqlnet.log file does record the error but tells the same story "error 12541 - TNS No Listener".

    There is an interesting situation to tell. I have 8i on another machine as well (call it B). when I configure and connect using B's exp/imp utility or sql*plus or anything to A (the problamatic oracle machine), it works fine i.e.

    > exp system@mydb.MachineA.MyDomain.com

    works exactly fine. It connects to mydb on machine A using system account and starts exporting. But Why doesn't this mechanism works on machine A itsself???
  4. #3
  5. No Profile Picture
    Senior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Canada
    Posts
    308
    Rep Power
    12
    As you have mentioned that machine B is able to connect with the same database reside in the machine A but machine A cannot connect with its own database, it implies that your listener is running but some how you have some problem in your TNSNAMES.ORA or LISTENER.ORA file, please find the difference of this files between both machines and also you need to stop and run your listener again. example is given below:


    C:\>lsnrctl

    LSNRCTL>STOP Listener.ora

    LSNRCTL>START Listener.ora

    this is just an example please use the real name of your Listener file.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    25
    Rep Power
    0
    Thanks for your reply Shafique. Here is the output of few commands (all given on server machine)

    Listener.ora
    -----------
    Code:
    # LISTENER.ORA Network Configuration File: C:\oracle\orasvr81\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
          )
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = billingserver)(PORT = 1521))
          )
        )
        (DESCRIPTION =
          (PROTOCOL_STACK =
            (PRESENTATION = GIOP)
            (SESSION = RAW)
          )
          (ADDRESS = (PROTOCOL = TCP)(HOST = billingserver)(PORT = 2481))
        )
      )
    
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = C:\oracle\orasvr81)
          (PROGRAM = extproc)
        )
        (SID_DESC =
          (GLOBAL_DBNAME = billing)
          (ORACLE_HOME = C:\oracle\orasvr81)
          (SID_NAME = mydb)
        )
      )
    tnsnames.ora
    ------------
    Code:
    # TNSNAMES.ORA Network Configuration File: C:\oracle\orasvr81\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    
    EXTPROC_CONNECTION_DATA.NTR1.COM =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
        )
        (CONNECT_DATA =
          (SID = PLSExtProc)
          (PRESENTATION = RO)
        )
      )
    
    
    mydb =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = billingserver)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = mydb)
        )
      )


    tnsping mydb
    -------------
    Code:
    TNS Ping Utility for 32-bit Windows: Version 8.1.7.0.0 - Production on 20-OCT-2004 09:18:01
    
    (c) Copyright 1997 Oracle Corporation.  All rights reserved.
    
    Attempting to contact (ADDRESS=(PROTOCOL=TCP)(HOST=billingserver)(PORT=1521))
    TNS-12541: TNS:no listener

    lsnrctl stop listener
    ------------------
    Code:
    LSNRCTL for 32-bit Windows: Version 8.1.7.0.0 - Production on 20-OCT-2004 09:27:42
    
    (c) Copyright 1998 Oracle Corporation.  All rights reserved.
    
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
    The command completed successfully

    lsnrctl start listener
    -------------------
    Code:
    LSNRCTL for 32-bit Windows: Version 8.1.7.0.0 - Production on 20-OCT-2004 09:27:53
    
    (c) Copyright 1998 Oracle Corporation.  All rights reserved.
    
    Starting tnslsnr: please wait...
    
    TNSLSNR for 32-bit Windows: Version 8.1.7.0.0 - Production
    System parameter file is C:\oracle\orasvr81\network\admin\listener.ora
    Log messages written to C:\oracle\orasvr81\network\log\listener.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=billingserver.ntr1.com)(PORT=1521)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=billingserver.ntr1.com)(PORT=2481))(PROTOCOL_STACK=(PRESENTATION=GIOP)(SESSION=RAW)))
    
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
    STATUS of the LISTENER
    ------------------------
    Alias                     listener
    Version                   TNSLSNR for 32-bit Windows: Version 8.1.7.0.0 - Production
    Start Date                20-OCT-2004 09:27:53
    Uptime                    0 days 0 hr. 0 min. 0 sec
    Trace Level               off
    Security                  OFF
    SNMP                      OFF
    Listener Parameter File   C:\oracle\orasvr81\network\admin\listener.ora
    Listener Log File         C:\oracle\orasvr81\network\log\listener.log
    Services Summary...
      PLSExtProc		has 1 service handler(s)
      mydb		has 1 service handler(s)
    The command completed successfully
    P.N. The tnsnames.ora file is the same on server (A) as on client machine (B). Everthing (imp/exp/sql plus/tnsping mydb) works fine from B, non of them works from machine A , don't know why???
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    25
    Rep Power
    0

    Smile


    this problem is EXACTLY similar to

    A similar problem

    hope, this helps.....

IMN logo majestic logo threadwatch logo seochat tools logo