# Oracle Data Access Components (ODAC) 12.2c Release 1

Xcopy Installation Guide

Release 12.2.0.1.0 for ODAC 12.2c Release 1

#### May 2017

#### Copyright (c) Oracle Corporation 2017

This document provides information regarding the contents on the zip file and the steps required to setup Oracle Data Access Components xcopy installation into an Oracle Instant Client Home.

- New Features
- General Information
- Installation Instructions
- Uninstallation Instructions
- Notes

## New Features

The following features are newly supported in this release, but were not included in the documentation.

1. .NET Framework 4.7 certification

## General Information

1. The files of this zip file are NOT to be installed on top of an existing Oracle Universal Installer (OUI) based Oracle Home installation.
2. After unzipping the files, products must be installed and configured by executing the install.bat.
3. ODP.NET does not support usage of the "ALTER SESSION" statement to modify the Edition in Edition-Based Redefinition during the lifetime of a process.
4. ODP.NET, Managed Driver and Distributed Transactions - Using managed ODP.NET distributed transactions with Oracle.ManagedDataAccessDTC.dll is deprecated as it is primarily used with .NET Framework 4 releases earlier than .NET 4.5.2. Microsoft has desupported these earlier .NET Framework 4 versions. Managed ODP.NET distributed transactions will continue to be supported and enhanced with .NET Framework's native fully managed distributed transaction implementation.

## Installation Instructions

1. Download the ODAC (xcopy version) zip file to a directory for staging ODAC products.
2. Unzip ODAC (xcopy version) zip file to expand the contents.
   The following directories will be created:
   a) Instantclient_12_2 - Oracle Instant Client
   b) ODP.NET20 - Oracle Data Provider for .NET 2.0
   c) ODP.NET4 - Oracle Data Provider for .NET 4 -- contains both managed and unmanaged drivers
   d) ASP.NET - Oracle Providers for ASP.NET 2.0
   e) ASP.NET4 - Oracle Providers for ASP.NET 4
   f) OLEDB - Oracle Provider for OLEDB
   g) OraMTS - Oracle Services for MTS
   The install.bat will also be extracted to the same location as the ODAC zip file, which is used to install and configure a specific product.
3. If installing into an existing xcopy home, uninstall the existing version by following the instructions in the "Uninstallation Instructions" section of this README.
4. Execute install.bat to install and configure ODAC products.
   Note: Depending on the components to install/configure, administrative level privileges may be required. Oracle recommends running the batch file under the "Run as Administrator" context.
   To install all ODAC products, execute the following:
   install.bat all c:\oracle odac
   Each product can be also be installed and configured individually. As an example, executing the following will install only ODP.NET for .NET Framework 4
   install.bat odp.net4 c:\oracle odac
   where "c:\oracle", for example, is your installation directory and "odac" is the Oracle Home Name that is used for the registry keys. In this example, the registry entries for this install are created under HKLM\Software\Oracle\KEY_odac. Note that ODP.NET registry entries are simply created under HKLM\Software\Oracle\ODP.NET\ not under HKLM\Software\Oracle\KEY_<Oracle Home Name>. If multiple products are installed to the same destination directory, make sure that the Oracle Home Name that is specified as an argument to install.bat is the same for all those products.
   By default, when install.bat is executed for a given product, the product and its dependencies will be installed and configured WITHOUT a check to see if there is a newer version of the product or its dependencies already installed.
   Below is the product dependency information:
   a) Oracle Data Provider for .NET 2 depends on
   - Oracle Instant Client
   b) Oracle Data Provider for .NET 4 depends on
   - Oracle Instant Client (ODP.NET, Unmanaged Driver only)
   c) Oracle Providers for ASP.NET 2 depends on
   - Oracle Instant Client
   - Oracle Data Provider for .NET 2 (unmanaged driver)
   d) Oracle Providers for ASP.NET 4 depends on
   - Oracle Data Provider for .NET 4 (managed driver)
   e) Oracle Provider for OLEDB depends on
   - Oracle Instant Client
   f) Oracle Services for MTS depends on
   - Oracle Instant Client
   To not have the product dependencies installed and configured, execute install.bat with 'false' as the fourth parameter.
   For example, executing
   install.bat odp.net4 c:\oracle odac false
   will only install and configure ODP.NET 4 and not install and configure instant client. If the second to last argument is not specified, the product and its dependencies will be installed and configured.
   By default, machine_wide_configuration=false. If machine_wide_configuration option is true, ODP.NET assemblies are placed into the GAC and machine.config is configured, which impacts the entire machine. However, if machine_wide_configuration option is false, ODP.NET assemblies are not placed into the GAC and machine.config is not modified. Please simply execute install.bat without any parameters for more details. If setting machine_wide_configuration=false, ungac pre-existing ODP.NET and Oracle ASP.NET provider assemblies from all homes on the machine and unconfigure them from machine.config. This can be accomplished by following the instructions in the "Uninstallation Instructions" section of this README.
