Deploying non-PL/SQL routines to a database

Use the Deploy Routines wizard to deploy non-PL/SQL stored procedures or user-defined functions to a database.
Prerequisites:
Restriction: Some products do not support Java routines.

The instructions in this topic apply to routines in a Data Development Project and in the Data Source 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 export scripts into the file folder that you specified in the Export a Routine wizard.

Two types of export scripts are generated:
  • An SQL script, which can be used to deploy DB2 for Linux, UNIX, and Windows SQL stored procedures and DB2 for z/OS native SQL stored procedures. This script requires the DB2 command line processor.
  • An ANT script which can be used to deploy Java stored procedures and DB2 for z/OS external SQL stored procedures.

To deploy a non-PL/SQL routine to a database:

  1. Switch to the Data perspective.
  2. Right-click one or more supported data objects or the routines folder in the Data Project Explorer or Data Source Explorer, and click Deploy from the pop-up menu. A wizard opens.
  3. 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.
  4. Click Finish.
The deploy process begins, and you can view the progress and messages in the SQL Results view. After the routine is deployed, you can refresh the Stored Procedures or User-Defined Functions folder under the database connection in the Data Source 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.

Feedback