Question

I have a web service that I have deployed and am using an Oracle Instant Client instance in the bin folder. The problem is, no matter what connection string I use on a Testing Server, i get a ORA-12154 error or a ORA-12545 error.

Here's the connection string's I've tried:

//This one caused the ORA-12545 error:
<add key="oracleConnectString" value="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost.mydomain.com)(PORT=1574)))(CONNECT_DATA=(SID=mysid)(SERVER=DEDICATED)));User Id=username;Password=password;" />

//These caused the ORA-12154 errors:
<add key="oracleConnectString" value="Data Source=username/password@//myhost.mydomain.com:1574/mysid;"/>
or
<add key="oracleConnectString" value="Data Source=myhost.mydomain.com:1574/mysid;User Id=username;Password=password;"/>

I've tried setting up TNS_ADMIN variables in the system and that did nothing for me. Of course, everything works fine on my machine. Just not on the deployed server.

Was it helpful?

Solution

you may have already solved this issue but did you do the following

  1. Download the ODAC xcopy version
  2. Copy the following dll’s from the ODAC folder to either the bin (if web) or location of the exe file

    • oci.dll (Client Code Library)
    • ociw32.dll
    • Oracle.DataAccess.dll
    • orannzsbb11.dll (Security Library)
    • oraocci11.dll (OCCI Library)
    • oraociei11.dll (OCI Instant Client Data shared Library)
    • OraOps11w.dll
  3. I created a blog post that walks though the steps along with a link to a sample application.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top