DB2 10.5 for Linux, UNIX, and Windows

ClientUserID CLI/ODBC configuration keyword

The ClientUserID keyword is used to set the client user ID (accounting user ID) that is sent to a database. Applications that do not specify the client user ID by default can use the ClientUserID keyword to provide the client user ID.

db2cli.ini keyword syntax:
ClientUserID = userid
Default setting:
None
Applicable when:
Connected to a database with an IBM® Data Server product.
Equivalent environment or connection attribute:
SQL_ATTR_INFO_USERID
Usage notes:
Do not confuse the client user ID with the authentication user ID. The client user ID is for identification purposes only and is not used for any authentication.

 The CLI driver has limit of 255 characters for the ClientUserID 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 128 characters for the CURRENT CLIENT_USERID special register.
  • DB2 for z/OS servers remove trailing spaces that are specified in the ClientUserID keyword value.
  • DB2 for z/OS Version 10 and earlier servers support a length of up to 16 characters.
  • CLI applications can set the ClientUserID 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 DB2 for z/OS Version 9 and earlier server, use only the characters A-Z and 0-9 and the underscore (_) or period (.).

For connection to DB2 for z/OS servers, the ClientUserID 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_USERID special register value is the user ID that is specified for a connection. 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.