Collects the Teradata dynamic workload management software exception data from the database.
Syntax
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 ) ... ;
Syntax Elements
- 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:
- 0x00000001 - Exception time limit exceeded.
- 0x00000002 - CPU time (AMP and PE) limit exceeded.
- 0x00000004 - Blocked time limit exceeded.
- 0x00000008 - Disk to CPU ratio exceeded.
- 0x00000010 - AMP CPU skew limit exceeded.
- 0x00000020 - AMP I/O count limit exceeded.
- 0x00000040 - AMP I/O skew limit exceeded.
- 0x00000080 - Max row count (for a step) exceeded.
- 0x00000100 - Max row count (for a query) exceeded.
- 0x00000200 - Spool space limit exceeded.
- 0x00000400 - Number of AMPs used in query exceeded.
- 0x00000800 - Disk CPU ratio value exceeded
- 0x00001000 - I/O space value exceeded.
- ExceptionAction
- Exception action taken by the exception handler:
- A =Abort
- C =Change WD
New WDId contains the new WD.
- L =Log.
- E =Execute Program
ExProgram contains the program name.
- T =Alert
ExAlert contains the alert name.
- N = No action
This option cannot be combined with other actions. It disables exception detection.
- S =Abort if the statement is a SELECT and no update has been done in the current transaction
- Q = Insert a row to DBC.SystemQTbl
- NewWDID
- WD the query was moved into if the ExceptionAction was change WD.
- ExceptionCode
- Database exception code.
- ExceptionSubCode
- Code for additional information.
- 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.
Usage Notes
The TDWMExceptions function provides similar functionality to a TDWM Exceptions request. For more information about this interface, see TDWM EXCEPTIONS.
Example: Using TDWMExceptions
SELECT * from table (TDWM.TDWMExceptions()) as t2;
Result:
*** 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