who-aditya-nawandar
who-aditya-nawandar

Reputation: 1342

Oracle with .Net: what DB and what client to use?

I am in a need to use Oracle with .net(VS). I have been struggling with the different versions and compatibility of the database and the client(s). I have formatted my PC twice struggling with all these things. So I have some questions that I need to get cleared before I do another install.

I am running windows 10 (x64) on a x64 machine. What version of Oracle database should I install? I cannot seem to find Oracle12c 32-bit database. During all my struggle I have realized that its better to have 32-bit installations (client/ODAC). They seem to be working well (a lot less compatibility issues).

If I install Oracle 12c (x64), can I use a 32-bit client with it?

I am using data access in my code and hence require oracle.dataaccess.dll to reference. However, I don't see that file with the Instant client installations. That's why I had to install ODAC with ODT (x86) How do I get that with client installation? What is Odp.net? Do I need that?

Anything else that I need to know?

Which of these do I need ?

Which of these do I need?

Upvotes: 1

Views: 2125

Answers (1)

Wernfried Domscheit
Wernfried Domscheit

Reputation: 59503

First of all unistall all your Oracle installation using Oracle Universal Installer. Then have a look at this post How to uninstall / completely remove Oracle 11g (client)? and remove any stuff which remains.

Some general points.

  • Oracle Instant Client does not include ODP.NET drivers (which is basically the Oracle.DataAccess.dll file)
  • The architecture (i.e. 32 or 64 bit) of ODP.NET driver and Oracle Client must match the architecture of your application. They have to be all the same!

In order to make a clean installation go to this page Oracle Database 12c Release 1 (12.1.0.2.0) Downloads and download

  • Oracle Database Client (12.1.0.2.0) for Microsoft Windows (x64)
    (winx64_12102_client.zip)

and/or

  • Oracle Database Client (12.1.0.2.0) for Microsoft Windows (32-bit)
    (winnt_12102_client32.zip)

Of course, you can download also an older release but it should be Oracle Database Client

Then when you run setup, select Custom installation. Select at least component

  • Oracle Data Provider for .NET (which means "ODP.NET")

Following components are not really required but could be beneficial to have them

  • Oracle ODBC Driver
  • Oracle Provider for OLE DB
  • SQL*Plus

In case you like to install both 32 bit and 64 bit Oracle Client, follow this instruction: BadImageFormatException. This will occur when running in 64 bit mode with the 32 bit Oracle client components installed

Upvotes: 1

Related Questions