I have an existing project that is using Oracle.DataAccess to connect to Oracle. I want to migrate to the Oracle.ManagedDataAccess NuGet package. Can we connect to Oracle DB in C# without installing Oracle client?
I have tried below approach as shown in this link
OracleConnectionStringBuilder sb = new OracleConnectionStringBuilder();
sb.DataSource = "MyOracle.MyCompany.com:1521/MySid"; // EZ Connect -- no TNS Names!
sb.UserID = "user1";
sb.Password = "pass1";
OracleConnection conn = new OracleConnection(sb.ToString());
conn.Open();
OracleCommand cmd = new OracleCommand("select * from dual", conn);
object o = cmd.ExecuteScalar();
conn.Close();
But it didn’t work.
I want to be able to connect to Oracle DB without installation of Oracle client.
Shiva Raj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.