DB2 Version 10.1 for Linux, UNIX, and Windows

IBM data server driver configuration file structure

The scope of configuration keywords and their associated values are defined by the position of configuration keywords in the IBM® data server driver configuration file (db2dsdriver.cfg file).

Depending on the position of the configuration keyword, the keyword can have a global effect (affecting all connections) or it might affect only the specific database connection that is made to that database or alias. Some keywords can be specified only in a specific section. The IBM data server driver configuration file contains the following sections:
  • <dsncollection>: The DSN collection section is contained within the <dsncollection> and </dsncollection> tags. The DSN collection section contains at least one DSN subsection. The <dsn> subsection must be defined under the <dsncollection> section with data source information.
    • <dsn>: The DSN subsection is contained within the <dsn> and </dsn> tags. Parameters in the <dsn> section apply only to the specified DSN.
  • <databases>: The database information section is contained within the <databases> and </databases> tags. Parameters in the <databases> section apply only to the specified database connection.

    You can define two subsections under the database information section to enable high availability features:

    • <wlb>: The workload balancing subsection is contained within the <wlb> and </wlb> tags. Workload-balance related parameters are placed in the <wlb> section, and they apply to a specific database connection.
    • <acr>: The automatic client reroute subsection is contained within the <acr> and </acr> tags. Automatic client reroute related parameters are placed in the <acr> section, and they apply to a specific database connection.
  • <parameters>: The global attributes section is contained within the <parameters> and </parameters> tags. Parameters in the <parameters> section apply to all databases and aliases.
  • <ldapserver>: The LDAP section is contained within the <ldapserver> and </ldapserver> tags. You can use parameters in the LDAP section to specify LDAP server information. Only one LDAP section is allowed in the IBM data server driver configuration file. The LDAP section settings are not recognized by the .NET and embedded applications.

In Version 10.1 Fix Pack 2 and later fix packs, you can define the <specialregisters> subsection in the <dsn>, <database>, or <parameters> sections of the db2dsdriver.cfg file. The special registers subsection is contained within the <specialregisters> and </specialregisters> tags. The special registers that are defined in the <specialregisters> subsection are sent to the server when the first SQL statement is sent by the client after a connection is established. All special registers that are specified in the <specialregisters> subsection are executed after processing other existing special register keywords that are defined in the connection string, the IBM data server driver configuration file, or the db2cli.ini file. Therefore, if a special register is specified in the <specialregisters> subsection and also specified in the connection string, the IBM data server driver configuration file or the db2cli.ini file, the value that is set in the <specialregisters> subsection is the effective value. The special registers subsection can be placed in the <dsn>, <databases>, or <parameters> sections of the IBM data server driver configuration file.

The <specialregisters> subsection has no performance impact and does not result in additional network traffic. Any exceptions that are encountered are reported for the SQL statement.

All special register parameters that are defined in the <specialregisters> subsection are replayed during the failover scenario that is associated with the automatic client reroute feature.

For a list of the special registers that can be specified for connections to DB2® for z/OS® servers, see "General rules for special registers".

If you specify multiple entries of the same parameter, with different values, in the same section of an IBM data server driver configuration file, you cannot determine which parameter value takes effect.