WLM_SET_CLIENT_INFO procedure - Set client information
The WLM_SET_CLIENT_INFO procedure sets client information associated with the current connection at the database server.
By using this procedure, you can set the client's user ID, application name, workstation name, accounting information, or workload information at the database server. Calling this procedure changes the stored values of the relevant transaction processor (TP) monitor client information fields and special register settings for this connection.
The client information fields are used at the database server for determining the identity of the application or user currently using the connection. The client information fields for a connection are considered during database workload evaluation and also displayed in any database audit records or application snapshots generated for this connection.
Unlike the sqleseti API, this procedure does not set client information at the client but instead sets the corresponding client attributes on the database server. Therefore, you cannot use the sqleqry API to query the client information that is set at the database server using this procedure. If an application uses the sqleseti API to change the client information, the new values will change the setting at the database server. If the sqleseti API is used to change either the user ID or the application name without changing the accounting information, the accounting information at the database server will also be reset to the value of the accounting information at the client.
The data values provided with the procedure are converted to the appropriate database code page before being stored in the related TP monitor fields or special registers. Any data value which exceeds the maximum supported size after conversion to the database code page is truncated before being stored at the server. The truncated values are returned by both the TP monitor fields and the special registers when those stored values are queried.
The WLM_SET_CLIENT_INFO procedure is not under transaction control, and client information changes made by the procedure are independent of committing or rolling back units of work. However, because workload reevaluation occurs at the beginning of the next unit of work for each application, you must issue either a COMMIT or a ROLLBACK statement to make client information changes effective.
Syntax
The schema is SYSPROC.
Procedure parameters
-
client_userid
- An input argument of type VARCHAR(255) that specifies the user ID for the client. If you specify NULL, the value remains unchanged. If you specify an empty string, which is the default value, the user ID for the client is reset to the default value, which is blank. client_wrkstnname
- An input argument of type VARCHAR(255) that specifies the workstation name for the client. If you specify NULL, the value remains unchanged. If you specify an empty string, which is the default value, the workstation name for the client is reset to the default value, which is blank. client_applname
- An input argument of type VARCHAR(255) that specifies the application name for the client. If you specify NULL, the value remains unchanged. If you specify an empty string, which is the default value, the application name for the client is reset to the default value, which is blank. client_acctstr
- An input argument of type VARCHAR(255) that specifies the accounting string for the client. If you specify NULL, the value remains unchanged. If you specify an empty string, which is the default value, the accounting string for the client is reset to the default value, which is blank. client_workload
- An input argument of type VARCHAR(255) that specifies the workload
assignment mode for the client. If you specify NULL, the value remains
unchanged. The values are as follows:
- SYSDEFAULTADMWORKLOAD
- Specifies that the database connection will be assigned to SYSDEFAULTADMWORKLOAD, enabling users with ACCESSCTRL, DATAACCESS, DBADM, SECADM, or WLMADM authority to bypass the normal workload evaluation.
- AUTOMATIC
- Specifies that the database connection will be assigned to a workload chosen by the workload evaluation that is performed automatically by the server.
Note: The client_workload argument is case sensitive.
Authorization
- EXECUTE privilege on the routine
- DATAACCESS authority
- DBADM authority
- SQLADM authority
- WLMADM authority
Default PUBLIC privilege
None
Examples
CALL SYSPROC.WLM_SET_CLIENT_INFO('db2user', 'machine.torolab.ibm.com',
'auditor', 'Accounting department', 'AUTOMATIC')
CALL SYSPROC.WLM_SET_CLIENT_INFO('db2user2', NULL, NULL, NULL, NULL)
CALL SYSPROC.WLM_SET_CLIENT_INFO('', NULL, NULL, NULL, NULL)
Usage notes
If the input that you specify for any procedure parameter exceeds its specified field length, the input field is truncated and the procedure runs using the truncated inputs.
Input fields containing single quotations are not supported and result in an error.