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, 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 (typically sqllib for Windows®). Each file is specific to a server.
connect to dbalias user userid using password bind path/bnd/@ddcsmvs.lst blocking all sqlerror continue messages mvs.msg grant public connect resetwhere path corresponds to the DB2PATH registry value.
connect to database_alias
where database_alias represents the alias of the database to which you want to connect.
"bind @db2ubind.lst messages bind.msg grant public" "bind @db2cli.lst messages clibind.msg grant public"In this example, bind.msg and clibind.msg are the output message files, and EXECUTE and BINDADD privileges are granted to public.
connect reset
Note:
Parent topic: DB2 Connect
Related reference
BIND command
DB2 CLI bind files and package names