Managed Oracle Data Provider for .NET (ODP.NET) features optimized ADO.NET data access to the Oracle database for .NET Framework and is 100% managed code. ODP.NET allows developers to take advantage of advanced Oracle database functionality, including Real Application Clusters, self-tuning statement cache, Application Continuity, JSON Relational Duality, and Fast Connection Failover.
$ dotnet add package Oracle.ManagedDataAccessRelease Notes: Oracle Data Provider for .NET, Managed Driver
December 2023
This document provides information that supplements the Oracle Data Provider for .NET (ODP.NET) documentation.
You have downloaded Oracle Data Provider for .NET. The license agreement is available here: https://www.oracle.com/downloads/licenses/distribution-license.html
TABLE OF CONTENTS *New Features *Bug Fixes *Installation and Configuration Steps *Installation Changes *Documentation Corrections and Additions *ODP.NET, Managed Driver Tips, Limitations, and Known Issues
Note: The 32-bit "Oracle Developer Tools for Visual Studio" download from https://otn.oracle.com/dotnet is required for Entity Framework design-time features and for other Visual Studio designers such as the TableAdapter Wizard. This NuGet download does not enable design-time tools; it only provides run-time support. This version of ODP.NET supports Oracle Database version 11.2.0.4 and higher.
Bug 35852518 - ONE-WAY TLS ENCOUNTERS "ORACLE COMMUNICATION: FAILED TO CONNECT TO SERVER OR FAILED TO PARSE CONNECT STRING" Bug 35985984 - BULKCOPY CORRUPTS INSERTED DATA WHEN COLUMN DATA EXCEEDS COLUMN DEFINED LENGTH Bug 35999664 - NULLREFERENCEEXCEPTION WHEN CREATING LOT OF CONNECTIONS IN PARALLEL WITH DIFFERENT PROXY USERS
The downloads are NuGet packages that can be installed with the NuGet Package Manager. These instructions apply to install ODP.NET, Managed Driver.
Un-GAC and un-configure any existing assembly (i.e. Oracle.ManagedDataAccess.dll) and policy DLL (i.e. Policy.4.122.Oracle.ManagedDataAccess.dll) for the ODP.NET, Managed Driver, version 4.122.19.1 that exist in the GAC. Remove all references of Oracle.ManagedDataAccess from machine.config file, if any exists.
In Visual Studio, open NuGet Package Manager from an existing Visual Studio project.
Install the NuGet package from NuGet Gallery (nuget.org).
A. Click on the Settings button in the lower left of the dialog box.
B. Click the "+" button to add a package source. In the Source field, enter in the directory location where the NuGet package(s) were downloaded to. Click the Update button, then the Ok button.
C. On the left side, under the Online root node, select the package source you just created. The ODP.NET NuGet packages will appear.
A. In the Search box in the upper right, search for the package with id, "Oracle.ManagedDataAccess". Verify that the package uses this unique ID to ensure it is the official Oracle Data Provider for .NET, Managed Driver download.
B. Select the package you wish to install.
Click on the Install button to select the desired NuGet package(s) to include with the project. Accept the license agreement and Visual Studio will continue the setup.
Open the app/web.config file to configure the ODP.NET connection string and connect descriptors. Below is an example of configuring the net service aliases and connect descriptors parameters:
<oracle.manageddataaccess.client> <version number="*"> <dataSources> <!-- Customize these connection alias settings to connect to Oracle DB --> <dataSource alias="MyDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) " /> </dataSources> </version> </oracle.manageddataaccess.client>
After following these instructions, ODP.NET is now configured and ready to use.
IMPORTANT: Oracle recommends configuring net service aliases and connect descriptors in a .NET config file to have the application configuration be self-contained rather than using tnsnames.ora or TNS_ADMIN.
NOTE: ODP.NET, Managed Driver comes with one set of platform specific assemblies for Kerberos support: Oracle.ManagedDataAccessIOP.dll.
The Oracle.ManagedDataAccessIOP.dll assembly is ONLY needed if you are using Kerberos5 based external authentication. Kerberos5 users will need to download MIT Kerberos for Windows version 4.0.1 from https://web.mit.edu/kerberos/dist/ to utilize ODP.NET, Managed Driver's support of Kerberos5.
The asssemblies are located under packages\Oracle.ManagedDataAccess.<version>\bin\x64 and packages\Oracle.ManagedDataAccess.<version>\bin\x86 depending on the platform.
If these assemblies are required by your application, your Visual Studio project requires additional changes.
Use the following steps for your application to use the 64-bit version of Oracle.ManagedDataAccessIOP.dll:
For x86 targeted applications, name the folder x86 and add assemblies from the packages\Oracle.ManagedDataAccess.<version>\bin\x86 folder.
To make your application platform independent even if it depends on Oracle.ManagedDataAccessIOP.dll, create both x64 and x86 folders with the necessary assemblies added to them.
The following app/web.config entries are added by including the ODP.NET, Managed Driver NuGet package to your application:
The following entry is added to the app/web.config to enable applications to add an <oracle.manageddataaccess.client> section for ODP.NET, Managed Driver-specific configuration:
Note: If your application is a web application and the above entry was added to a web.config and the same config section handler for "oracle.manageddataaccess.client" also exists in machine.config but the "Version" attribute values are different, an error message of "There is a duplicate 'oracle.manageddataaccess.client' section defined." may be observed at runtime. If so, the config section handler entry in the machine.config for "oracle.manageddataaccess.client" has to be removed from the machine.config for the web application to not encounter this error. But given that there may be other applications on the machine that depended on this entry in the machine.config, this config section handler entry may need to be moved to all of the application's .NET config file on that machine that depend on it.
The following entry is added for applications that use DbProviderFactories and DbProviderFactory classes. Also, any DbProviderFactories entry for "Oracle.ManagedDataAccess.Client" in the machine.config will be ignored with the following entry:
The following entry is created to ignore policy DLLs for Oracle.ManagedDataAccess.dll and always use the
Oracle.ManagedDataAccess.dll version that is specified by the newVersion attribute in the <bindingRedirect> element.
The newVersion attribute corresponds to the Oracle.ManagedDataAccess.dll version which came with the NuGet package
associated with the application.
The following entry is added to provide a template on how a data source can be configured in the app/web.config. Simply rename "MyDataSource" to an alias of your liking and modify the PROTOCOL, HOST, PORT, SERVICE_NAME as required and un-comment the <dataSource> element. Once that is done, the alias can be used as the "data source" attribute in your connection string when connecting to an Oracle Database through ODP.NET, Managed Driver.
None
None
Copyright (c) 2021, 2023, Oracle and/or its affiliates.