2.5 Installing Oracle Data Provider for .NET, Managed Driver
Getting started with ODP.NET, Managed Driver
You can get started with ODP.NET Managed Driver by either using the Oracle Universal Installer (OUI), XCopy, or NuGet.
If you are using OUI: Follow the Oracle Universal Installer (OUI) steps to install ODP.NET, Managed Driver
If you are using XCopy: Download ODP.NET, Managed Driver .zip
file to a directory for staging the install. The .zip
file contains a README file with XCopy installation instructions.
Run the configure.bat
script in one of the following directories:
-
For 32-bit .NET Framework:
OH\odp.net\managed\x86
-
For 64-bit .NET Framework:
OH\odp.net\managed\x64
Each directory contains an unconfigure.bat
if ODP.NET, Managed Driver needs to be unconfigured and removed from the machine.
If you are using NuGet: Download the ODP.NET NuGet package(s) and use NuGet Package Manager to install.
The following NuGet packages are available:
-
ODP.NET, Managed Driver
-
Entity Framework assembly for Code First and Entity Framework 6 or higher use with ODP.NET, Managed Driver
If you are using Windows Installer: Follow the Microsoft Windows Installer (MSI) steps to install ODP.NET, Managed Driver.
ODP.NET, Managed Driver Files
ODP.NET, Managed Driver consists of the following files:
Table 2-1 ODP.NET, Managed Driver Files with Descriptions
File | Description |
---|---|
|
Platform-independent (AnyCPU), fully-managed ADO.NET provider |
|
Platform-dependent (64-bit .NET Framework only), Managed Assembly for Distributed Transaction support. |
|
Platform-dependent (32-bit .NET Framework only), Managed Assembly for Distributed Transaction support. |
|
Platform-independent (AnyCPU), fully-managed ADO.NET provider resource DLLs. |
|
Platform-independent (AnyCPU) utility to configure/unconfigure ODP.NET, Managed and Unmanaged Drivers. |
|
Batch file to place ODP.NET, Managed Driver into the GAC and add configuration entries into the machine.config. |
|
Batch file to remove ODP.NET, Managed Driver from the GAC and remove configuration entries from machine.config. |
|
A sample configuration file that defines data source aliases. |
|
A sample configuration file that configures network related settings. |
|
An XML schema file that defines the configuration section for ODP.NET, Managed Driver. |
|
Platform-independent (AnyCPU), fully-managed assembly for Code First and Entity Framework 6 higher |
|
Platform-dependent (64-bit .NET Framework), Managed Assembly for Kerberos support |
|
Platform-dependent (32-bit .NET Framework), Managed Assembly for Kerberos support |
-
Oracle.ManagedDataAccessDTC.dll
is only needed if the application uses distributed transactions and the .NET Framework version is 4.5.1 or earlier. Higher .NET Framework versions do not require this DLL. -
If distributed transactions are used by ODP.NET, Managed Driver running in .NET Framework 4.5.1 or earlier, then the appropriate
Oracle.ManagedDataAccessDTC.dll
(32-bit or 64-bit .NET Framework) must be loaded in the Global Assembly Cache (GAC) or in the same directory as the.exe
for it to be loaded byOracle.ManagedDataAccess.dll
. The installer no longer GACs this DLL. It must now be performed manually. -
Oracle.ManagedDataAccessDTC.dll
must not be referenced by the application. ODP.NET, Managed Driver will reference it implicitly. -
On a 64-bit OS, only the x64 version of
Oracle.ManagedDataAccessDTC.dll
is placed into the GAC upon the completion of an OUI install or an invocation of the XCopyconfigure.bat
.
See Also:
Oracle Database Installation Guide for Microsoft Windows for installation instructions
2.5.1 Platform-Dependent Assemblies and Their Search Order
ODP.NET, Managed Driver has two sets of platform-dependent DLLs: Oracle.ManagedDataAccessDTC.dll
and Oracle.ManagedDataAccessIOP.dll
. For each DLL, there is a 32-bit .NET version and a 64-bit .NET version. While they consist of 100% managed code, they call APIs outside of .NET, which is why they are platform dependent.
Oracle.ManagedDataAccessDTC.dll
supports coordinating distributed transactions. This assembly is only needed in your application if you use distributed transactions with .NET Framework 4.5.1 or lower. It is optional to use with .NET Framework 4.5.2 or higher.
Oracle.ManagedDataAccessIOP.dll
supports Kerberos. This assembly is only needed in your application if you are using Kerberos security.
These two assemblies are not intended to be directly referenced by an application. Rather, they will be referenced implicitly. ODP.NET, Managed Driver will reference these assemblies by using the following search order:
-
Global Assembly Cache
-
The web application's bin directory or Windows application's
EXE
directory -
The
x86
orx64
subdirectory based on whether the application runs in 32-bit or 64-bit .NET Framework. If the application is built using AnyCPU, then ODP.NET will use the correct DLL bitness as long as the assembly is available. Oracle recommends using this method of finding dependent assemblies if your application is AnyCPU.
For example, use the following steps for your application to use the 64-bit version of Oracle.ManagedDataAccessIOP.dll
:
- Right click Visual Studio project, select Add, and then select New Folder.
- Name the folder x64.
- Right-click the newly created x64 folder, select Add, and then select Existing Item.
- Browse to the folder where the DLL is located, which usually is
ORACLE_HOME
\odp.net\managed\x64
, and then select Oracle.ManagedDataAccessIOP.dll. - Click Add.
- Click the newly added Oracle.ManagedDataAccessIOP.dll in the x64 folder.
- In the properties window, set Copy To Output Director to Copy Always.
For x86 targeted applications, name the folder x86 and add the assembly from the x86 directory.
Use the same steps for adding Oracle.ManagedDataAccessDTC.dll
.
To make your application platform independent even if it depends on Oracle.ManagedDataAccessDTC.dll
, Oracle.ManagedDataAccessIOP.dll
or both, create both x64 and x86 folders with the necessary assemblies added to them.
2.5.2 File Locations After Installation
In an Oracle Universal Installer based install, the Oracle.ManagedDataAccess.dll
assembly is installed to the following location:
.NET Framework 4:
ORACLE_BASE
\
ORACLE_HOME
\
odp.net\managed\common
directory
Documentation and the readme.txt
file can be accessed through ORACLE_BASE
\
ORACLE_HOME
\
ODACDoc\DocumentationLibrary\doc\index.htm
.
Samples are provided in the ORACLE_BASE
\
ORACLE_HOME
\
ODACsamples
directory.