Installation and Configuration Guide > Connecting to Databases > Connecting to an Oracle Database
  

Connecting to an Oracle Database

For native connectivity, install the version of Oracle client appropriate for the Oracle database server version. To ensure compatibility between Informatica and databases, use the appropriate database client libraries.
You must install compatible versions of the Oracle client and Oracle database server. You must also install the same version of the Oracle client on all machines that require it. To verify compatibility, contact Oracle.

Configuring Native Connectivity

You can configure native connectivity to an Oracle database to increase performance.
The following steps provide a guideline for configuring native connectivity through Oracle Net Services or Net8. For specific instructions, see the database documentation.
    1. To configure connectivity for the Data Integration Service process, log in to the machine as a user who can start the server process.
    2. Set the ORACLE_HOME, NLS_LANG, TNS_ADMIN, and PATH environment variables.
    ORACLE_HOME. Set the variable to the Oracle client installation directory. For example, if the client is installed in the /HOME2/oracle directory. set the variable as follows:
    Using a Bourne shell:
    $ ORACLE_HOME=/HOME2/oracle; export ORACLE_HOME
    Using a C shell:
    $ setenv ORACLE_HOME /HOME2/oracle
    NLS_LANG. Set the variable to the locale (language, territory, and character set) you want the database client and server to use with the login. The value of this variable depends on the configuration. For example, if the value is american_america.UTF8, set the variable as follows:
    Using a Bourne shell:
    $ NLS_LANG=american_america.UTF8; export NLS_LANG
    Using a C shell:
    $ NLS_LANG american_america.UTF8
    To determine the value of this variable, contact the administrator.
    ORA_SDTZ. To set the default session time zone when the Data Integration Service reads or writes the Timestamp with Local Time Zone data, specify the ORA_SDTZ environment variable.
    You can set the ORA_SDTZ environment variable to any of the following values:
    You can set the environment variable at the machine where Informatica server runs.
    TNS_ADMIN. If the tnsnames.ora file is not in the same location as the Oracle client installation location, set the TNS_ADMIN environment variable to the directory where the tnsnames.ora file resides. For example, if the file is in the /HOME2/oracle/files directory, set the variable as follows:
    Using a Bourne shell:
    $ TNS_ADMIN=$HOME2/oracle/files; export TNS_ADMIN
    Using a C shell:
    $ setenv TNS_ADMIN=$HOME2/oracle/files
    Note: By default, the tnsnames.ora file is stored in the following directory: $ORACLE_HOME/network/admin.
    PATH. To run the Oracle command line programs, set the variable to include the Oracle bin directory.
    Using a Bourne shell:
    $ PATH=${PATH}:$ORACLE_HOME/bin; export PATH
    Using a C shell:
    $ setenv PATH ${PATH}:ORACLE_HOME/bin
    3. Set the shared library environment variable.
    The Oracle client software contains a number of shared library components that the Data Integration Service processes load dynamically. To locate the shared libraries during run time, set the shared library environment variable.
    The shared library path must also include the Informatica installation directory (server_dir).
    Set the shared library environment variable to LD_LIBRARY_PATH.
    For example, use the following syntax:
    4. Edit the .cshrc or .profile to include the complete set of shell commands. Save the file and either log out and log in again, or run the source command.
    Using a Bourne shell:
    $ source .profile
    Using a C shell:
    $ source .cshrc
    5. Verify that the Oracle client is configured to access the database.
    Use the SQL*Net Easy Configuration Utility or copy an existing tnsnames.ora file to the home directory and modify it.
    The tnsnames.ora file is stored in the following directory: $ORACLE_HOME/network/admin.
    Enter the correct syntax for the Oracle connect string, typically databasename.world.
    Here is a sample tnsnames.ora file. Enter the information for the database.
    mydatabase.world =
       (DESCRIPTION
       (ADDRESS_LIST =
            (ADDRESS =
               (COMMUNITY = mycompany.world
               (PROTOCOL = TCP)
               (Host = mymachine)
               (Port = 1521)
            )
       )
       (CONNECT_DATA =
          (SID = MYORA7)
          (GLOBAL_NAMES = mydatabase.world)
    6. Verify that you can connect to the Oracle database.
    To connect to the Oracle database, launch SQL*Plus and enter the connectivity information. If you fail to connect to the database, verify that you correctly entered all of the connectivity information.
    Enter the user name and connect string as defined in the tnsnames.ora file.