2

我正在尝试使用 oracle odp xcopy 部署和即时 oracle 客户端,如下所述: http: //ora-00001.blogspot.com/2010/01/odpnet-minimal-non-intrusive-install.html

目标是使用 oracle 而不在机器上安装任何东西。

运行代码时,出现错误:ORA-28547: connection to server failed, probable Oracle Net admin error

当我将连接字符串更改为具有无效的主机或端口或 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]);
                }
            }

帮助将不胜感激

4

1 回答 1

3

在一天结束时,我们下载了另一个 oracle dll 并解决了它。

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.

于 2011-10-24T20:21:39.760 回答