Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Oracle Client and ODAC

Tags:

oracle

odac

What is the difference between installing the full Oracle Client and an Oracle Odac install? Which will I need to do .NET development on my dev workstation and which will I need on the web application server that will connect with the Oracle database on another server?

like image 836
Vince Miccio Avatar asked Dec 06 '22 22:12

Vince Miccio


2 Answers

It's pretty confusing, and writing this down again helped me.

My summary:

  • The Oracle Instant Client only exposes direct OCI (Oracle Call Interface) APIs, so only relevant to Oracle-aware applications (see, say, http://www.oracle.com/technetwork/topics/winx64soft-089540.html )
  • ODAC includes the Instant Client, plus also a bunch of Microsoft-facing APIs on top of that (.net providers, ASP.Net membership provider, OLEDB driver, ODBC driver, MTS transaction coordinator) which cover what you'd need in most Windows application scenarios. eg http://www.oracle.com/technetwork/topics/dotnet/downloads/install112021-200037.html. ODAC comes in two flavours: the 'xcopy' version, and the OUI (Oracle Universal Installer) version (and only the OUI version includes SQL*Plus [#1])
  • ODT (Oracle Developer Tools for .Net) provides the Visual Studio integration, and is normally bundled with ODAC (you get a download called ODTwithODACxxxx.zip) eg http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
  • The Oracle.DataAccess nuget package is a version of the ODAC .net driver, so requires an existing Instant Client install (ie uses OCI). Confusingly, at one point this was labeled a managed driver (because it is, just has some significant non-managed local dependencies).
  • The Oracle.ManagedDataAccess nuget package is a fully-managed .net driver that works in 'direct' mode, and needs no local instant client

So for most .net people, 'Oracle Client' means OUI-installed ODAC Instant Client + .Net drivers, possibly also ODT.

For the nugets, it's worth pointing out that even now (Jan 2017) the Oracle.ManagedDataAccess driver still can't do a bunch of stuff[#2], so Oracle.DataAccess + InstantClient is not a totally obsolete option. If you are just reading and writing with SELECT/INSERT, or vanilla ADO.Net you will be fine. I'm told the EF support is much better than it used to be also. DevArt's dotConnect drivers are another (very good) option here.

There's also a nuget package for the Oracle instant client, but I have no idea what that is for. Presumably Win32/.Net native-OCI apps that want a zero-install Instant Client via nuget. Both of them.

[#1] SQL*Plus would presumably be little used at runtime, though there is a separate installer listed on the Instant Client download page if you want to to add it to an existing ODAC install.

[#2] eg: call oracle stored procedures with table-valued UDTs

like image 190
piers7 Avatar answered Jan 28 '23 02:01

piers7


ODAC includes Oracle Data Provider for .NET, Oracle Developer Tools for Visual Studio (ODT), Oracle Providers for ASP.NET, .NET stored procedure support, as well as additional Oracle data access software for Windows.

-Oracle's site.

The full Oracle client includes a lot of extra software, for example SQLPlus, SQL Developer etc.

Anyways, that's mostly irrelevant. The standard way of obtaining database drivers in .NET is by using NuGet, and Oracle has an official managed driver with no outside dependencies that's the simplest way to get started. You add that package via NuGet to your application, and the necessary DLL's will be included with your application when you publish it without needing to specially configure the server.

like image 26
mason Avatar answered Jan 28 '23 01:01

mason