TDWMActiveWDs - Teradata Database - Teradata Vantage NewSQL Engine

Application Programming Reference

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-02
dita:mapPath
vwf1492987142269.ditamap
dita:ditavalPath
changebar_rev_16_20_exclude_audience_ie.ditaval
dita:id
B035-1090
lifecycle
previous
Product Category
Teradata Vantageā„¢

Purpose

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

Definition

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'';

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.

Result Rows

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

Example: Using TDWMActiveWDs

sel * from table (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