Purpose
Collects the Teradata dynamic workload management software exception data from the Teradata Database.
Definition
REPLACE FUNCTION TDWM.TDWMEXCEPTIONS() RETURNS TABLE ( VProcID SMALLINT, QueryID BIGINT, UserName VARCHAR(128) CHARACTER SET UNICODE, SessionID INTEGER, RequestNum INTEGER, LogicalHostID SMALLINT, AcctString VARCHAR(128) CHARACTER SET UNICODE, WDID INTEGER, OpEnvID INTEGER, SysConID INTEGER, ClassifyTime FLOAT, ClassifyDate INTEGER, ExceptionTime FLOAT, ExceptionDate INTEGER, ExceptionValue INTEGER, ExceptionAction VARCHAR(10) CHARACTER SET LATIN, NewWDID INTEGER, ExceptionCode INTEGER, ExceptionSubCode INTEGER, ErrorText VARCHAR(255) CHARACTER SET UNICODE, ExtraInfo VARCHAR(200) CHARACTER SET UNICODE, RuleID INTEGER, WarningOnly VARCHAR(1) CHARACTER SET LATIN, RejectionCat SMALLINT ) . . . ;
Usage Notes
The TDWMExceptions function provides similar functionality to a TDWM Exceptions request. For more information about this interface, see TDWM EXCEPTIONS.
Result Rows
Field Name | Description |
---|---|
VprocID | Vproc the request with the exception was running on. |
QueryID | Query ID for the query that encountered an exception. |
UserName | User name used in the query with the exception. |
SessionID | Session ID of the query with the exception. |
RequestNum | Request number of the query with the exception. |
LogicalHostID | Logical host ID of the query with the exception. |
AcctString | Account string of the query with the exception. |
WDID | WD ID the query with the exception was running in. |
OpEnvID | Planned environment ID in force when the query encountered the exception. |
SysConID | Health condition ID in force when the query encountered the exception. |
ClassifyTime | Time the query with the exception was classified. |
ClassifyDate | Date the query with the exception was classified. |
ExceptionTime | Time the query encountered the exception. |
ExceptionDate | Date the query encountered the exception. |
ExceptionValue | Type of exception that occurred:
A conversion to hex is used to extract the bit values. For example, a value of 1024 converted to hex is 400.
|
ExceptionAction | Exception action taken by the exception handler:
For example, CE stands for change WD and execute program. |
NewWDID | WD the query was moved into if the ExceptionAction was change WD. |
ExceptionCode | Database exception code. |
ExceptionSubCode | Code for additional information. This field is not currently used.
|
ErrorText | Error text generated for the exception. |
ExtraInfo | Exception values noted at the time of the exception. |
RuleID | Teradata dynamic workload management software rule ID of the rule with the exception handling directive. |
WarningOnly | Indicator that this is a warning only. |
RejectionCat | Teradata dynamic workload management software category this query was rejected from. |
Example: Using TDWMExceptions
SELECT * from table (TDWM.TDWMExceptions()) as t2; *** Query completed. 1 row found. 24 columns returned. *** Total elapsed time was 1 second. VprocId 16383 QueryId 163837185173601767 UserName LUMBER SessionId 32 RequestNum 2 LogicalHostId 1 AcctString LUMBER WdId 11 OpEnv 1 SysCon 1 ClassifyTime 1.55443000000000E 005 ClassifyDate 1090928 ExceptionTime 1.55449000000000E 005 ExceptionDate 1090928 ExceptionValue 2 ExceptionAction LA NewWDID 11 ExceptionCode 3156 ExceptionSubCode 0 ErrorText CPUTime: 1734ms. ExtraInfo RuleId 2 WarningOnly RejectionCat 0