The section "Platform Specific Details for CLI/ODBC Access" should provide you with all of the information you require. The following additional information is useful where DB2 tool support is not available, and for administrators who require more detailed information.
The CLI/ODBC driver will autobind on the first connection
to the database, provided the user has the appropriate privilege or
authorization. The administrator may want to perform the first connect or
explicitly bind the required files.
Table 11. DB2 CLI Bind Files and Package Names
Bind File Name | Package Name | Needed by DB2 Universal Database | Needed by DRDA servers | ||
---|---|---|---|---|---|
db2clics.bnd | SQLL15xx | Yes | Yes | ||
db2clirr.bnd | SQLL25xx | Yes | Yes | ||
db2cliur.bnd | SQLL35xx | Yes | Yes | ||
db2clirs.bnd | SQLL45xx | Yes | Yes | ||
db2clinc.bnd | SQLL55xx | No | DB2 for AS/400 | ||
db2cliws.bnd | SQLL65xx | Yes | No | ||
db2clims.bnd | SQLL75xx | No | DB2 for MVS/ESA | ||
db2clivm.bnd | SQLL85xx | No | SQL/DS | ||
db2cliv1.bnd | SQLLB5xx | Version 1 only | No | ||
db2cliv2.bnd | SQLL95xx | Version 2 or later | No | ||
db2clias.bnd | SQLLA5xx | No | DB2 for AS/400 | ||
|
The db2cli.lst file contains the names of the required bind files for DB2 CLI to connect to DB2 Version 2 or later servers (db2clixx.bnd where xx is cs, rr, rs, ur, ws, and v2). The db2cli1.lst file contains the names of the required bind files for DB2 CLI to connect to DB2 Version 1 servers (db2clixx.bnd where xx is cs, rr, ur, and v1).
For DRDA servers:
DB2 CLI can be configured further by using either the CCA or the DB2 Client Setup administration tool, whichever is applicable for your platform, or by manually editing the db2cli.ini file.
This file contains various keywords and values that can be used to modify the behavior of DB2 CLI and the applications using it. The keywords are associated with the database alias name, and affect all DB2 CLI and ODBC applications that access the database.
By default, the location of the CLI/ODBC configuration keyword file is as follows:
The environment variable DB2CLIINIPATH can also be used to override the default and specify a different location for the file.
The configuration keywords enable you to:
For a complete description of all the keywords and their usage, refer to "Configuration Keywords".
The db2cli.ini initialization file is an ASCII file which stores values for the DB2 CLI configuration options. A sample file is shipped to help you get started. Refer to "Configuration Keywords" for information on each keyword.
See "Platform Specific Details for CLI/ODBC Access" for more information on how to modify this file on your platform.
Within the file, there is one section for each database (data source) the user wishes to configure, as well as a common section (if necessary) that affects all connections to DB2.
Only the keywords that apply to all connections to DB2 through the DB2 CLI/ODBC driver are included in the COMMON section. This includes the following keywords:
All other keywords are to be placed in the database specific section, described below.
The COMMON section of the db2cli.ini file begins with:
[COMMON]
Before setting a common keyword it is important to evaluate its impact on all DB2 CLI/ODBC connections from that client. A keyword such as TRACE, for instance, will generate information on all DB2 CLI/ODBC applications connecting to DB2 on that client, even if you are intending to trouble shoot only one of those applications.
Each database specific section always begins with the name of the database alias between square brackets:
[database alias]This is called the section header.
The parameters are set by specifying a keyword with its associated keyword value in the form:
KeywordName =keywordValue
The following is a sample .INI file with 2 database alias sections:
; This is a comment line. [MYDB22] AUTOCOMMIT=0 TABLETYPE="'TABLE','SYSTEM TABLE'" ; This is another comment line. [MYDB2MVS] DBNAME=SAAID TABLETYPE="'TABLE'" SCHEMALIST="'USER1',CURRENT SQLID,'USER2'"
Although you can edit the db2cli.ini file manually on all platforms, we recommend that you use the CCA if it is available on your platform.
Microsoft's 16-bit ODBC Driver Manager and Visigenic's ODBC Driver Manager use the odbc.ini file to record information about the available drivers and data sources. Visigenic's ODBC Driver Manager also uses the odbcinst.ini file on UNIX platforms. Although the necessary files are updated automatically by the tools on most platforms, users of ODBC on UNIX platforms will have to edit them manually. The file odbc.ini (and odbcinst.ini where required) are located:
It is also possible to modify this file manually. Do not change any of the existing entries in the file.
The following is an example odbc.ini file:
[ODBC Data Sources] MS Access Databases=Access Data (*.mdb) [MS Access Databases] Driver=D:\WINDOWS\SYSTEM\simba.dll FileType=RedISAM SingleUser=False UseSystemDB=False
The [ODBC Data Sources] section lists the name of each available data source and the description of the associated driver.
For each data source listed in the [ODBC Data Sources] section, there is a section that lists additional information about that data source. These are called the Data Source Specification sections.
database_alias=IBM DB2 ODBC DRIVERwhere database_alias is the alias of the database cataloged in the database directory (the database name used by the command line processor CONNECT TO statement).
[database_alias] Driver=drive:\windows\system\db2cliw.dllWhere:
The following shows the example file with the IBM data source entries added:
[ODBC Data Sources] MS Access Databases=Access Data (*.mdb) SAMPLE=IBM DB2 ODBC DRIVER [MS Access Databases] Driver=D:\WINDOWS\SYSTEM\simba.dll FileType=RedISAM SingleUser=False UseSystemDB=False [SAMPLE] Driver=D:\WINDOWS\SYSTEM\db2cliw.dll Description=Sample DB2 Client/Server database
Note: | If you are running the ODBC application under WIN-OS/2, specify the equivalent path \OS2\MDOS\WINOS2\SYSTEM in place of the \WINDOWS\SYSTEM path. |
UNIX Configuration of .ini files
The section "UNIX Client Access to DB2 using CLI/ODBC" contains detailed steps on how to update both the odbc.ini and odbcinst.ini files.