ClientApplName CLI/ODBC and IBM data server driver configuration keyword
The ClientApplName keyword is used to set the client application name that is sent to a database. Applications that do not specify the application name by default can use the ClientApplName keyword to provide the client application name.
- db2cli.ini keyword syntax:
- ClientApplName = application name
- IBM® data server driver configuration file (db2dsdriver.cfg) syntax:
- <parameter name="ClientApplName" value="application name"/>
- Default setting:
- None
- Applicable when:
- Connected to a database with an IBM Data Server product.
- Equivalent environment or connection attribute:
- SQL_ATTR_INFO_APPLNAME
- Usage notes:
- The CLI driver has limit of 255 characters for the ClientApplName keyword.Database servers enforce different limitation in the length of the value and can truncate it. Note the following conditions:
- Db2® for z/OS® data servers support a length of up to 255 characters for the CURRENT CLIENT_APPLNAME special register.
- Db2 for z/OS servers remove trailing spaces that are specified in the ClientApplName keyword value.
- Db2 for z/OS Version 10 and earlier servers support a length of up to 32 characters.
- CLI applications can set the ClientApplName keyword on Db2 for IBM i V6R1 and later servers. Db2 for IBM i servers support a length of up to 255 characters.
For connection to Db2 for z/OS servers, the ClientApplName keyword is replayed upon connection failover when the automatic client reroute (ACR) feature and the workload balance (WLB) feature are enabled.
A client sends the default client information register values to the Db2 for z/OS server when they are not explicitly set by the user. The default CURRENT CLIENT_APPLNAME special register value is the current process name. The SQLGetConnectAttr() function and the sqleqryi API can return the default value only when the enableDefaultClientInfo keyword is set to True in the IBM data server driver configuration file.
Db2 for z/OS traces for IFCID 411, which collect statistics for application names, are limited to 6000 unique application names. If this limit is exceeded, the Db2 for z/OS data server issues error DSNL030I with reason code 00D3105D, and stops collecting statistics for any new application names until the distributed data facility (DDF) is restarted.