使用 xcopy ODP.NET 和即时客户端的 ORA-28547
我正在尝试使用 oracle odp xcopy 部署和即时 oracle 客户端,如下所述: http://ora-00001.blogspot.com /2010/01/odpnet-minimal-non-intrusive-install.html
目标是在机器上不安装任何东西的情况下使用oracle。
当我运行代码时,出现错误: ORA-28547:与服务器的连接失败,可能是 Oracle Net 管理错误
当我将连接字符串更改为具有无效的主机或端口或 sid 时 - 它给了我一个很好的错误(错误的主机、或 sid 或端口) 但是当一切正常时 - 我得到了 ORA-28547。
这是我的代码:
using (var con = new Oracle.DataAccess.Client.OracleConnection(
//"Data Source=Server;User Id=U;Password=P;Pooling=false;"
"Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.100.51.122)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));User Id=U;Password=P;Pooling=false;"
))
{
con.Open();
var c = con.CreateCommand();
c.CommandText = "Select * from tab";
using (var r = c.ExecuteReader())
{
while (r.Read())
Console.Write(r[0]);
}
}
非常感谢您的帮助
I'm trying to use oracle odp xcopy deployment, and an instant oracle client as described in:
http://ora-00001.blogspot.com/2010/01/odpnet-minimal-non-intrusive-install.html
The goal is to use oracle without installing anything on the machine.
When I run the code, I get the error:
ORA-28547: connection to server failed, probable Oracle Net admin error
When I changed the connection string to have an invalid host or port or sid - it gave me a good error (wrong host, or sid or port)
But when it's all ok - I get the ORA-28547.
Here is my code:
using (var con = new Oracle.DataAccess.Client.OracleConnection(
//"Data Source=Server;User Id=U;Password=P;Pooling=false;"
"Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.100.51.122)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));User Id=U;Password=P;Pooling=false;"
))
{
con.Open();
var c = con.CreateCommand();
c.CommandText = "Select * from tab";
using (var r = c.ExecuteReader())
{
while (r.Read())
Console.Write(r[0]);
}
}
Help would be greatly appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最后我们下载了另一个oracle dll,它解决了这个问题。
最初我们使用的是 30mb 的版本,这个版本导致了 Theo 问题。一旦我们将其替换为 130 mb 的版本,问题就解决了。
At the end of the day we downloaded another oracle dll and it solved it.
Initially we used the version that was 30mb, and that one caused Theo problem. Once we replaced it with the version that was 130 mb it solved the problem.