5. Add the install directory and install directory's bin subdirectory to the system PATH environment variable before any other Oracle directories. Otherwise, the products that are installed may not work properly as it will not be able to load the necessary DLLs. for example, if c:\oracle was provided as the install directory, add c:\oracle and c:\oracle\bin to the system PATH.
6. Note that install.bat sets the value of the NLS_LANG registry key at HKLM\Software\Oracle\KEY_<Oracle Home Name> to AMERICAN_AMERICA.WE8MSWIN1252 by default. Please modify install.bat or change this value in the registry after the install if necessary.
7. If OraMTS is installed, the Oracle<OracleHomeName>MTSRecoveryService is created with the LocalService account as the logon account. The credentials can be changed using the "services" administration tool. The default port used is 2030. Please read the OraMTS documentation for details. Note that after the install or the configuration, the service will not be started, since it requires the install directory and its bin directory to be included in the system PATH.
8. Applications using components from ODAC can use EZ CONNECT to connect to Oracle without depending on tnsnames.ora. Otherwise, configure or copy over tnsnames.ora from another machine and set TNS_ADMIN or ORACLE_HOME environment variable appropriately.

## Uninstallation Instructions

1. Execute uninstall.bat from the Oracle Home installation directory to unconfigure and uninstall ODAC products.
   To uninstall all ODAC products, execute the following:
   uninstall.bat all odac
   or
   uninstall.bat all c:\oracle
   Each product can be also be unconfigured and uninstalled individually. As an example, executing the following will uninstall only ODP.NET 4:
   uninstall.bat odp.net4 odac
   or
   uninstall.bat odp.net4 c:\oracle
   where "odac" is the Oracle Home Name that was used at install time and "c:\oracle" is the installation directory. The uninstall.bat does not uninstall the product's depenencies. This means that the above example will only uninstall ODP.NET 4 and not it's dependencies.
   The same machine_wide_configuration option that was provided to install.bat must be provided to uninstall.bat
2. Remove the install directory and install directory's bin subdirectory from the system PATH environment variable.

## Notes

1. The install and uninstall scripts log all operations to the destination directory's install.log and uninstall.log.

2. Known Issue: Oracle Services for MTS account/password name invalid when configuring ODAC xcopy on Windows configured for a Western European (non-English) language.

   Problem Statement: When executing install.bat, the following error occurs:

   Configuring Oracle Services for MTS
   ***********************************
   [SC] CreateService, failure (s) 1057:
   "The account name is invalid or does not exist, or the password is invalid for the account name..."

   Workaround: Execute the command below, substituting <OracleHomeName> and <OracleHomePath> with your deployment's specific values. Replace "NT AUTHORITY\LOCAL SERVICE" with the localized name in the West European language the Windows system uses.

   sc.exe create Oracle<OracleHomeName>MTSRecoveryService binpath= "<OracleHomePath>\bin\omtsreco.exe Oracle<OracleHomeName>MTSRecoveryService" start= auto obj= "NT AUTHORITY\LOCAL SERVICE" DisplayName= Oracle<OracleHomeName>MTSRecoveryService

   For example, if your <OracleHomeName> is "Ora32" and <OracleHomePath> is "c:\Ora32", execute below:
   sc.exe create OracleOra32MTSRecoveryService binpath= "c:\Ora32\bin\omtsreco.exe OracleOra32MTSRecoveryService" start= auto obj= "NT AUTHORITY\LOCAL SERVICE" DisplayName= OracleOra32MTSRecoveryService

   Sample successful execution.
   D:\odac12.2.0.1.0.64bit\xcopy.All\test.32>sc.exe create OracleOra32MTSRecoveryService binpath= "c:\Ora32\bin\omtsreco.exe OracleOra32MTSRecoveryService" start= auto obj= "NT AUTHORITY\LOCAL SERVICE" DisplayName= OracleOra32MTSRecoveryService
   [SC] CreateService SUCCESS