15.10 - TDWMAbortDelayedRequest - Teradata Database

Teradata Database Application Programming Reference

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

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

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

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.

The TDWMAbortDelayedRequest function provides similar functionality to a TDWM DELAY REQUEST CHANGE request. For more information, see “TDWM DELAY REQUEST CHANGE” on page 347.

This function returns a zero if it is successful.

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