我已经部署了一个web服务,并且正在使用bin文件夹中的Oracle Instant Client实例。问题是,无论我在测试服务器上使用什么连接字符串,我都会得到ORA-12154错误或ORA-12545错误。
下面是我尝试过的连接字符串:
//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;"/>我尝试过在系统中设置TNS_ADMIN变量,但这对我没有任何帮助。当然,在我的机器上一切正常。只是不在已部署的服务器上。
发布于 2011-10-22 04:27:15
您可能已经解决了此问题,但您是否执行了以下操作
ODAC xcopy版本
下载
的bin (如果是web)或exe文件的位置
- 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
的链接
- [http://chadit.wordpress.com/2011/10/21/connect-from-net-to-oracle-without-installing-the-oracle-client/](http://chadit.wordpress.com/2011/10/21/connect-from-net-to-oracle-without-installing-the-oracle-client/)
https://stackoverflow.com/questions/5890517
复制相似问题