4 Replies Latest reply: Mar 9, 2009 5:21 AM by 689809 RSS

    ODBC Error "ora-12545 connection failed ...

    679330
      Hi All,

      Thanks for your assistance. I am trying to set up an ODBC connection to a Oracle database from a MS Server 2000 machine with SQL Server 2000 on it. My goal is to link the Oracle database to the SQL server. For some reason I can not get the ODBC connection to work! I've checked the connection information and it is correct, I'm getting the following error "ora-12545 connection failed because target host or object does not exist" I can ping the host and a get a response. I tested the connection on my XP workstation and the ODBC connection and SQL+ work with no problems. One difference I found in the Oracle Net Manager is the Server 2000 machine has a Oracle Advanced Security option along with Naming and General. My workstation does not have the Oracle Advanced Security option.

      Does anyone out there know what I can do to get my connection working?

      Thank you for your help.

      Arden
        • 1. Re: ODBC Error "ora-12545 connection failed ...
          gdarling - oracle
          Hi,

          12545 usually occurs when the hostname in the tnsnames cant be resolved. A couple suggestions that may or may not help:
          When you pinged the hostname, did you do that from the SQLServer box?
          Are you able to connect using SQLPlus from the same SQLServer box?
          You're actually using ODBC? Most folks use OLEDB for that.
          Are you able to connect succesfully when clicking the Test Connection button in the DSN Config applet?
          If you try replacing the hostname with the IP address does that work?

          Hope it helps,
          Greg
          • 2. Re: ODBC Error "ora-12545 connection failed ...
            679330
            Hi Greg,
            Thank you very much for your reply. Here are the answers:
            1. When you pinged the hostname, did you do that from the SQLServer box? Yes, ping works ok from the SQL Box.
            2. Are you able to connect using SQLPlus from the same SQLServer box? No, I can no. I get the same error.
            3. a. You're actually using ODBC? I need the OBDC working.
            3. b. Most folks use OLEDB for that. I tried using OLE DB, it failed too, I got the 7399 error.
            4. Are you able to connect succesfully when clicking the Test Connection button in the DSN Config applet? No, that is where I got the 12545 error.
            5. If you try replacing the hostname with the IP address does that work? Nope, that doesn't work on any machine. I've been trying everything I can think of to get the connection to work.

            It's weird that the tnsnames file is the same and works on the groups workststions but on SQL server box it doesn't.

            Do you if it is possible to ping the database server?

            Thank you for your assistance, I appreciate it.
            Arden
            • 3. Re: ODBC Error "ora-12545 connection failed ...
              gdarling - oracle
              Hi,

              If you get the same behavior from sqlplus, then its not an ODBC issue and the folks that support the client layer / network connectivity could probably help you better.
              My only remaining suggestion really, is: Are the sqlnet.ora files the same on both computers? Specifically, the NAMES.DIRECTORY_PATH parameter. Are you using TNSNAMES for both? Perhaps one is set to use LDAP or ONAMES or something besides TNSNames.ora?

              Greg
              • 4. Re: ODBC Error "ora-12545 connection failed ...
                689809
                Did you find any solution - I have the same problem:
                tnsping says o'k while when conecting f.ex. with test in Net Manager I got the same error.

                I am using only IP addresses.

                I have Oracle client on Windows Server 2003, that does not works, while on another WinServ2003 it works without problems. The files sqlnet.ora and tnsnames.ora are the same on both places.

                brgds and looking forward for a solution,
                Janeks