DB2 10.5 for Linux, UNIX, and Windows

ClientApplName CLI/ODBC 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
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® Version 11 servers in new function mode (NFM) 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 i V6R1 and later servers. DB2 for i servers support a length of up to 255 characters.
To ensure that the data is converted correctly when transmitted to a host system, use only the characters A - Z and 0 - 9 and the underscore (_) or period (.).

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.