TDWMEventHistory | Teradata Vantage - TDWMEventHistory - Advanced SQL Engine - Teradata Workload Management

Teradata Vantage™ - Workload Management User Guide

Product
Advanced SQL Engine
Teradata Workload Management
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
nbl1556236178169.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1197
lifecycle
previous
Product Category
Software
Teradata Vantage

The TDWMEventHistory table and the view that corresponds to it, QryLogEventHisV, contain information about workload and system events and the values that lead up to a state change.

The table is structured so that the relationship between events can be extracted as a set. Several independent events may help determine the current state. To make this relationship clear, the table lists related events in chronological order under the same timestamp.

For example, when an event occurs, TASM logs it immediately. If this event is part of an event combination that causes a planned environment change, TASM logs the planned environment change and the details of all the events in the event combination. If the planned environment change then triggers a state change, TASM logs the state change under the same timestamp. The seqno (sequence number) field shows the order in which the events occurred. The following is a sample SQL request that extracts events in chronological order.

SELECT entryts,
SUBSTR(entrykind,1,10) "kind",
SUBSTR (entryname,1,20) "name",
CAST (eventvalue as float format '999.9999') "evt value",
CAST (lastvalue as float format '999.9999') "last value",
spare2 "spare Int",
SUBSTR (activity,1,10) "activity id",
SUBSTR (activityname,1,20) "act name", seqno
FROM tdwmeventhistory order by entryts, seqno;

Here is an example of another approach to accessing the TDWMEventHistory log, using recursion to show what caused the system to enter the RED state:

 
WITH RECURSIVE
CausalAnalysis(EntryTS,
EntryKind, EntryID, EntryName, Activity,Activityid) AS
 (
   SELECT EntryTS, EntryKind, EntryID, EntryName, Activity, Activityid
   FROM DBC.TDWMEventHistory
   WHERE EntryKind = 'SYSCON' AND EntryName = 'RED' AND Activity = 'ACTIVE'
   UNION ALL
   SELECT Cause.EntryTS,Cause.EntryKind,Cause.EntryID,
     Cause.EntryName,Cause.Activity,Cause.Activityid
   FROM CausalAnalysis Condition INNER JOIN DBC.TDWMEventHistory Cause
   ON Condition.EntryKind = Cause.Activity AND
     Condition.EntryID = Cause.Activityid)
SELECT * FROM CausalAnalysis
ORDER BY 1 DESC;

                EntryTS EntryKind  EntryID  EntryName  Activity  ActivityId  
----------------------  ---------   ------­ ---------   --------   --------­ 
2006-03-22 14:20:49.12  SYSCON           30  RED          ACTIVE  0  
2006-03-22 14:19:49.06  EXPRESS          20  AWT&NODE     SYSCON  30  
2006-03-22 14:17:48.53  EVENT            11  NODE DOWN   EXPRESS  20  
2006-03-22 14:16:48.51  EVENT            10  LOW AWTS    EXPRESS  20