Configuring access to JDBC data sources

Before you can use the JDBC connector, you must set up the driver configuration file. The connector uses this file to obtain information about the available JDBC drivers in your system.

Procedure

  1. Create a driver configuration file named isjdbc.config with read permission enabled for all the users.
    The driver configuration file name is case sensitive.
  2. Open a text editor and include the following two lines that specify the class path and driver Java™ classes:
    CLASSPATH=driver_classpath
    CLASS_NAMES=driver_class_names

    The value driver_classpath is the cumulative Java class path for the JDBC drivers that you plan to utilize through the connector. The value is specified as a semicolon separated list of fully-qualified directory paths, .jar file paths and .zip file paths. For example, if the driver that you plan to use is implemented as a .jar file, include the full path to that .jar file in the driver_classpath value. For more information about the class path requirements for your driver, see the driver documentation.

    The value driver_class_names is a semicolon separated list of fully-qualified driver class names implemented by the JDBC drivers that you plan to utilize through the connector. The driver classes are the Java classes in the drivers that implement the java.sql.Driver JDBC API interface. For more information about the driver class implemented by the driver, see your JDBC driver documentation. Note that you do not need to provide this information for the drivers implemented as JAR files and based on JDBC 4.0 or later JDBC specification because in those cases the connector is able to automatically determine the driver class name from the driver JAR file.

  3. Save the isjdbc.config file on the InfoSphere® Information Server engine tier host under the directory IS_HOME/Server/DSEngine directory, where IS_HOME is the InfoSphere Information Server home directory.
    For example, the home directory might be C:\IBM\InformationServer on a Windows system or /opt/IBM/InformationServer on a Linux® or UNIX system.
    If the engine tier in your InfoSphere Information Server installation consists of multiple hosts, this file must be available from the same location on all the hosts. You can make this file available from the same location on all the hosts, by configuring the DSEngine directory as a shared network directory.

Example

This example shows how you can set up the driver configuration file.

Assume the following details:
  • You want to use the JDBC connector with the following two JDBC drivers: JDBC 4.0 driver, Driver A and JDBC 3.0 driver, Driver B.
  • Driver A is implemented as the /opt/productA/driverA.jar file, and Driver B is implemented as the/app/productB/driverBimpl.jar file.
  • For Driver A, you determine that the name of the driver Java class is com.example.A.Driver, and for Driver B, you determine that the driver Java class name is com.example.DriverB.
To set up the driver configuration file, complete the following actions:
  1. Create the isjdbc.config file and enter the following two lines:
    CLASSPATH=/opt/productA/driverA.jar;/app/productB/driverBimpl.jar
    CLASS_NAMES=com.example.A.Driver;com.example.DriverB
    Note: The com.example.A.Driver value can be omitted from the CLASS_NAMES because the Driver A is a JDBC 4.0 driver, and for this driver the connector can automatically retrieve the driver class name from the driver JAR file.
  2. Save the file on the InfoSphere Information Server engine tier host under the IS_HOME/Server/DSEngine directory , where IS_HOME is the InfoSphere Information Server home directory.
After making changes to the driver configuration file you do not need to restart the DataStage® engine, ISF agents or WebSphere® Application Server. The JDBC connector recognizes the changes that are made to this file the next time it is used to access JDBC data sources.