5 The DB2 Wire Protocol Driver : Binding

Binding
The driver does not work properly unless bind packages exist on every server to which you intend to connect.
IMPORTANT: You must have the appropriate privileges for the driver to create and bind packages with your user ID. These privileges are:
These are typically the permissions of a Database Administrator (DBA). If you do not have these privileges, someone who has a user ID with DBA privileges needs to create packages by connecting with the driver.
When connecting for the first time, the driver determines whether bind packages exist on the server. If packages do not exist, the driver creates them automatically using driver data source default values.
NOTE: The initial driver connection to a particular server may take a few minutes because of the number and size of the packages that must be created on the server. Subsequent connections do not incur this delay.
If you change default values in a data source before connecting with the driver for the first time, the new defaults are used when creating the packages. If you want to change these values after the packages have been created, you can create or modify packages from the Modify Bindings tab of the Setup dialog. See Step 6 under “Configuring and Connecting to Data Sources” for details.
On UNIX and Linux, you can also create or modify packages through a special bind utility. Depending on the platform of the DB2 server, the attribute values that must be set in the data source to bind packages are:
Linux/UNIX/Windows DB2 Servers: IpAddress, Database, TcpPort
z/OS and iSeries DB2 Servers: IpAddress, Location, TcpPort
Other attribute values also affect binding. See the note for Step 6 under “Configuring and Connecting to Data Sources” for details. See “Connection Option Descriptions” for a description of these connection string attributes and their values. You must use the default values or specify new ones for these attributes in the DB2 data source section of the odbc.ini file before binding. See Chapter 4 “Configuring the Product on UNIX/Linux” for details on creating the DB2 data source.
The bind utility is located in installation_directory/bin. After specifying the appropriate connection string attribute values in the odbc.ini file, create or modify packages by entering the command:
bindxx dsn
where xx is the driver level number in the driver file name and dsn is the ODBC data source name in the odbc.ini file. For example:
bind26 DB2 Wire Protocol
You are prompted for a user ID and password if they are not stored in the data source. If packages are created and bound successfully, a message indicating success appears. If there are problems connecting or creating the packages, an appropriate error message appears.
Creating DB2 Packages Using List Files
You can bind the following list files on your database server to create DB2 packages:
The list files are located in the \bind\LUW, \bind\zOS, and \bind\iSeries directories, respectively, in your DataDirect Connect Series for ODBC installation directory. When you bind the list files, if any DataDirect DB2 packages exist, they will be replaced by the new packages. The list files create DB2 packages that, by default, contain 200 dynamic sections and are created in the NULLID collection.
To create DB2 packages by binding list files:
1
2
From the database server directory where you placed the list and bind files, start the DB2 command-line utility. Use the utility to connect to the database where you want to bind the packages. Connect using the following command:
connect to database_name user authorization_name using password
where:
database_name is the name of the database to which you are connecting.
authorization_name is the name of the user you are authenticating to the server.
password is the user’s password.
3
bind @list_file grant public
where list_file is the name of the list file you want to bind.
Creating DB2 Packages Manually
On z/OS and iSeries servers, you can bind files manually to create DB2 packages. Refer to one of the following instruction files, as appropriate:
These instruction files are located in the bind\ZOS and \bind\ISERIES directories, respectively, in your DataDirect Connect Series for ODBC installation directory.