skip to main content
Part 2: The 32-Bit/64-Bit Drivers : 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:
*BINDADD for binding packages
*CREATEIN on the collection specified by the Package Collection option
*GRANT EXECUTE on the PUBLIC group for executing the packages
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 Modify Bindings tab 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
DB2 for z/OS and DB2 for i Servers: IpAddress, Location, TcpPort
Other attribute values also affect binding. See the note for Modify Bindings tab 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 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:
bindxxdsn
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:
bind27 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
* Creating DB2 Packages Manually