You must install and configure the necessary prerequisites before you can develop routines (stored procedures and user-defined functions (UDFs)) using the workbench.
Before you develop routines using the workbench, you must complete all setup and configuration steps for your operating system and the type of routine that you are developing as described in the IBM® DB2® Application Development Guide. The following information supplements the information in the IBM DB2 Application Development Guide but does not replace it.
For detailed information about setup requirements for developing DB2 for z/OS® and OS/390® routines, see the Redbook DB2 for z/OS Stored Procedures: Through the CALL and Beyond at http://publib-b.boulder.ibm.com/abstracts/sg247083.html?Open
To build SQL stored procedures for DB2 UDB versions prior to 8.2 or for DB2 for z/OS, you must install and configure a C compiler on the server. For more information, see the IBM DB2 Application Development Guide.
The following table lists prerequisites for both the server system and the client workstation where the workbench is installed.
See License requirements for all DB2 database connections for information about license files that are required for database connectivity to DB2 databases.
Platform | Server requirements | Client requirements |
---|---|---|
DB2 for Linux™, UNIX®, and Windows® | DB2, version 8 or later | None |
DB2 UDB for z/OS and OS/390 | DB2, version 7 or later | None |
DB2 UDB for iSeries™ |
|
For DB2 UDB for iSeries, version 5.2: AS400 Toolbox for Java (jt400.jar) To download, see Toolbox for Java at http://www.ibm.com/servers/eserver/iseries/toolbox/downloads.html |
Derby | Derby, version 10 | None |
export DB2PATH=/home/userhome/sqllib
To develop Java stored procedures on clients running the Linux or AIX® operating systems, or in the Solaris Operating Environment, you must manually point the workbench to the location of an installed JDK. To identify the location of a JDK, create a link to the directory where a JDK is installed. Replace db2admin in the example commands if your instance owner is named differently.
ln -s /opt/IBMJava2-131 /home/db2admin/sqllib/java/jdk
chown bin /home/db2admin/sqllib/java/jdk
chgrp bin /home/db2admin/sqllib/java/jdk
cd /usr/lib
ln -fs JAVAHOME/jre/bin/libhpi.so
ln -fs JAVAHOME/jre/bin/libjava.so
ln -fs JAVAHOME/jre/bin/classic/libjvm.sowhere JAVAHOME is the base directory for the IBM Developer kit. For example: /opt/IBMJava2-142 is the default base directory for the Developer kit 1.4.2.
cd /usr/lib
ln -fs JAVAHOME/jre/bin/libjsig.sowhere JAVAHOME is the base directory for the IBM Developer kit.
ln -fs JAVAHOME/jre/bin/libjitc.so
ln -fs JAVAHOME/jre/bin/libxhpi.so
ln -fs JAVAHOME/jre/bin/libdbgmalloc.so
ldconfigwhere JAVAHOME is the base directory for the IBM Developer kit.
For more information about developing routines and applications for DB2, refer to the library of information that comes with DB2, including the IBM DB2 Application Development Guide.