Noam
Noam

Reputation: 5276

ORA-28547 using xcopy ODP.NET and instant client

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

Upvotes: 2

Views: 2142

Answers (1)

Noam
Noam

Reputation: 5276

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.

Upvotes: 3

Related Questions