TDWM WD Assignment Request | VantageCloud Lake - TDWM WD ASSIGNMENT - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Changes the Workload a session or request is assigned to.

Input Data

Element Data Type Description
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.
mon_ver_id SMALLIN

NOT NULL

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 on 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 record. This value is assigned by the host (or client) at logon.

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:
  • 0 = Current request
  • 1 = Session
WLC_id INTEGER WD ID to which the request must be assigned.

Monitor Privileges

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.

For more information on roles and privileges, see:

Usage Notes

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 when the rules imposed by the current WD prevent the request from running.

Use the MONITOR SESSION request to determine host_id, session_no, PE_vproc_no, scope, and WLC_id for the TDWM WD ASSIGNMENT input.

You must enable TASM Workloads. Contact Teradata Support for details.

The following table shows how the scope determines the effects of the TDWM WD ASSIGNMENT.

Scope Active Request Result
0 (current request) No Current request has no effect.
0 (current request) Yes Current request is moved into the specified WD.

If specified, the "change workload" exception is ignored for this request.

1 (session) request No 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) Yes Current 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 Number Length (Bytes) Comments/Key Parcel Body Fields
Success 8 18 to 273 StatementNo = 1

ActivityCount = 0

ActivityType = 159 (PCLTWMWDASSIGNMENTSTMT)

EndStatement 11 6 StatementNo = 1
EndRequest 12 4 None

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.

In this example, the size of the response buffer in the example is set at the maximum (64,000 bytes).
Number Length Body
Num Name Bytes Field Value
0001 Req 16 Request TDWM WD ASSIGNMENT
0003 Data 8 MonVerID

host_id

session_no

PE_vproc_no

scope

WLC_id

7

1

1000

16383

1

3

0004 Resp 6 BufferSize 64000

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.

Sample Output

The TDWM WD ASSIGNMENT request returns values approximately, as follows, when TASM Workloads rule is enabled and the following input data is specified:
  • 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.