15.10 - TriggersV[X] - Teradata Database

Teradata Database Data Dictionary

Product
Teradata Database
Release Number
15.10
Content Type
Administration
User Guide
Publication ID
B035-1092-151K
Language
English (United States)

Contains information about event-driven, specialized procedures attached to a single table and stored in the database.

Schema

DBC

 

View Column

Data Type

Format

Source Table.Column

DataBaseName

VARCHAR(128)

UNICODE

NOT CASESPECIFIC

NOT NULL

X(128)

Dbase.DatabaseName

SubjectTableDatabaseName

VARCHAR(128)

UNICODE

NOT CASESPECIFIC

NOT NULL

X(128)

Dbase.DatabaseName

TableName

VARCHAR(128)

UNICODE

NOT CASESPECIFIC

NOT NULL

X(128)

TVM.TVMName

TriggerName

VARCHAR(128)

UNICODE

NOT CASESPECIFIC

NOT NULL

X(128)

TriggersTbl.TriggerName

EnabledFlag

CHAR(1) LATIN

UPPERCASE

NOT NULL

X(1)

TriggersTbl.TriggerEnabled

ActionTime

CHAR(1) LATIN

UPPERCASE

NOT NULL

X(1)

TriggersTbl.ActionTime

Event

CHAR(1) LATIN

UPPERCASE

NOT NULL

X(1)

TriggersTbl.TriggerEvent

Kind

CHAR(1) LATIN

UPPERCASE

NOT NULL

X(1)

TriggersTbl.Kind

OrderNumber

SMALLINT

---,--9

TriggersTbl.TriggerOrder

TriggerComment

VARCHAR(255)

UNICODE

X(255)

TriggersTbl.CommentString

RequestText

VARCHAR(12500)

UNICODE

X(255)

TVM.RequestText

CreatorName

VARCHAR(128)

UNICODE

NOT CASESPECIFIC

NOT NULL

X(128)

Dbase.DatabaseName

CreateTimeStamp

TIMESTAMP(0)

YYYY-MM-DDBHH:MI: SS

TriggersTbl.CreateTimeStamp

LastAlterName

VARCHAR(128)

UNICODE

NOT CASESPECIFIC

NOT NULL

X(128)

Dbase.DatabaseName

LastAlterTimeStamp

TIMESTAMP(0)

YYYY-MM-DDBHH:MI:SS

TriggersTbl.LastAlterTimeStamp

AccessCount

INTEGER

--,---,---,--9

TriggersTbl.AccessCount

LastAccessTimeStamp

TIMESTAMP(0)

YYYY-MM-DDBHH:MI:SS

TriggersTbl.LastAccess
TimeStamp

CreateTxtOverflow

CHAR(1) LATIN

X(1)

TriggersTbl.CreateTxtOverflow

VTEventType

CHAR(1) LATIN

X(1)

TriggersTbl.VTEventType

TTEventType

CHAR(1) LATIN

X(1)

TriggersTbl.TTEventType

The X view references these additional tables:

  • DBC.AccessRights
  • DBC.DBase
  • DBC.Owners
  • DBC.RoleGrants
  • DBC.Roles
  • DBC.TriggersTbl
  • DBC.TVM
  • Some of the column values show information related to a Teradata temporal table or an ANSI temporal table. For more information about these tables, see ANSI Temporal Table Support and Temporal Table Support.

    Possible Values for Event

     

    Value

    Description

    U

    Update

    I

    Insert

    D

    Delete

    Possible Values for VTEventType

     

    Value

    Description

    A

    ANSIQUALIFIER

    Note: ANSI temporal tables require that the session temporal qualifier for systems using Teradata temporal tables be explicitly set to ANSIQUALIFIER.

    C

    CURRENT VALIDTIME

    N

    NONSEQUENCED VALIDTIME

    NULL

    No valid-time dimension

    S

    SEQUENCED VALIDTIME

    Possible Values for TTEventType

     

    Value

    Description

    A

    ANSIQUALIFIER.

    Note: ANSI temporal tables require that the session temporal qualifier for systems using Teradata temporal tables be explicitly set to ANSIQUALIFIER.

    C

    CURRENT TRANSACTIONTIME

    N

    NONSEQUENCED TRANSACTIONTIME

    NULL

    No transaction-time dimension

    S

    SEQUENCED TRANSACTIONTIME

    T

    Nontemporal to indicate that transaction-time is ignored even though the table supports a transaction-time dimension

    The following SELECT returns this information:

  • Name of the database in which the triggering table is defined for those cases in which a trigger is defined in a different database than the triggering table
  • Names of the triggering tables
  • Names of the database in which the trigger is defined
  • Trigger names
  • This query identifies those triggers for which the trigger must be dropped if the database containing the triggering table is deleted.

    SELECT SubjectTableDatabaseName, TableName, DatabaseName, TriggerName 
       FROM TriggersV
       WHERE DatabaseName <> SubjectTableDatabaseName
       ORDER BY 1, 2, 3, 4;

    For more information about triggers, see SQL Data Definition Language.