DB2 graphic QMF Version 8

Bind Package

Select Query--> Bind Package to bind a package for a static query. This option becomes available after you type an SQL statement.

This operation enables distributed SQL to run at any DB2 database. A package must be bound at the database server that contains the active SQL statement as a static query.

Note:
You need permission to access the database before binding the SQL to the server. When you select this option the Set User Information dialog box opens for you to provide a user ID and password for the selected server.

The Bind Static Package contains fields for the Collection ID, Package name, Owner ID, Delimiters, Isolation Levels, and input variables, if any.

For bound packages, host variables are used in place of each substitution variable in the SQL statement because a substitution variable cannot always be directly replaced by a host variable. Substitution variables provide direct text substitution in the query statement before the query is executed at the database server. Host variables are sent as part of the query to the database server. Refer to the documentation for your database server for rules on where and how host variables can be used in queries.

The SQL is bound at the server under the specified collection ID and package name. A consistency token and section number are assigned during the bind. The following message displays following the bind:

The query will now be run via static SQL.
You must save this query in order to continue running it via SQL in the future.

Static queries are run directly from the server and system resources are not consumed as when you run a query on an ad hoc basis.

Note:
A query bound at a server cannot be changed. It displays as a read-only SQL statement. Select Query-->Revert To Dynamic SQL to update the query.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004