Databases Reference
In-Depth Information
To only get CLI keywords applicable for a particular database, we can run the
following command (where < database name > is the name of the database):
db2 get cli cfg for section < database name >
To add or update a CLI keyword for a particular database, we can run the
following command (substituting for the actual database name, CLI keyword, and
value):
db2 update cli cfg for section < database name > using < CLI keyword >
< value >
If a section for a database does not already exist and we use the UPDATE CLI CFG
command, a section will be automatically added to the configuration file. An
example of adding a CLI keyword to the db2cli.ini file on the CLP for the
SAMPLE database is:
db2 update cli cfg for section sample using autocommit 0
Refer to the DB2 UDB Call Level Interface Guide & Reference , SC10-4224, for a
list of all supported CLI keywords.
4.4.4 Setting up the CLI Environment
In addition to setting up the C/C++ development environment as outlined in 4.1.1,
“C/C++ development environment setup” on page 148, programs written using
CLI need to ensure that the necessary CLI packages exist on the database
server.
The CLI driver will communicate with the application and the database to process
SQL statements. Precompile and bind steps are not required for CLI
applications. This means that no application packages are created in the
database. However, for an SQL statement to be executed, there still needs to be
a package with available sections in the database for access plans. This is where
CLI bind files come in. CLI bind files are supplied by DB2 and only have to be
bound against the database once. Once bound, CLI dynamic placeholder
packages will exist in the database. These packages are ready to handle the
dynamic SQL passed by the driver.
DB2 supplies text files listing the required bind files to be bound against a
particular database server platform. Table 4-5 on page 181 outlines the list files
specific to each database server platform. They are available in the BND
directory of the DB2 installation path.
Search WWH ::




Custom Search