15.10 - TDWMReleaseDelayedRequest - Teradata Database

Teradata Database Application Programming Reference

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

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

REPLACE FUNCTION TDWM.TDWMReleaseDelayedRequest
  (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.

A value of zero indicates the utility session is released.

WDId

WD ID for the request in the delay queue being acted on.

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

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

This function returns a zero if it is successful.

Example : Releasing 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 (Releasing 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