CURRENT CLIENT_WRKSTNNAME

The CURRENT CLIENT_WRKSTNNAME special register specifies a VARCHAR(255) value that contains the value of the workstation name from the client information specified for the current connection.

The default value of this register is the empty string. The value of the workstation name can be changed through these interfaces:
  • The Set Client Information (SQLESETI) API can change the client special register.
  • Start of changeThe SYSPROC.WLM_SET_CLIENT_INFO procedure can change the client special register.End of change
  • In CLI, SQLSetConnectAttr() can be used to set the SQL_ATTR_INFO_WRKSTNNAME connection attribute.
  • In ODBC, SQLSetConnectAttr() can be used to set the ODBC_ATTR_INFO_WRKSTNNAME connection attribute.
  • In JDBC, the setClientInfo connection method can be used to set the ClientHostName connection property.

Example

Get the workstation name being used for this connection.

   VALUES CURRENT CLIENT_WRKSTNNAME 
   INTO :WS_NAME