TDWMReleaseDelayedRequest Function | Application Programming Reference | Vantage - 17.10 - TDWMReleaseDelayedRequest - 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)

Releases a request or utility session in the Teradata dynamic workload management software defer or delay queue.

This function returns a zero if it is successful.

Syntax

REPLACE FUNCTION TDWM.TDWMReleaseDelayedRequest (
  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.
A value of zero indicates the utility session is released.
WDId
WD ID for the request in the defer or delay queue being acted on.

Usage Notes

The TDWMReleaseDelayedRequest function provides similar functionality to a TDWM DELAY REQUEST CHANGE request. For more information about this interface, see TDWM DELAY REQUEST CHANGE.

When issuing this Teradata dynamic workload management software function, it must be qualified by the database name, TDWM (see examples below).

Example: Using TDWMReleaseDelayedRequest to Release a Delayed Request

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

Example: Using TDWMReleaseDelayedRequest to Release Multiple Delayed Requests

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