0

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

user595234
  • 6,007
  • 25
  • 77
  • 101
  • 1
    "I am sure the connection info is correct" - apparently Oracle and .NET disagree with you. Believe the fact that you don't have a connection and figure out what you did wrong. – duffymo May 09 '12 at 16:52

1 Answers1

1

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)
Jim Gomes
  • 774
  • 8
  • 15