Oracle® Data Provider for .NET Developer's Guide 11g Release 2 (11.2) Part Number E12249-01 |
|
|
View PDF |
Oracle Data Provider for .NET is part of Oracle Data Access Components (ODAC), which can be downloaded from OTN. Beginning with ODAC 11.1.0.6.20, Oracle Data Provider for .NET can be installed through XCopy or Oracle Universal Installer.
XCopy
Administrators use XCopy to deploy Oracle Data Provider for .NET to large numbers of computers for production deployments. The XCopy has a smaller installation size and fine grain control during installation and configuration than Oracle Universal Installer.
Oracle Universal Installer (OUI)
Developers and administrators use Oracle Universal Installer for automated ODP.NET installations. It includes documentation and code samples that are not part of the XCopy.
Note:
This section describes installation using the Oracle Universal Installer. For installation and configuration using the XCopy install, refer to the README.TXT file that is part of the XCopy installation.Additionally, Oracle Data Provider for .NET Dynamic Help is registered with Visual Studio, providing context-sensitive online help that is seamlessly integrated with Visual Studio Dynamic Help. With Dynamic Help, the user can access ODP.NET documentation within the Visual Studio IDE by placing the cursor on an ODP.NET keyword and pressing the F1 function key.
Oracle Data Provider for .NET creates an entry in the machine.config
file of the computer on which it is installed, for applications using ADO.NET 2.0 and OracleClientFactory
class. This enables the DbProviderFactories
class to recognize ODP.NET.
See Also:
Oracle Database Installation Guide for Windows for installation instructionsThe Oracle.DataAccess.dll
assembly is installed as follows:
.NET Framework 2.0 and higher:
ORACLE_BASE
\
ORACLE_HOME
\
odp.net\bin\2.x
directory
Documentation and the readme.txt
file are installed in the ORACLE_BASE
\
ORACLE_HOME
\
ODP.NET
\
doc
directory.
Samples are provided in the ORACLE_BASE
\
ORACLE_HOME
\
ODP.NET
\
Samples
directory.
Upon installation, ODP.NET creates entries for configuration and tracing within the Windows Registry. Configuration and tracing registry values apply across all ODP.NET applications running in that Oracle client installation. Individual ODP.NET applications can override some of these values by configuring them within the ODP.NET application itself (for example, FetchSize
). Applications can also use the .NET configuration files to override some of the ODP.NET Windows Registry values.
The ODP.NET registry values are located under HKEY_LOCAL_MACHINE\Software\Oracle\ODP.NET\
version
\
.
Note:
32-bit applications running on an x64-based version of Windows use the registry subkey,HKEY_LOCAL_MACHINE\Software\WOW6432node
in place of HKEY_LOCAL_MACHINE\Software
. If such applications use Oracle Data Provider for .NET (32-bit), then the ODP.NET registry values are located under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Oracle\ODP.NET\version\
.For customers who have numerous applications on a computer that depends on a single version of ODP.NET, the Windows Registry settings for a given version of ODP.NET may not necessarily be applicable for all applications that use that version of ODP.NET. To provide more granular control, ODP.NET Configuration File Support allows developers to specify ODP.NET configuration settings in an application config, web.config
, or a machine.config
file.
If a computer does not require granular control beyond configuration settings at the ODP.NET version level, there is no need to specify ODP.NET configuration settings through configuration files.
The following is an example of a web.config
file for .NET Framework 2.0 and higher:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <oracle.dataaccess.client> <settings> <add name="DllPath" value="C:\oracle\bin"/> <add name="FetchSize" value="131072"/> <add name="PromotableTransaction" value="promotable"/> <add name="StatementCacheSize" value="10"/> <add name="TraceFileName" value="C:\odpnet2.trc"/> <add name="TraceLevel" value="63"/> <add name="TraceOption" value="1"/> </settings> </oracle.dataaccess.client> </configuration>
ODP.NET consists of managed and unmanaged binaries. Through the use of the DllPath
configuration parameter, each application can specify the ORACLE_BASE\\ORACLE_HOME
\bin
location that the dependent unmanaged Oracle Client binaries are loaded from. However, the ORACLE_BASE\\ORACLE_HOME
must have the same ODP.NET version installed as the version that the application uses. Otherwise, a version mismatch exception is thrown.
The Oracle.DataAccess.dll
searches for dependent unmanaged DLLs (such as Oracle Client) based on the following order:
Directory of the application or executable.
DllPath
setting specified by application config or web.config
.
DllPath
setting specified by machine.config
.
DllPath
setting specified by the Windows Registry.
HKEY_LOCAL_ MACHINE\Software\Oracle\
ODP.NET\
version
\DllPath
Directories specified by the Windows PATH
environment variable.
Upon installation of ODP.NET, Oracle Universal Installer sets the DllPath
Windows Registry value to the ORACLE_BASE\\ORACLE_HOME
\bin
directory where the corresponding dependent DLLs are installed. Developers must provide this configuration information on an application-by-application basis.
When a new ODP.NET version is installed, default values are set in the Windows Registry for the new version. Because the policy DLLs redirect all ODP.NET references to this new ODP.NET version, applications use the default values. Developers can provide a config or web.config
file specific to the application to prevent this redirection. The configuration file settings always apply to the application, regardless of whether or not patches or new versions are installed later.
ODP.NET Configuration File Support is only available for version 10.2.0.4 and later.