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).
<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 embedded applications.
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.
If the same parameter or keyword is specified in the <dsn>, <database>, and <parameter> sections (Global parameter), then the order of priority is <dsn>, then <database>, and then <parameter>. If the same parameter or keyword is specified in both the db2dsdriver.cfg file and the Db2 environment or registry variable, then the environment or registry variable takes precedence.
The DSN or database entries that contain the ladp=1
attribute
are created from the LDAP directory entry type in the local database
directory by use of the db2dsdcfgfill command.