Tuesday, October 25, 2011

Note 819829 - Oracle Instant Client Installation and Configuration on Unix

Summary

Symptom
Oracle Instant Client in SAP Environments

This note describes how to install and configure the Oracle Instant Client in an SAP environment on Unix and Linux platforms.

For Windows platforms, please refer to note 998004.

Other terms


Oracle Instant Client
Easy Client
Instant Client Basic
Instant Client Light

Reason and Prerequisites


The currently used Oracle Instant Client is not up-to-date. You need to download and configure the current version of the Oracle Instant Client.

Solution


The Oracle Instant Client contains the complete Oracle client software required for an SAP system in an easy-to-install way. Oracle Instant Clients replace the full client installations ("Oracle-Home-based client") that were required prior to Oracle release 10.2.

Choosing the Recommended Oracle Instant Client Version


An Oracle Instant Client must be installed for SAP Kernels linked with Oracle release 10.2, 11.2 or higher.


General recommendations:

  • SAP customers must use only the instant client versions released for SAP from the SAP Service Marketpace. The use of Oracle Instant Client versions that are available on OTN is not supported.
  • SAP customers are strongly advised not to create their own patched versions of the Oracle Instant Client. Updated versions of the instant client are made available for download on the SAP Service Marketplace if this is required.
  • All SAP application servers of an SAP system should run with the same version of the instant client. Running a mix of different instant client versions in one SAP system is not recommended.
  • There are also some dependencies between SAP BR*Tools versions and Oracle instant client versions. See below 'Configuring Oracle Instant Client 11.2 for SAP BR*Tools 7.20'.


Choosing between Oracle Instant Client 10.2 and 11.2:

  • For database release 11.2.0.2 (and above), Oracle Instant Clients of release 11.2.0.2 are available.
  • For database releases 10.2.0.X and 11.2.0.1, Oracle Instant Clients of releases 10.2.0.4 or 10.2.0.5 are available.


Support of Oracle Instant Clients:

  • Oracle Instant Clients of release 10.2.0.2 are no longer supported.
  • Oracle Instant Clients of release 10.2.0.4 are supported until end of July 2011. Please see SAP note 1339724 for details.
  • Oracle Instant Clients of release 10.2.0.5 are supported after end of July 2011 only under the conditions of Oracle Extended Support. Please see SAP note 1110995 for details.


