Rahul Vijay Dawda
Rahul Vijay Dawda

Reputation: 1193

ODAC 12c Release 2 (12.1.0.1.2) Xcopy compatibility with Oracle 11g R2 database

I'm trying to upgrade my C# projects to use to use the latest ODAC 12c release for which I downloaded the ODAC 12.1 xcopy for Windows. The installation was fine but the problem started when I tried executing a unit test.

My test case fails on connection.Open(). The sample is below:

OracleConnection con = new OracleConnection(); 
con.ConnectionString = @"User Id = test, Password = test; Data Source = test";
con.Open();

Unfortunately, there is no exception message and the Stack Trace isn't of much help either:

Result StackTrace:

at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck, Int32 isRecoverable)
   at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
   at Oracle.DataAccess.Client.OracleConnection.Open()
   at MyProgram.Program.GetDetails()

When I tried debugging, an error message box popped up at the start of execution stating: The entry of procedure ons_init_wconfig_ctx point is not found in the dynamic link library oraons.dll.

I wonder if there's something missing.

Oracle DB version: 11.2.0.3.0 Oracle Client version: 11.2.0.3.0 ODAC version: 12.1.0.1.2

Upvotes: 2

Views: 2210

Answers (2)

Mohan
Mohan

Reputation: 11

I had the same problem of "The entry of procedure ons_init_wconfig_ctx point is not found in the dynamic link library oraons.dll" with our desktop application.

After spending many days finally found the solution to make working. Steps are given below:

  1. Remove unwanted oracle homes from PATH variable, for example i had installed ODAC 12 both 32 bit and 64 bits.
  2. The oraons.dll was not present in my C:\app\client\mdas0004\product\12.1.0\client_1\bin so i copied the dll from C:\app\client\mdas0004\product\12.1.0\client_1 to the bin folder.

Bingo started working.

Upvotes: 1

b_levitt
b_levitt

Reputation: 7415

If this is with the unmanaged client, try setting a dllpath:

<configuration>
 <oracle.dataaccess.client>
   <add key="DllPath" value="C:\<your_xcopy_dir>\bin"/>
 </oracle.dataaccess.client>
</configuration> 

You might be picking up the unmanaged dlls from a previous oracle home. Normally I'd expect a "failed to load assembly" message but maybe things have changed with 12. If that does fix it, and you're tired of dealing with "oracle homes" then consider the new Oracle.ManagedDataAccess.dll instead.

In anycase, I would not expect this to be a client/server compatibility issue.

Upvotes: 0

Related Questions