Changes the Workload a session or request is assigned to.
|IndByte||BYTE||Indicator bits that specify which fields to treat as NULL if you are using indicator mode.
Each bit in the byte corresponds to one field in the input data.
If data is supplied for that field, set the bit to zero.
If the data for that field is NULL (that is, there is no data supplied for that field), set the bit to 1.
The IndByte field is only required if the CLIv2 request is submitted in indicator mode.
|MONITOR software version ID. This can be version 6 or later.
For a general explanation of monitor version choices, see MONITOR VERSION.
|host_id||SMALLINT||Host upon which the session was established. The host ID cannot exceed 1023. A host ID of zero identifies the database operator console.|
|session_no||INTEGER||Session number for his record. This value is assigned by the host (or client) at logon.
Together with a given Host ID, a session number uniquely identifies a session on the database system.
|PE_vproc_no||SMALLINT||PE vproc number where the session runs.|
|scope||SMALLINT||Scope of the change defined:
|WLC_id||INTEGER||WD ID to which the request should be assigned.|
To use this request, you must have the ABORTSESSION and MONSESSION privileges as part of your default role or both privileges must be granted directly to you.
- Teradata Vantage™ - Database Administration, B035-1093
- Teradata Vantage™ - Advanced SQL Engine Security Administration, B035-1100
- Teradata JDBC Driver Reference, available at https://teradata-docs.s3.amazonaws.com/doc/connectivity/jdbc/reference/current/frameset.html
The TDWM WD ASSIGNMENT request is comparable to changing the session priority by the way of the SQL SET SESSION ACCOUNT statement when TASM Workloads are not enabled.
Use TDWM WD ASSIGNMENT to change the assigned WD for an individual request or session in cases where the rules imposed by the current WD prevent it from running as needed.
Use the MONITOR SESSION request to determine host_id, session_no, PE_vproc_no, scope, and WLC_id for the TDWM WD ASSIGNMENT input.
The following table shows how the scope determines the effects of the TDWM WD ASSIGNMENT.
|If the scope = ...||And there is ...|
|0 (current request)||no active request, this request has no effect.|
|0 (current request)||an active request, the current active request is moved into the specified WD. The “change workload” exception if specified is ignored for this request.|
|1 (session) request||no active request, all subsequent requests on this session are assigned into the specified WD. If specified, the “change workload” exception is ignored for all requests.|
|1 (session)||an active request, the current active request, and all subsequent requests on the session, move into the specified WD.
If specified, the “change workload” exception is ignored for all requests.
CLIv2 Request Parcels
|Parcel Sequence||Parcel Flavor||Length (Bytes)||Comments/Key Parcel Body Fields|
|Success||8||18 to 273||StatementNo = 1
ActivityCount = 0
ActivityType = 159 (PCLTWMWDASSIGNMENTSTMT)
|EndStatement||11||6||StatementNo = 1|
Sample Input - CLIv2 Request
The following example shows how the parcels for a TDWM WD ASSIGNMENT request, built by CLIv2, appear when sent to the database server.
|0001||Req||16||Request||TDWM WD ASSIGNMENT|
Sample Input - Teradata JDBC Driver Request
For an example of how the PM/API request, built in Java, appears when sent to the database server, see Teradata JDBC Driver Reference, available at https://teradata-docs.s3.amazonaws.com/doc/connectivity/jdbc/reference/current/frameset.html.
- host_id = 1
- session_no = 1000
- PE_vproc_no =16383
- scope = 1
- WLC_id = 3
The TDWM WD ASSIGNMENT request commonly returns values in text character format. Your application program may return the values in a different format or display.
Success parcel: StatementNo: 1 ActivityCount: 1 ActivityType: 159 FieldCount: 1 DataInfo parcel: FieldCount: 1 EndStatement. EndRequest.