user595234
user595234

Reputation: 6249

Spring .NET oracle connection failed

In the Spring .NET, I need to connect to Oracle database, I am sure the connection info is correct, but still not open Oracle connection.

The provider is using 'OracleODP-2.0', how can I verify I have correct Oracle .NET driver installed in my project / pc ?

The exception is

[OracleException (0x80004005)]
   Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck) +1440
   Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src) +80
   Oracle.DataAccess.Client.OracleConnection.Open() +7561

Thanks

Upvotes: 0

Views: 913

Answers (1)

Jim Gomes
Jim Gomes

Reputation: 824

I encountered this same problem. It doesn't have anything to do with the connection string, and we'll assume that it is correct. What I found is that critical files from the Oracle client were missing. Once I added them, then I stopped getting this error. I have narrowed it down to the following minimum number of files. More files may be required for advanced functionality, but these are the minimum you should have in your installation. I am using the OracleClient 11.2.0.3.0:

  • Oracle.DataAccess.dll (Main reference assembly)
  • OraOps11w.dll
  • oci.dll
  • oraociei11.dll (Ths was the main DLL that fixed the Open() exception error)

Upvotes: 1

Related Questions