DB2 10.5 for Linux, UNIX, and Windows

ClientWorkstationName IBM data server driver configuration keyword

Sets the client workstation name that is sent to a database.

Equivalent CLI keyword
ClientWrkStnName
Equivalent IBM® Data Server Provider for .NET connection string keyword
ClientWorkstationName
IBM data server driver configuration file (db2dsdriver.cfg) syntax
<parameter name="ClientWorkstationName" value="workstation_name"/>
Default setting:
If you do not specify the ClientWorkstationName keyword, an attempt is made to use the host name. The host name is obtained by calling the gethostname() function. If the host name is not configured or an error is encountered during the gethostname() function call, no value for the ClientWorkstationName keyword is sent to the database server.
Equivalent environment or connection attribute:
SQL_ATTR_INFO_WRKSTNNAME
Usage notes:
 The CLI driver and IBM Data Server Provider for .NET have a limit of 255 characters for the value of the ClientWorkstationName keyword. However, database servers enforce different limits for the length of the value and can truncate it.

DB2® for i V6R1 and later servers support a length of up to 255 characters.

For DB2 for z/OS® servers, the ClientWorkstationName keyword sets the CURRENT CLIENT_WRKSTNNAME special register.
  • DB2 for z/OS Version 10 and earlier servers support a length of up to 18 characters.
  • DB2 for z/OS Version 11 servers in new function mode (NFM) support a length of up to 255 characters for the CURRENT CLIENT_WRKSTNNAME special register.
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, the numbers 0 - 9, the underscore (_), or the period (.).
If you do not want to send a value for the ClientWorkstationName keyword to the server, specify the 'NODEFAULT' value:
<parameter name="ClientWorkstationName" value="'NODEFAULT'"/> 

You cannot specify the 'NODEFAULT' value with the DB2ConnectionStringBuilder.ClientWorkstationName property.

Changes to the ClientWorkstationName keyword after the start of a transaction do not take effect until the start of the next transaction.

For connections to DB2 for z/OS servers, the ClientWorkstationName keyword value is sent to the server 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_WRKSTNNAME special register value is the hostname of the client. 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.