This discussion is archived
5 Replies Latest reply: Jul 30, 2012 10:28 AM by rukbat RSS

Another "Ora - 12541: TNS no listener"

teechelt Newbie
Currently Being Moderated
I hope this is the correct section for net manager questions.

I am having problems connecting to a database on a machine even when using the Net manager application that is sitting on the same machine.

For a Service name, if I type the hostname as the text 'localhost' and enter all other details, it works fine. However, when I change only the hostname to the name of the Windows 7 machine (with or without the full domain name), I get the TNS message error listed above.

Please does anyone know what I would need to change to ensure my service name works when using the computer name?
  • 1. Re: Another "Ora - 12541: TNS no listener"
    sybrand_b Guru
    Currently Being Moderated
    Likely you ignored documentation when installing Oracle, and your computer is running from a DHCP address. This doesn't work. You need a local loopback connector.
    Other than that, you are not unique, so I wouldn't see why using online resources wouldn't help you out and why you need to post this.

    ------------
    Sybrand Bakker
    Senior Oracle DBA
  • 2. Re: Another "Ora - 12541: TNS no listener"
    952775 Newbie
    Currently Being Moderated
    Can you please copy/paste your
    - $ORACLE_HOME/network/admin/sqlnet.ora
    - $ORACLE_HOME/network/admin/tnsnames.ora
    - $ORACLE_HOME/network/admin/listener.ora

    What are the
    - hostname
    - portnumber
    - servicename
    you want to connect to?

    Kr,
    Y
  • 3. Re: Another "Ora - 12541: TNS no listener"
    teechelt Newbie
    Currently Being Moderated
    Hi Yvhend,

    Thanks for your post.

    Things now appear to be working OK but I can't for the life of me understand why. Here is what I did:

    1) Change the Listener host field from LOCALHOST to <Machine Name>
    2) Stop the Oracle Instance service and set its startup to Manual
    3) Restart the machine
    4) Start the Oracle Instance service manually.

    When I tested the machine names in Net manager, it worked OK. I then set the Oracle Instance service startup back to Automatic and restarted the machine and I am still able to connect OK.

    I still am not sure which combination of the steps above (if any) fixed the problem though as there isn't too much of a logic to it.
  • 4. Re: Another "Ora - 12541: TNS no listener"
    EdStevens Guru
    Currently Being Moderated
    TeeChelt wrote:
    Hi Yvhend,

    Thanks for your post.

    Things now appear to be working OK but I can't for the life of me understand why. Here is what I did:

    1) Change the Listener host field from LOCALHOST to <Machine Name>
    Most likely that changed the IP address the listener was using -- changed it to something useful.
    2) Stop the Oracle Instance service and set its startup to Manual
    3) Restart the machine
    4) Start the Oracle Instance service manually.

    When I tested the machine names in Net manager, it worked OK. I then set the Oracle Instance service startup back to Automatic and restarted the machine and I am still able to connect OK.

    I still am not sure which combination of the steps above (if any) fixed the problem though as there isn't too much of a logic to it.
    The first one, allowing the listener to use the correct IP address.

    Start here for more understanding: http://edstevensdba.wordpress.com/2011/02/09/sqlnet_overview/
  • 5. Re: Another "Ora - 12541: TNS no listener"
    rukbat Guru Moderator
    Currently Being Moderated
    Moderator Comment:
    Multi-cross-posted. Poor forum etiquette at best, spam at worst.
    For example:
    Re: Yet another "network adapter could not establish the connection"

    ... and your post on this question that you placed into the Jave Programming forum (for some unfathomable reason) has been removed.

    You threads are now locked.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points