16.20 - TDWMAbortDelayedRequest - Teradata Vantage NewSQL Engine

Teradata Vantage™ Application Programming Reference

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
created_date
March 2019
category
Programming Reference
featnum
B035-1090-162K

Purpose

Aborts a request or utility session on the Teradata dynamic workload management software delay queue.

Definition

REPLACE FUNCTION TDWM.TDWMAbortDelayedRequest
  (HostId      SMALLINT,
   SessionNo   INTEGER,
   RequestNo   INTEGER,
   WDId        INTEGER
   )
RETURNS INTEGER
          .
          .
          .
;

Input Parameters

Input Parameter Description
HostId Host ID for the session.
SessionNo Number of the session.
RequestNo Request number of the task.

If the value is zero, the utility session is aborted.

WDId WD ID for the request in the delay queue being examined.

Usage Notes

The TDWMAbortDelayedRequest function provides similar functionality to a TDWM DELAY REQUEST CHANGE request. For more information, see TDWM DELAY REQUEST CHANGE.

Return Value

This function returns a zero if it is successful.

Example: Using TDWMAbortDelayedRequest

This example shows how to abort a delayed request on SessionNo 1011.

SELECT TDWM.TDWMAbortDelayedRequest(HostId, SessionNo, RequestNo, 0)
 FROM TABLE (TDWMGetDelayedQueries('O')) AS t1
  WHERE SessionNo=1011;
 *** Query completed. One row found. One column returned.
 *** Total elapsed time was 3 seconds.
TDWMAbortDelayedRequest(HostId,SessionNo,RequestNo,0)
-----------------------------------------------------
                                                    0

Assuming the request on SessionNo 1011 was delayed, it is aborted as follows:

SELECT DatabaseName FROM dbc.databasesv;
 *** Starting at Tue Apr 26 15:22:42 2005
 *** Failure 3151 TWM Workload violation: Delay Request Change Abort
                Statement# 1, Info =0