Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2004
    Posts
    20

    Unanswered: "ORA-12541: TNS:no listener" when specifing connect identifier

    In the past, I used the following sqlplus command to connect to my Oracle 10 DB:

    sqlplus <user>/<pass>@ora101

    At some point this stopped working and I now get the following error:

    -------------------------------%<-----------------------------------
    {ruby.admin} sqlplus prod/prod@ora101

    SQL*Plus: Release 10.1.0.2.0 - Production on Tue Sep 7 10:33:17 2004

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

    ERROR:
    ORA-12541: TNS:no listener
    -------------------------------%<-----------------------------------

    However, if I don't specify a connect identifier I can connect without any problems:

    -------------------------------%<-----------------------------------
    {ruby.admin} sqlplus <user>/<pass>

    SQL*Plus: Release 10.1.0.2.0 - Production on Tue Sep 7 10:34:38 2004

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


    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options

    SQL>
    -------------------------------%<-----------------------------------

    From looking up the error I see that:

    -------------------------------%<-----------------------------------
    ORA-12541: TNS:no listener
    Cause: The connection request could not be completed because the listener is not running.
    Action: Ensure that the supplied destination address matches one of the addresses used by the listener - compare the TNSNAMES.ORA entry with the appropriate LISTENER.ORA file (or TNSNAV.ORA if the connection is to go by way of an Interchange). Start the listener on the remote machine.
    -------------------------------%<-----------------------------------

    But surely the listener is running if I can connect when I don't specify the connect identifier?

    Another application that connects to Oracle needs to use the connect identifier 'ora101' that I initially set up using 'netca' so it is no good just being able to connect using sqlplus in the above way (without specifying a connect identifier).

    Any idea why it connects when I don't specify the '@ora101', but not when I include it?

    Here is my tnsnames.ora:

    -------------------------------%<-----------------------------------
    # tnsnames.ora Network Configuration File: /home/oracle_sol101/product/10.1.0/db_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.

    ORA101 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ruby.quadstone.co.uk)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ora101.quadstone.com)
    )
    )

    ORA9I =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = toots)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVICE_NAME = ora9i.test)
    )
    )

    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    )
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    )
    )
    -------------------------------%<-----------------------------------

    And my listner.ora:

    -------------------------------%<-----------------------------------
    # listener.ora Network Configuration File: /home/oracle_sol101/product/10.1.0/db_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /home/oracle_sol101/product/10.1.0/db_1)
    (PROGRAM = extproc)
    )
    )

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    )
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ruby.quadstone.co.uk)(PORT = 1521))
    )
    )
    )
    -------------------------------%<-----------------------------------

    Thanks in advance.

    Cheers,
    Daniel.

  2. #2
    Join Date
    Nov 2002
    Posts
    833
    may the SID be exported and part of your .profile prior calling sqlplus or is part of your registry
    then no listener is necessary to run

    what are lsnrctl stat responding or
    tnsping ORA101 ??

  3. #3
    Join Date
    Aug 2004
    Location
    France
    Posts
    754
    Hello,

    you can try to launch netca and reconfigure the listener (with the same parameters). I already had such a problem when the server rebooted and doing this worked for me, as the listener wasn't configured to restart at each boot of the computer.

    Regards,

    RBARAER

  4. #4
    Join Date
    Feb 2004
    Posts
    20
    I get the same error message when running 'tnsping ora101'. Will give RBARAER's suggestions a try next.

  5. #5
    Join Date
    Feb 2004
    Posts
    20

    Thumbs up

    RBARAER's suggestion workes a treat! Can you point me at the appropriate Oracle documentation (or just instruct me) explaining how to set up so the listener starts on reboot?

    Thanks everyone for the suggestions.

    Thanks,
    Daniel.

  6. #6
    Join Date
    Dec 2003
    Location
    Buenos Aires, Argentina
    Posts
    86
    If you're running Oracle under Wintel, just edit the ORACLETNSListener Service, to start AUTOMATIC.
    Regards,

    Manf

  7. #7
    Join Date
    Aug 2004
    Location
    France
    Posts
    754
    If you're running under Sun Solaris, commands to start/stop a listener are as follow :

    lsnrctl stop listener_name

    lsnrctl start listener_name

    And to have information about a given listener :

    lsnrctl status listener_name

    So, to relaunch the listener at each reboot, just add "lsnrctl START listener_name" in your OS boot script. (I've not done it yet, but I'm pretty sure that should work)

    Regards,

    RBARAER
    Last edited by RBARAER; 09-07-04 at 08:28.

  8. #8
    Join Date
    Feb 2004
    Posts
    20
    I'm running Oracle on Solaris - I'll try you suggestions. Thanks again everyone.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •