Binds a capture file to generate one or more static packages.
A capture file is generated during a static profiling session of a CLI,
ODBC, or .NET application, and contains SQL statements that were
captured during the application run. This utility processes the capture
file so that it can be used by the CLI,
ODBC, or .NET driver to execute static SQL for the application.
Authorization
- Access privileges to any database objects referenced by SQL statements
recorded in the capture file.
- Sufficient authority to set bind options such as OWNER and QUALIFIER
if they are different from the connect ID used to invoke the db2cap command.
- BINDADD authority if the package is being bound for the first
time; otherwise, BIND authority is required.
Command syntax
>>-db2cap--+-----+--bind--capture-file-- -d--database_alias----->
+- -h-+
'- -?-'
>--+--------------------------------+--------------------------><
'- -u--userid--+---------------+-'
'- -p--password-'
Command parameters
- -h | -?
- Displays help text for the command syntax.
- bind capture-file
- Binds the statements from the capture file and creates one or
more packages. This capture file is also known as the pureQueryXML file
for .NET.
- -d database_alias
- Specifies the database alias for the database that contains one
or more packages.
- -u userid
- Specifies the user ID to be used to connect to the data source.
If a user ID is not specified, a trusted authorization ID is obtained
from the system.
- -p password
- Specifies the password to be used to connect to the data source.
Usage notes
This command must be entered
in lowercase on UNIX platforms,
but can be entered in either lowercase or uppercase on Windows operating systems. Static package
binding for .NET applications is supported only on Windows operating systems.
This utility
supports many user-specified bind options that can be found in the
capture file. In order to change the bind options, open the capture
file in a text editor.
The SQLERROR(CONTINUE) and the VALIDATE(RUN)
bind options can be used to create a package.
When using this
utility to create a package, static profiling must be disabled.
The
number of packages created depends on the isolation levels used for
the SQL statements that are recorded in the capture file. The package
name consists of up to a maximum of the first seven characters of
the package keyword from the capture file, and one of the following
single-character suffixes:
- 0 - Uncommitted Read (UR)
- 1 - Cursor Stability (CS)
- 2 - Read Stability (RS)
- 3 - Repeatable Read (RR)
- 4 - No Commit (NC)
To obtain specific information about packages, the user
can:
- Query the appropriate SYSIBM catalog tables using the COLLECTION
and PACKAGE keywords found in the capture file.
- View the capture file.