Before you can use the connector with a DB2 database, you must
perform the following steps:
- 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.
- 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.
- 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
- 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).
- 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).
- 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).
