15.10 - TDWM DELAY REQUEST CHANGE - Teradata Database

Teradata Database Application Programming Reference

prodname
Teradata Database
vrm_release
15.10
category
Programming Reference
featnum
B035-1090-151K

Releases or aborts a specific request or session on the Teradata dynamic workload management software delay queue.

 

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.

Note: The IndByte field is only required if the CLIv2 request is submitted in indicator mode.

mon_ver_id

SMALLINT,
NOT NULL

MONITOR software version ID. This can be version 6 or later.

For a general explanation of monitor version choices, see “MONITOR VERSION” on page 162.

Request Flag

SMALLINT

Indicator that the request or session was aborted or released:

  • 0 = Request is aborted
  • 1 = Request is released
  • 2 = Session is aborted
  • 3 = Session is released
  • Host ID

    SMALLINT

    ID of the host number upon which the session containing the delayed request was established.

    Reserved

    SMALLINT

    Mod-4 alignment padding.

    Session Number

    INTEGER

    Number of the session in which the delayed request was submitted. A unique session number is assigned by the host (or client) at logon.

    Request Number

    INTEGER

    Active request number.

    Note: This field is not used if Request Flag is either 2 or 3.

    Workload Class Id

    INTEGER

    Workload ID for the delayed request.

    If the request is from the context delay queue (where there is no workload ID), the field value is zero.

    Note: This field is not used if Request Flag is either 2 or 3.

    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:

  • Database Administration
  • Security Administration
  • Teradata JDBC Driver User Guide
  • The TDWM DELAY REQUEST CHANGE request allows requests or sessions to be processed out of the normal first-in-first-out (FIFO) order.

    Note: Before you submit a TDWM DELAY REQUEST CHANGE request you need to run a TDWM STATISTICS or MONITOR SESSION request to obtain information about the delayed query that requires change. Use the output of the request to identify the Host Id, Session Number, Request Number, and Workload Class Id parameters required as part of the TDWM DELAY REQUEST CHANGE input.

    If the identified request or session is not found in the Teradata dynamic workload management software delay queue, an error is returned. This condition is expected since requests or sessions are normally released from the delay queue whereas the information in the TDWM STATISICS request could be outdated.

     

    Parcel Sequence

    Parcel Flavor

    Length (Bytes)

    Comments/Key Parcel Body Fields

    Success

    8

    18 to 273

    StatementNo=1

    ActivityCount=0

    ActivityType= 155 (PCLTWMDELRQSTCHGSTMT)

    EndStatement

    11

    6

    StatementNo = 2-byte integer=1

    EndRequest

    12

    4

    None

    The following example shows how the parcels for a TDWM DELAY REQUEST CHANGE request, built by CLIv2, appear when sent to the Teradata Database server.

    Note: In this example, the size of the response buffer in the example is set at the maximum (64,000 bytes), although you can set it to any size.

     

    Flavor

    Length

    Body

    Num

    Name

    Bytes

    Field

    Value

    0001

    Req

    16

    Request

    TDWM DELAY REQUEST CHANGE

    0003

    Data

    24

    MonVerID

    Request Flag

    Host Id

    Request Number

    Session Number

    Workload Class Id

    7

    0

    1

    5

    1000

    10

    0004

    Resp

    6

    BufferSize

    64000

    For an example of how the PM/API request, built in Java, appears when sent to the Teradata Database server, see Teradata JDBC Driver Reference.

    The TDWM DELAY REQUEST CHANGE request returns values approximately as shown below when TASM Workloads are enabled and the following input data is specified:

  • Request Flag = 0
  • Host Id =1
  • Request Number = 5
  • Session Number = 1000
  • Workload Class Id = 10
  • The TDWM DELAY REQUEST CHANGE 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: 155 FieldCount: 1
    DataInfo parcel:
     FieldCount: 1
    EndStatement.
    EndRequest.