TDWMAbortDelayedRequest Function | Application Programming Reference | Vantage - 17.10 - TDWMAbortDelayedRequest - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Application Programming Reference

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1090-171K
Language
English (United States)

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

This function returns a zero if it is successful.

Syntax

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

Syntax Elements

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 defer or 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.

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