Bind considerations

If your application uses a code page that differs from the database code page, you must ensure that the code page used by the application is compatible with the database code page during the bind process.

If your application issues calls to any of the database manager utility APIs, such as IMPORT or EXPORT, you must bind the supplied utility bind files to the database.

You can use bind options to control certain operations that occur during binding, as in the following examples:
  • The QUERYOPT bind parameter takes advantage of a specific optimization class when binding.
  • The EXPLSNAP bind parameter stores Explain Snapshot information for eligible SQL statements in the Explain tables.
  • The FUNCPATH bind parameter properly resolves user-defined distinct types and user-defined functions in static SQL.

If the bind process starts but never returns, it might be that other applications connected to the database hold locks that you require. In this case, ensure that no applications are connected to the database. If they are, disconnect all applications on the server and the bind process will continue.

If your application will access a server using Db2 Connect, you can use the BIND command parameters available for that server.

Bind files are not compatible with earlier versions of Db2. In mixed-level environments, Db2 can only use the functions available to the lowest level of the database environment. For example, if a version 8 client connects to a version 7.2 server, the client will only be able to use version 7.2 functions. As bind files express the functionality of the database, they are subject to the mixed-level restriction.

If you need to rebind higher-level bind files on lower-level systems, you can:
  • Use a lower level IBM data server client to connect to the higher-level server and create bind files which can be shipped and bound to the lower-level Db2 environment.
  • Use a higher-level IBM data server client in the lower-level production environment to bind the higher-level bind files that were created in the test environment. The higher-level client passes only the options that apply to the lower-level server.