Allows an application to set the client
workstation name that is sent to a database. Applications that do
not specify the client workstation name by default can use this keyword
to provide this information.
- Equivalent CLI keyword
- ClientWrkStnName
- Equivalent IBM® Data
Server Provider for .NET connection string keyword
- ClientWorkstationName
- db2dsdriver.cfg configuration syntax
- <parameter name="ClientWorkstationName" value="workstation
name"/>
- Default setting:
- In DB2® Version 9.7 Fix pack 6 and later
fix packs, if the ClientWorkstationName keyword
is not specified, the default value that consists of the host name
is used. The host name is obtained by calling the gethostname() function.
If the host name is not configured or an error is encountered during
thegethostname() function call, no value for the ClientWorkstationName keyword
is sent to the server.
- Equivalent environment or connection attribute:
- SQL_ATTR_INFO_WRKSTNNAME
- Usage notes:
Note the following conditions:
- Some servers might not be able to handle the entire length of
the value and might truncate it.
- You must set the ClientWorkstationName keyword
before the start of a transaction. Changes to the ClientWorkstationName keyword
after the start of a transaction do not take effect until the start
of the next transaction.
- DB2 for z/OS® and OS/390® servers support a length
of up to 18 characters.
- In DB2 Version
9.7 Fix Pack 6 and later fix packs, CLI applications
can set the ClientWorkstationName 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, use only the characters A - Z and 0 - 9 and the underscore
(_) or period (.).