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

Returns a list of all active workloads. TDWMActiveWDs is a table function.

Syntax

REPLACE FUNCTION TDWMActiveWDs (
) RETURNS TABLE (
    WDId INTEGER,
    WDName VARCHAR(30) CHARACTER SET UNICODE,
    Status VARCHAR(8) CHARACTER SET LATIN,
    SLG INTEGER,
    PGID INTEGER,
    AGID INTEGER,
    LogMode VARCHAR(8) CHARACTER SET LATIN,
    CurrOpEnv INTEGER,
    ActualOpEnv INTEGER
  )
LANGUAGE C
NO SQL
NO EXTERNAL DATA
PARAMETER STYLE SQL 
NOT DETERMINISTIC 
CALLED ON NULL INPUT 
EXTERNAL NAME 'SL!api'';

Syntax Elements

WDId
The WD number.
WDName
The WD name.
Status
Enabled status.
SLG
Service level goal.
PGID
Performance group number assigned to the WD.
AGID
Allocation group number assigned to the WD.
LogMode
Type of logging.
CurrOpEnv
Current operating environment.
ActualOpEnv
Active operating environment.

Usage Notes

The GDO for TDWM.TDWMActiveWDS exceeds the size of the protected buffer, so this function uses the non-protected buffer. Note, this means the function is not protected.

Example: Using TDWMActiveWDs

sel * from table (tdwm.TDWMActiveWDs()) as t1;

*** Query completed. One row found. 9 columns returned. 
 *** Total elapsed time was 1 second.

 WDId  WDName       Status   SLG  PGID   AGID  LogMode    CurrOpEnv  ActualOpEnv
-----  ----------  -------  ----  ----  -----  --------  ----------  -----------
  250  WD-Default  Default     0     0      0  Summary           12           12