Question & Answer
Question
How to configure the MCF Configuration Deployment Tool (CDT) to run on a DB2 database
Answer
CDT works just fine on a DB2 database, it just takes a slightly different configuration. You can even mix types (vendors) between the Source and Target databases.
Following are the specific configurations necessary for running CDT on DB2:
1. File ydkprefs.xml: When running CDT in GUI mode, via the ydk.sh script, this creates/modifies a file called ydkprefs.xml in the <INSTALL_DIR>/resources/ydkresources folder. All database configuration details go in this file.
If instead, you want to run CDT from the command-line via script cdtshell.sh, you can create ydkprefs.xml by hand.
In ydkprefs.xml, the following entries must be configured (as part of the complete Source and Target database configuration):
className="com.ibm.db2.jcc.DB2Driver"
dbType="db2"
jdbcURL="jdbc:db2://<Host>:<Port>/<Database Name (i.e. SID)>
2. Start scripts ydk.sh (GUI) or cdtshell.sh (command-line): The DB2 database driver class are available from IBM. You should only need db2jcc.jar and db2jcc_license_cu.jar. Place these files in folder ${INSTALL_DIR}/dbjar/jdbc/DB2 (you will likely have to create the DB2 sub-folder). Then include the drivers in the script, as follows:
a. ydk - Add these DB2 database driver class files to the end of the CLASSPATH definition: CLASSPATH=...:${INSTALL_DIR}/dbjar/jdbc/DB2/db2jcc.jar:${INSTALL_DIR}/dbjar/jdbc /DB2/db2jcc_license_cu.jar
b. cdtshell - Set the DB_DRIVER script
property to point to these DB2 database driver class files:
DB_DRIVER=${INSTALL_DIR}/dbjar/jdbc/DB2/db2jcc.jar:${INSTALL_DIR}/dbjar/jdbc/DB2
/db2jcc_license_cu.jar
Note: Article written using MCF 8.0 running on a UNIX/Linux based-OS as the example. Configurations are easily transferable to a Windows-based OS by following the same basic steps except the configurations are triggered by/modified in start script ydk.cmd or cdtshell.cmd.
Historical Number
HTG2461
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21563953