1

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?

Community
  • 1
  • 1
who-aditya-nawandar
  • 1,334
  • 9
  • 39
  • 89

1 Answers1

1

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

Community
  • 1
  • 1
Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
  • This is helpful but not completely. Visual Studio is a 32 bit application. So I need 32 bit installations I think. There's no 32 bit 12c database. Also, will odp.net (while installing client ) give me data access.DLL?! – who-aditya-nawandar Nov 11 '16 at 15:01
  • Do you like also to install a database server or just the client? – Wernfried Domscheit Nov 11 '16 at 15:29
  • A server also, preferably 32bit if possible. – who-aditya-nawandar Nov 11 '16 at 15:43
  • I don't know whether an 32bit Windows Database server - I don't think so. Architecture of server if fully independent from client, you can connect in either combination. – Wernfried Domscheit Nov 11 '16 at 18:11
  • You can use 64 bit Oracle client in Visual Studio (i.e. you can run and debug such programs). However, as far as I know you cannot edit code while debugging in 64 bit mode. Maybe this has been rectified in newer releases. – Wernfried Domscheit Nov 11 '16 at 18:13
  • I have tried it. And in my experience I don't think a 64 bit client (dataaccess dll) works with Visual Studio. Now I have just one question can I use a 32-bit ODAC client with a 64 bit 12c database? – who-aditya-nawandar Nov 12 '16 at 11:04
  • Well, it depends what you mean by "works with Visual Studio". You can run and debug 64 bit application. However, you cannot use the Visual Studio build in tools and wizards to connect a database since VS is 32 bit. It is no problem at all to connect to a 64-bit database with a 32-bit client (and vice-versa). – Wernfried Domscheit Nov 12 '16 at 12:30