Every DB2 application must have an application package to support the execution of statically-bound and dynamic SQL contained in the program. Under DB2, an application package is created when you bind the application using the BIND PACKAGE subcommand.
Because XDB Link runs against DB2, it must have an application package on the host. XDB Link uses its application package to process dynamic SQL from client applications (statically bound SQL is executed through the appropriate application package) and to execute statically-bound SQL statements contained in the XDB Link program itself.
To create the application package for XDB Link, you must create a database resource module (DBRM) for XDB Link and bind it to DB2 using the XDB Bind Utility.
You only need to bind XDB Link once. If this version of XDB Link has already been bound with your DB2 database, you can skip this procedure.
To perform these steps, you must have a valid user ID and password on the XDB Server where XDB Link is installed (if you are using XDB Link in a gateway configuration) and on the host system. Additionally, your user ID must have the following privileges under DB2 on the host.
If you do not have these privileges, you (or someone authorized to grant such privileges) must execute the following SQL statements on DB2.
GRANT BINDADD to UserID GRANT BIND ON PACKAGE PackageName TO UserID GRANT CREATE ON COLLECTION CollectionID TO UserID
where:
UserID | is your user ID |
PackageName | is the name of the XDB Link package as specified in the Gateway Profile Utility |
CollectionID | is the collection ID assigned to XDB Link in the Gateway Profile Utility |
For additional information about these SQL statements, see your DB2 SQL Reference.
If you need additional information about the XDB Bind Utility while performing the following procedure, see the XDB Bind Utility User's Guide.
To create the default package for XDB Link
If you are using a... | Make these selections... |
---|---|
Gateway configuration | In the Server Name field, select the name of the XDB Server on which XDB Link is installed. In the Protocol field, select protocol this machine will use to commu-nicate with the XDB Server on which XDB Link is installed. |
Direct-connect configuration | In the Protocol field, select DRDA. |
In this field... | Specify... |
---|---|
Package Name | The package name for XDB Link. This value must match the package name assigned to XDB Link in the Gateway Profile Utility. |
Collection ID | The collection ID for XDB Link. This value must match the collection ID given to XDB Link in the Gateway Profile Utility. |
Host System | The type of DRDA host to which you want to bind XDB Link. Select MVS if you are using a DB2 version that does not support stored procedures (versions below 4.1) Select MVS + SPC if you are using a version of DB2 that supports stored procedures (version 4.1 or higher). |
Dynamic Sections | The number of dynamic sections that DB2 will include in the package it builds for XDB Link. This value determines how many dynamic SQL statements a client can have open at one time. The default value (32) is appropriate for most applications. |
GRANT EXECUTE ON PACKAGE collid.* TO PUBLIC
where collid is the collection id of your XDB Link package.