1 Reply Latest reply on Apr 23, 2012 4:22 PM by gdarling - oracle

    ORA 12154 on OCIServerAttach


      I get an ORA 12154 when calling OCIServerAttach. The OCIEnvCreateand two OCIHandleAlloc calls are OK. This setup used to work with 32bit pcs. But on 64bit pcs the troubles arise.

      If we do tnsping on the the same server name, it responds. So I can't quite see that anything should be wrong with the setup so far? Why can't my program find the same connection as tnsping? If there where syntax errors in sqlnames.ora, tnsnames.ora the tnsping wouldn't work, I guess?

      Suggestions on where to look are very welcome!

      Best regards,

        • 1. Re: ORA 12154 on OCIServerAttach
          gdarling - oracle

          This forum is for "Oracle Developer Tools for Visual Studio", which is an actual product for a plugin for VS.

          You're probably looking for the OCI forum.. Oracle Call Interface (OCI) .

          Apart from TNSPing, does SQLPLUS connect without issue? And there's only a single home on this box so we're sure it's not a multiple home issue? If you have multiple homes, you need to create tnsnames.ora for each.

          What version of client are you using? There is a known issue with older versions of Oracle client where a 32 bit app on a 64 bit box would get a 12154 if the app location was in a path that contained parenthesis (c:\program files (x86)) for example. It's not a 32 bit problem per se, just that 32 bit apps usually install by default to (x86) location. If that's the issue you're running into, current versions of client don't have that problem, or just install the app to a path without parens.

          Hope it helps,