ClientUserID IBM data server driver 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.
- Equivalent CLI keyword
- ClientUserID
- Equivalent IBM® data server provider for .NET connection string keyword
- ClientUserID
- IBM data server driver configuration file (db2dsdriver.cfg) syntax
<parameter name="ClientUserID" value="userid"/>
- Default setting:
- None
- Equivalent environment or connection attribute:
- SQL_ATTR_INFO_USERID
- Usage notes:
- Do not confuse the ClientUserID keyword
with the authentication user ID (UserID) keyword.
The ClientUserID keyword is for identification
purposes only and is not used for any authentication.
The CLI driver and the .NET provider has a 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 Version 10 and earlier servers support a length of up to 16 characters.
- Db2 for IBM i V6R1 and later servers support a length of up to 255 characters.
You must set the ClientUserID keyword before the start of a transaction. Changes to the ClientUserID keyword after the start of a transaction do not take effect until the start of the next transaction.
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.