Migrating from ODP.NET, Unmanaged Driver to ODP.NET, Managed Driver or ODP.NET Core

To take advantage of new and better feature sets in managed ODP.NET and ODP.NET Core, developers are migrating their existing unmanaged ODP.NET code to these providers. Migration from unmanaged to either managed or core ODP.NET is often straightforward and simple.

The APIs of ODP.NET, Managed Driver and ODP.NET Core are nearly identical. Those two provider APIs generally match ODP.NET, Unmanaged Driver APIs.

As unmanaged ODP.NET is deprecated, it will see fewer new features in the future. Managed and core providers will continually add new Oracle database, cloud, and .NET feature support.

To migrate from unmanaged ODP.NET to managed ODP.NET or ODP.NET Core, perform the following steps:

  1. Add a Reference to Oracle.ManagedDataAccess.dll in the .NET project.
  2. Change the existing ODP.NET, Unmanaged Driver namespace references to ODP.NET, Managed Driver references.
    // C#
    using Oracle.ManagedDataAccess.Client;
    using Oracle.ManagedDataAccess.Types;
    
    // VB
    Imports Oracle.ManagedDataAccess.Client
    Imports Oracle.ManagedDataAccess.Types
    
  3. Some provider configuration settings may need to be migrated because ODP.NET, Managed Driver supports very few Windows Registry settings and a different .NET configuration setting format. ODP.NET Core does not support Windows Registry settings nor .NET Framework configuration files, that is, app/machine/web.config.

See Also:

Configuring Oracle Data Provider for .NET for more information.