You can use the workbench to deploy routines and related
JAR files from a data project to a database server.
Restriction: Some products do not support Java routines
or JAR file deployment.
The preferred method for deploying routines is using deployment
groups. Some products do not support this option. If your product
does not support deployment groups, you can deploy routines from a
data project using a wizard.
Using a wizard, you can deploy stored procedures for DB2® for Linux, UNIX,
and Windows or DB2 for z/OS® in
one of two ways:
- You can deploy binaries that were previously built on the server.
- You can deploy by doing a full build.
On the Deploy Options page of the Deploy Routines wizard, you specify
which of these two deploy options that you want to use. Binary deployment
is supported for the following servers and routine types:
Data server |
Routine type |
DB2 for Linux, UNIX,
and Windows, Version 9.1 or higher |
SQL, JDBC and SQLJ stored procedures |
DB2 for z/OS,
Version 8 (new-function mode) and Version 9 |
External SQL, JDBC and SQLJ stored procedures |
DB2 for z/OS Version
9 |
Native SQL stored procedures |
Restriction: The following restrictions apply to binary
deployment:
- Java™ stored procedures for DB2 for z/OS that
were built using the legacy driver cannot be deployed using binaries.
- The connection to both the source and the target server must use
the IBM® Data Server Driver for JDBC and SQL.
- The client JDK level must be compatible with the JDK level of
the target server.
- For DB2 for Linux, UNIX,
and Windows:
- The target server must be the same or higher version level. For
example: source is Version 9.1 -> target is Version 9.5, or source
is Version 9.1 -> target is Version 9.1.
- The source operating system must be the same as the target operating
system. That is, you cannot perform a binary deployment of a stored
procedure created in DB2 for Linux, UNIX,
and Windows on a Windows operating
system to a DB2 for Linux, UNIX,
and Windows on a Linux operating
system.
- For DB2 for z/OS:
- Target Load Library must exist before you deploy external SQL
stored procedures using binaries.
- To deploy external SQL stored procedures using binaries, the DB2 Administration
stored procedures must be created and bound on the server. These stored
procedures are installed by using the DSNTIJCC customization job.
In some cases, you can create a routine using one server definition,
and then deploy it to the same type of server or to a server with
a different server definition. On the Deploy Options page of the Deploy
Routines wizard, you can specify a different database. The following
server combinations are supported:
Source routine |
Target server |
SQL stored procedure for DB2 for Linux, UNIX,
and Windows |
- DB2 for Linux, UNIX,
and Windows
- DB2 for iSeries®
- DB2 for z/OS
|
Java stored procedure for DB2 for Linux, UNIX,
and Windows |
- DB2 for Linux, UNIX,
and Windows
- DB2 for iSeries
- DB2 for z/OS
- IBM Cloudscape
|
Restriction: You can only deploy routines to like servers
and to supported unlike servers from a data development project in
the Data Project Explorer or from the Data Source Explorer. When you
deploy from the file system, you can only deploy routines to like
servers. The following database combinations for unlike servers are
supported:
- Derby to DB2 for Linux, UNIX, and Windows
- Derby to DB2 for z/OS
- DB2 for Linux, UNIX,
and Windows to DB2 for z/OS
For Derby stored procedures in Java,
the Java source is not stored
in the database catalog.