Enabling the connector to work with a DB2 database

Before you can use the connector with a DB2 database, you must perform the following steps:

  1. Copy the file named db2java.zip from the DB2 host to the ProductDir\lib directory on the machine on which the connector is going to run.
  2. Copy the file named db2jdbc.dll from the DB2 host to the ProductDir\bin directory on the machine on which the connector is going to run.
  3. Depending on your operating system, change the following in the connector's startup file (start_JDBC.sh or start_JDBC.bat):

    UNIX: JDBCDRIVERPATH=ProductDir/lib/db2java.zip

    Windows: set JDBCDRIVERPATH=ProductDir\lib\db2java.zip

  4. On the DB2 host machine, start the DB2/bin/db2jstrt process. Be sure to specify the number of the port you are using (for example, DB2/bin/db2jstrt 50000).
  5. Set the value of the connector's JDBCDriverClass property to COM.ibm.db2.jdbc.net.DB2Driver (or COM.ibm.db2.jdbc.app.DB2Driver if the DB2 database is on the same machine on which the connector is going to run).
  6. Set the value of the connector's DatabaseURL property to jdbc:db2://MachineName:PortNumber/DBname (or jdbc:db2:DBname if the DB2 database is on the same machine on which the connector is going to run).

Copyright IBM Corp. 1997, 2004