Setting up and testing the Oracle client configuration file
The Oracle client configuration file is used to connect to Oracle databases, by using the client libraries that are installed on the federated system.
About this task
The client configuration file specifies the location of each Oracle database server and type of connection (protocol) for the database server.
The default name for the Oracle client configuration file is tnsnames.ora.
The default location of the client configuration file depends on the operating system that is used by the federated system:
- On Linux® and UNIX systems, the default location of the file is $ORACLE_HOME/network/admin.
- On Windows systems, the default location of the file is %ORACLE_HOME%\NETWORK\ADMIN.
- Create the tnsnames.ora using the
Oracle NET8/NET Configuration utility that comes with the Oracle client
Within the tnsnames.ora file, the SID (or SERVICE_NAME) is the name of the Oracle instance, and the HOST is the host name where the Oracle server is located.
- If you want to place the tnsnames.ora file
in a path other than the default search path, set the TNS_ADMIN environment
variable to specify the file location:
- Edit the db2dj.ini file in the sqllib/cfg directory,
and set the TNS_ADMIN environment variable. For example:
Issue the following commands to recycle the Db2® instance and ensure
that the environment variable is set in the program:
- Edit the db2dj.ini file in the sqllib/cfg directory, and set the TNS_ADMIN environment variable. For example:
- Test the connection to ensure that the client software can connect to the Oracle server. Use the Oracle sqlplus utility to test the connection.
After you complete this task, you can register the Oracle wrapper.