문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top