|Considerations Using The Oracle Client With Microsoft Products on 64 bit Windows Operating System (文档 ID 781432.1)||转到底部|
In this Document
APPLIES TO:Oracle Database Extensions for .NET - Version 10.2.0.3.0 and later
Oracle Provider for OLE DB - Version 220.127.116.11 and later
Oracle Data Provider for .NET - Version 18.104.22.168 and later
Oracle Providers for ASP.NET - Version 22.214.171.124.20 and later
Oracle Objects for OLE - Version 126.96.36.199 and later
Microsoft Windows x64 (64-bit)
Microsoft Windows Itanium (64-bit)
The purpose of this note is to discuss some of the Oracle specific considerations and issues that occur when using Oracle client with Microsoft products on a 64 bit operating system, their solutions, and notes for further reference.
With the introduction of 64 bit Windows operating system, Microsoft provides the ability to run 32 bit applications via the SYSWOW64 subsystem. As both 64 bit and 32 bit applications can be run on a 64 bit operating system, issues may be encountered if the correct bit version of the Oracle client software is not installed to meet your specific requirements.
Example: Using Visual Studio and ODP.NET : using Server Explorer inside Visual Studio requires a 32 bit Oracle client install as the Visual Studio IDE is 32 bit. Debugging an application in Visual Studio requires a 64 bit Oracle client install : although you're using the 32 bit IDE, the 64 bit host runtime is invoked. Running the resulting application/executable outside Visual Studio requires the appropriate bit version for the platform you're running the application on; if running on a 64 bit OS, you'll need a 64 bit Oracle client install. The same scenario applies to developing SSIS packages with Oracle's OLEDB provider.
IIS applications run as 64 bit on a 64 bit Operating system by default, so 64 bit Oracle client software is needed. In the case of Oracle Objects for Ole for example, which has only a 32 bit version, IIS will need to be configured to run as 32 bit (see below).
64 bit applications require 64 bit Oracle Client software, and 32 bit applications require 32 bit Oracle client software. Oracle does not currently provide a single bundle that will install both 32 bit and 64 bit Oracle client, so in order to run both 32 bit and 64 bit applications on the same operating system both 32 bit and 64 bit Oracle client software will need to be installed as separate steps, and the installs need to go into separate Oracle homes.
Please note: that there is currently an issue where installing both 32 bit and 64 bit client on the same box will cause the second installation to overwrite the Start Menu shortcuts of the first installation if separate Oracle Home names are not used. 11.2 does not give you the opportunity to set the Oracle Home names via the OUI, but you can pass it as a command line argument,
Additionally, while both homes can share an ORACLE_BASE and function correctly, separate ORACLE_BASEs should be used due to issues when de-installing one client but not the other, as documented in <Bug:10360738>
-The 64 bit Oracle home will be setup in the registry in the following location:
Earlier versions of Oracle client software had a known bug that resulted in a ora-6413 or ora-12154 when an application was run from a path containing parenthesis, which is the default location for installation of 32 bit applications on a 64 bit operating system - Program Files (x86). Applying the latest patches to the client install should resolve this issue. For more information refer to Note.334528.1.
Specific considerations regarding specific Oracle Products
Oracle ODBC Driver- The 32 bit ODBC driver framework and 64 bit ODBC driver framework are separate and distinct. To use the Oracle ODBC driver with a 32 bit application, the 32 bit driver and Oracle client need to be installed, and the 32 bit ODBC administrator must used to setup a 32 bit DSN. See Note 308645.1for more information.
The ODBC administrator will only show you the Data Source Names (DSN) of the appropriate bitness (32 vs 64) when selecting from a list of SYSTEM DSNs, however USER and FILE DSNs are not stored separately based on architecture, Ensure you're trying to use a dsn that is the proper architecture for your application.
Note that the driver dll is named sqora32.dll in both 32 bit and 64 bit cases, and there is no sqora64.dll
On Windows 7, the 64 bit regsvr32 utility can be used to register both 32 bit and 64 bit ORAOLEDB, but it needs to be done once for each version . Note however that uninstalling ORAOLEDB (via regsvr32 /u) will uninstall BOTH the 32 bit and 64 oledb provider at the same time, so the other version will need to be re-registered.
Numerous recent fixes with respect to metadata and the 64 bit Oracle OLEDB provider reports have occurred. If using OraOledb with SQLServer it is highly recommended to use the latest version to have all the available fixes. See Note 191368.1 for more information on configuring a linked server.
Oracle Data Provider for .NET (ODP.NET) - While ODP.NET installs policy files to redirect applications looking for older versions of the provider to the currently installed version, the policy files do not include redirection from versions earlier than 188.8.131.52.20, or applications compiled with ODP 1.x, as .NET framework version of 2.x is the minimum 64 bit version. Explicit redirection by the user can be enabled via the use of a .config file, but by default 1.x .NET applications can only run as 32 bit applications since there is no 1.x framework for x64, and as such require 32 bit software. For more information, please refer to the "ODP.NET Publisher Policy Files, .NET Framework 2.0 Support and Breaking Changes" section of Note 761214.1
The first version of ODP.NET for 64 bit operating system is 10.2.0.3.0.
A .NET application developed on a 32 bit operating system can be deployed to a 64 bit operating system without changes. In such cases, 64 bit Oracle software will need to be installed on the deployment target as the default compilation target is Any CPU which will cause .NET applications to run as 64 bit on a 64 bit Operating System, and 32 bit on a 32 bit Operating system. If the application is compiled with a target of "x86", then the application will only run as 32 bit will and require 32 bit ODP.NET and Oracle software to be installed. Corflags.exe can be used to determine the compilation flags.
Oracle Objects for OLE (OO4O) - The Oracle Objects for OLE product is not available as a 64-bit product. If you plan to migrate your oo4o applications to 64-bit Windows they will be required to run in 32-bit mode with the 32 bit oracle client. If you are deploying an oo4o web application hosted under IIS 6.0, then you will need to be aware that worker processes within IIS 6.0 will have to be configured to run as 32 bit processes.
Note however that 32 bit OO4O on a 64 bit OS is not considered a supported configuration by Oracle.
We highly recommend you consider the migration path to the Oracle Data Provider for .NET and rewrite the application to run on the .NET platform.
Oracle Developer Tools for Visual Studio (ODT.NET) - Visual Studio is a 32 bit product, even when run on a 64 bit operating system. In order to use Oracle Developer Tools for Visual Studio on a 64 bit operating system, the 32 bit ODAC installation will need to be used and installed. 64 bit Oracle software will need to be installed (into a separate home) to run the resulting program outside the IDE.
However, as of this writing, due to Bug 7622155, installing 32 bit ODAC onto a 64 bit operating system results in the wrong Machine.config being updated, which can be worked around by following the suggestions in this thread.
Oracle COM Automation Feature - The 64 bit database process can only run 64 bit libraries, so the database cannot run a 32 bit VB dll, for example.