Use the Deploy Routines wizard to deploy stored
procedures or user-defined functions to a database. 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.
Prerequisites: - To deploy an SQL stored procedure by using binaries from a DB2® for z/OS® V8 server
to a DB2 for z/OS V8
server, PTF JDB881D must be applied to both the source and the target servers.
- To deploy a Java stored procedure to a DB2 UDB for Linux, UNIX, and Windows
Version 8.1 or 8.2 server, you must install FixPak 13 or higher
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.
Restriction: Java™ stored
procedures that were built using the legacy driver cannot be deployed using
binaries.
The instructions in this topic apply to routines in a Data
Development Project and in the Database Explorer. If you exported a routine
to the file system, you can deploy the routine by following the instructions
in the file called DeployInstructions.txt that was generated
along with the export script into the file folder that you specified in the
Export a Routine wizard.
To deploy a routine to a database:
- Switch to the Data perspective.
- Right-click one or more supported data objects or the routines
folder in the Data Project Explorer or Database Explorer, and click Deploy from
the pop-up menu. A wizard opens.
- Complete the steps of the wizard. Some of the fields
in the wizard are populated based on the default settings that are specified
in the Deploy options preferences pages and some of the fields are populated
with the values from the routines you want to deploy. If you select to deploy
to a different server, you can select an existing database connection or create
a new connection. Connections to supported database servers are the only connections
that are available in the list of existing connections.
- Click Finish.
The deploy process begins, and you can view the progress and messages
in the Data Output view. After the routine is deployed, you can refresh the Stored
Procedures or User-Defined Functions folder
under the database connection in the Database Explorer view to verify that
the routine was added to the server. If the routine was deployed from the
Data Project Explorer and the target database is the same database that is
assigned to the Data Development Project, the Data Project Explorer view displays
an icon of a wrench next to the routine name to indicate that the routine
was deployed.