15.10 - EventCount - Teradata Database

Teradata Database SystemFE Macros

prodname
Teradata Database
vrm_release
15.00
15.10
category
Administration
featnum
B035-1103-015K

EventCount

Returns a count of each type of event in DBC.SW_Event_Log which occurred in the set period.

Syntax

where:

 

Syntax element …

Specifies …

Fromdate

the date on which the search is to start.

The format is 'YYYY-MM-DD'. This parameter can be coded either as a character string, for example, '2013-05-31', or as a numeric value, for example, 1130531.

Todate

the date on which the search is to stop.

The format is 'YYYY-MM-DD'. This parameter can be coded either as a character string, for example, '2013-05-31', or as a numeric value, for example, 1130531.

The default value for Todate is the current date.

Note: This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.

Usage Notes

The EventCount macro takes into account event code 033-13895-00, or whose severity is greater than 20.

For a complete description of these events, see the “Parallel Database Extensions (PDE) Messages” chapter of Messages.

This macro does not report counts for events which are informational in nature, but rather only those events that will give you an idea of the health of Teradata Database.

From this macro you can observe event code counts and plan maintenance accordingly.

Example  

The following statement provides counts of events between May 5, 2013, and the date of today:

Exec EventCount (’2013-05-05’,);

Example  

The following statement provides counts of event codes between October 28, 2012 and February 12, 2013:

Exec EventCount (’2012-10-28’,’2013-02-12’);

Example  

The following statement provides counts of events for the last sixty days:

Exec EventCount (Date-60,);

The resulting report follows:

EXECUTE EventCount (Date-60,);
 
 *** Echo accepted. 
 *** Total elapsed time was 1 second.
 
 
 *** Echo accepted. 
 
 *** Echo accepted. 
 
 *** Echo accepted. 
 
 *** Echo accepted. 
 
 *** Echo accepted. 
 
 *** Echo accepted. 
 
 *** Echo accepted. 
 
 *** Query completed. One row found. 4 columns returned. 
14/04/04                       Total Of Each Event                         10:44
                       Between 2014-02-03 and 2014-04-04                       
 
                                            Total
                              Event Tag  Occurrences
                           ------------  -----------
                            33-10198-00            5
 
 *** Echo accepted. 
 

The following figure shows how to interpret the Event Tags included in the report.