Replacing Oracle Instant Clients:

  • SAP Kernels that are linked with Oracle 10.2 (7.XX, 640_EX2) can use Instant Clients of release 11.2.0.X.

    Instant Clients of release 11.2 are downward compatible with Instant Clients of release 10.2. Therefore, it is technically possible to use an Instant Client of release 11.2 in an SAP installation where the SAP kernel is linked with Oracle 10.2.
  • When you replace the 10.2 instant client on the SAP application server with the 11.2 instant client you have to ensure that the software requirements for the new instant client version are met. Check the software requirements in the Database Client Installation Guide for your platform in the Oracle Database Documentation Library for Release 11.2 [http://www.oracle.com/pls/db112/homepage]
  • For minimum SAP kernel version required with Instant Client 11.2 see SAP note 1331586. If you have an too old SAP kernel installed, you get 'ORA-24315: illegal attribute type'.




Downloading Oracle Instant Client Software


The following Oracle Instant Client DVDs are available:

  • Oracle Client 11.2 DVD

    This DVD (Mat# 51038966) contains the Oracle Instant Client 11.2.0.2 software for the following platforms: AIX5L, HP-UX PA RISC, HP-UX Itanium, Linux x86 (32-bit), Linux x86_64, Solaris SPARC, Solaris x86-64, MS Windows (32-bit), MS Windows x64
  • ORACLE Client 10.2.0.5 DVD

    This DVD (Mat# 51041000) contains the Oracle Instant Client 10.2.0.5 software for the following platforms: AIX5L, HP-UX PA-RISC, HP-UX Itanium, Linux x86 (32-bit), Linux Itanium (64-bit), Linux x86_64, Linux on Power (64-bit), Solaris SPARC, Solaris x86-64, MS Windows (32-bit), MS Windows Itanium (64-bit), MS Windows x64
  • Oracle Client V5 10.2.0.4 DVD

    This DVD (Mat# 51039412) contains the Oracle Instant Client 10.2.0.4 V5 software for the following platforms: AIX5L, HP-UX PA-RISC, HP-UX Itanium, Linux x86 (32-bit), Linux Itanium (64-bit), Linux x86_64, Linux on Power (64-bit), Solaris SPARC, Solaris x86-64, MS Windows (32-bit), MS Windows Itanium (64-bit), MS Windows x64


To download Oracle Instant Client DVDs for SAP environments, go to the Oracle download area of the SAP Service Marketplace:

[https://service.sap.com/oracle-download]

In the right panel under 'Software Download', follow the links 'Oracle Software' -> 'Installation' -> '' -> 'Oracle' .

Filenames of Oracle Instant Client Packages for SAP


Instant client packages use the following naming conventions:

OCL.SAR

For example:

OCL10232.SAR (32-bit platform, Release 10.2.0.X)
OCL10264.SAR (64-bit platform, Release 10.2.0.X)
OCL11232.SAR (32-bit platform, Release 11.2.0.X)
OCL11264.SAR (64-bit platform, Release 11.2.0.X)

Oracle Instant Client Default Path and Symbolic Link


The default path for the installed instant client in an SAP environment is:

  • Instant Client Release 10.2:
    /oracle/client/10x_/instantclient
  • Instant Client Release 11.2:
    /oracle/client/11x_/instantclient


By default, that path is a symbolic link pointing to a directory:

  • Instant Client Release 10.2:
    /oracle/client/10x_/instantclient_
  • Instant Client Release 11.2:
    /oracle/client/11x_/instantclient_


is either '64' for 64-bit platforms or '32' for 32-bit platforms like Linux 32-bit.

Examples:

  • 64-bit platform and instant client release 10.2.0.4:
    /oracle/client/10x_64/instantclient (= symbolic link)
    /oracle/client/10x_64/instantclient_10204 (= directory)
  • 64-bit platform and instant client release 11.2.0.2:
    /oracle/client/11x_64/instantclient (= symbolic link)
    /oracle/client/11x_64/instantclient_11202 (= directory)


During an SAP installation SAPINST automatically installs the instant client as described above for all new installations based on the 7.00 kernel (and for 6.40-based installations on the IBM PPC platform).

Starting with Oracle release 10.2 it does not make any difference whether the SAP system is a central system (DB/CI) or only an application server. SAPINST installs the instant client in both cases. SAPINST furthermore installs the instant client on the database server, since this is a prerequisite for the BR*Tools version 7.00 to be started as the
adm user.

In the following scenarios the Oracle Instant Client needs to be installed manually as described in the following section:

    1. The database was upgraded to Oracle 10.2 or newer.
    2. The PREPARE phase of the upgrade to release 7.00 has to be run.
Configuring Oracle Instant Client 11.2 for SAP BR*Tools 7.20


SAP BR*Tools Release 7.20 are based on release 10.2 and therefore expect the Oracle Instant Client to be installed in the default path for the 10.2 instant client '/oracle/client/10x_64/instantclient'. Therefore, in order to use the 11.2 instant client with SAP BR*Tools 7.20, (temporarily) create the following additional symbolic link:

OS> ln -s /oracle/client/11x_64 /oracle/client/10x_64

This link is needed only until SAP BR*Tools Release 7.20_EXT are available which then will be based on 11.2 instant client. As soon as SAP BR*Tools Release 7.20_EXT are available, you can replace SAP BR*Tools 7.20 by SAP BR*Tools 7.20_EXT and remove the link again.

For a more detailled description of dependencies between SAP BR*Tools and Oracle instant client versions see SAP note 1638356.


Manually Installing the Oracle Instant Client in an SAP Environment


Please keep the following in mind when manually installing or updating the Oracle Instant Client:

  • It is recommended to extract the instant client package following the defaults defined by SAP (see previous section).
  • NEVER extract or copy instant client packages to directories '$ORACLE_HOME/lib' or '$ORACLE_HOME/bin'.
  • The library search path ('LD_LIBRARY_PATH', 'SHLIB_PATH', 'LIBPATH') MUST refer to only one instant client directory. It MUST NOT contain more than one instant client directory or any Oracle Home directory ('$ORACLE_HOME/lib'), regardless of the order.
  • Under no circumstances set the environment variable ORA_NLS10 for the adm user.
  • Before you replace an instant client with a newer version, stop all your SAP systems, SAP application servers, and any other processes that use the instant client.

    Never replace an instant client of an SAP system while the system is up and running!


Perform the following steps for manually installing a new version of the Oracle Instant Client:

    1. Download the instant client software DVD from the SAP Service Marketplace as described in section "Downloading Oracle Instant Clients" of this note.
    2. Create the directory for the instant client software, if that does not already exist:

    For release 11.2 clients:
    OS> mkdir -p /oracle/client/11x_64

    For release 10.2 clients:
    OS> mkdir -p /oracle/client/10x_64
    3. Change to this directory and extract the instant client package with

    OS> SAPCAR -xvf OCL.SAR

    This results in a directory 'instantclient_'
    4. Create a symbolic link from 'instantclient_' to 'instantclient' with the following command:

    OS> ln -s instantclient_ instantclient
    5. On SAP systems with kernel 7.00 (or above) and ABAP Stack or Double Stack, execute the following additional steps:

    Check if the SAP DBSL can load the newly installed instant client correctly. Change to the
    exe directory as user adm and run the ldd command on dboraslib.so:

    OS> ldd dboraslib.so

    If that succeeds, verify that the SAP system is able to connect to the database with

    OS> R3trans -x

    Otherwise, if
    ldd cannot resolve all libraries, then verify the value of the library search path for the adm user. It should be set as:

    For release 10.2 clients:
    /usr/sap/SID/SYS/exe/run:/oracle/client/10x_64/instantclient
    For release 11.2 clients:
    /usr/sap/SID/SYS/exe/run:/oracle/client/11x_64/instantclient
    6. On SAP systems with kernel 7.00 (or above) and Java Stack or Double Stack, execute the following additional steps:

    Update all references from the J2EE engine to the JDBC driver jars such that they point to the JDBC driver in the instant client directory. This is described in detail in SAP note 867976.

Verifying the Client Operation Mode



With 'genezi -v' you check whether the instant client is running in 'instant client' mode or 'Oracle home' mode.

Note: The client must operate in 'Instant Client' mode. If not, check that the client that is installed is complete, check that the environment is correct and ensure that no other Oracle clients are installed in the library search path.

The instant client is operating in 'Instant Client Mode' if the output is similar to the following example:

OS> ./genezi -v
Client Shared Library 64-bit - 11.2.0.2.0

System name: Linux
Release: 2.6.32.12-0.7-default
Version: #1 SMP 2010-05-20 11:14:20 +0200
Machine: x86_64

Operating in Instant Client mode.
Small timezone file = timezone_14.dat
Large timezone file = timezlrg_14.dat

OS>

In the following example the instant client is running in 'Oracle Home' mode:

OS> ./genezi -v
Client Shared Library 64-bit - 11.2.0.2.0

System name: Linux
Release: 2.6.32.12-0.7-default
Version: #1 SMP 2010-05-20 11:14:20 +0200
Machine: x86_64

Operating in ORACLE_HOME environment.
Small timezone file = /oracore/zoneinfo/timezone_14.dat
Large timezone file = /oracore/zoneinfo/timezlrg_14.dat

OS>

If data shared library libociei.so is not found, then the client operates in 'Oracle Home' mode.

Determining the Oracle Instant Client Version


There are several ways to determine which instant client version is installed and used by the SAP system:

  • Option 1: Use the genezi utility

    Goto the instant client directory and run 'genezi -v':
    OS> cd /oracle/client/11x_64/instantclient
    OS> ./genezi -v

    If you receive an error like 'error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory', check your environment variable LD_LIBRARY_PATH (LIBPATH, SHLIB_PATH).
  • Option 2: SAPIC_README

    Starting with release 10.2.0.4, the Oracle Instant Clients released for SAP may be identified by a unique instant client version. The instant client packages built for SAP contain a readme file called SAPIC_README with the following information:
    • SAP Instant Client version
    • Oracle release
    • installed Oracle patches
    • build date
    • platform
  • Option 3: SAP transaction SM51

    As of SAP kernel 7.00, you find the instant client version in the 'SAP Release Information'.

    In SM51 (SAP Servers), click button 'Release Notes' and search for 'Database Client Library'.
  • Option 4: SAP transaction SM50

    As of SAP kernel 7.00, you find the instant client version in all work process logs (SM50).

    Example:
    Oracle Client Version: '10.2.0.4.0'

    As of SAP kernel 7.10, you find the instant client version in all work process logs (SM50) including client subversion Vn and all installed client patches.

    Example:
    Oracle Client Version: '10.2.0.4.0', V5


Please note that the instant client versions are not synchronized across platforms. In particular, instant clients with identical versions may contain different bug fixes on different platforms.

Oracle Instant Client Compatibility Matrix


The Oracle Instant Client interoperates with any database version that the full Oracle Client interoperates with. For details please see Metalink Note 207303.1: Oracle Client / Server Interoperability Support

Installing the Oracle Instant Client for Secondary Connections


If you manually install the Oracle Instant Client on a system to open secondary connections to an Oracle instance, you need to make sure that the Oracle Net Services files sqlnet.ora and tnsnames.ora both exist and that the environment variable TNS_ADMIN points to the directory location of these two files.

Header Data



Release Status:Released for Customer
Released on:10.10.2011 09:04:11
Master Language:English
Priority:Recommendations/additional info
Category:Installation information
Primary Component:BC-DB-ORA Oracle
Secondary Components:BC-DB-ORA-SYS Database Interface / DBMS for Oracle

No comments:

Post a Comment