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