DB2 Connect Quick Beginnings for Linux**

Binding Database Utilities

You must bind the database utilities (import, export, reorg, the command line processor) and DB2 CLI bind files to each database before they can be used with that database. In a network environment, if you are using multiple clients that run on different operating systems or are at different versions or service levels of DB2, you must bind the utilities once for each operating system and DB2-version combination.

Binding a utility creates a package, which is an object that includes all of the information that is needed to process specific SQL statements from a single source file.

The bind files are grouped together in different .lst files in the bnd directory, under the installation directory. Each file is specific to a server.

Binding to Host Databases

To bind the utilities and applications to the DRDA server, connect to the DRDA server and use commands similar to the following:

   connect to dbalias user userid using password
   bind path/bnd/@ddcsmvs.lst blocking all sqlerror continue
           messages mvs.msg grant public
   connect reset

where path corresponds to the DB2PATH registry value. These commands are described in detail in the DB2 Connect User's Guide.

Binding to DB2 Universal Databases

On a Linux workstation, you bind the database utilities to a database using the command line processor. To bind database utilities, perform the following steps:

Step  1.

Change to the INSTHOME/sqllib/bnd directory, where INSTHOME is the home directory of the instance owner.

Step  2.

Connect to the database by entering the following command:

   db2 connect to database_alias

where database_alias is the name of the database that you want to connect to.

Step  3.

Enter the following commands to bind the database utilities:

   db2 "bind @db2ubind.lst messages bind.msg grant public"
   db2 "bind @db2cli.lst messages clibind.msg grant public"

In this example, bind.msg and clibind.msg are the output message files, EXECUTE and BINDADD privileges are granted to public.

Step  4.

Reset the database connection by entering the following command:

   db2 connect reset

For more information on the bin command, refer to the Command Reference.

Notes:

  1. The db2ubind.lst file contains the list of bind (.bnd) files required to create packages for the database utilities. The db2cli.lst file contains the list of bind (.bnd) files required to create packages for the DB2 CLI and DB2 ODBC driver.

  2. Binding may take a few minutes to complete.


[ Top of Page | Previous Page | Next Page ]