15.10 - QryLogSQLV - 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)

Query

DBC

 

View Column

Data Type

Format

Source Table.Column

ProcID

DECIMAL(5,0)

NOT NULL

-(5)9 (explicit)

DBQLSqlTbl.ProcID (Composite NUPI)

CollectTimestamp

TIMESTAMP(6)

NOT NULL

YYYY-MM-DDBHH:MI:SS

DBQLSqlTbl.CollectTimeStamp (Composite NUPI)

QueryID

DECIMAL(18,0)

NOT NULL

--Z(17)9

DBQLSqlTbl.QueryID

SqlRowNo

INTEGER

NOT NULL

--,---,---,--9 (explicit)

DBQLSqlTbl.SqlRowNo

SqlTextInfo

VARCHAR (31000)

UNICODE

NOT CASESPECIFIC

NOT NULL

X(31000)

DBQLSqlTbl.SqlTextInfo

This view is populated if the SQL is requested for the query in addition to the default information row. If the additional SQL text is greater than 31,000 characters, multiple rows are generated.

Possible Values for SQLTextInfo

  • Unavailable
  • Null
  • Note: These are conditions where the SQL is not available to DBQL at the end of the query or when a query fails. In this instance, the SqlTextInfo may be Null, or it may be unavailable. The world “unavailable” is seen when it fails to translate correctly, for example, when the SQL is submitted from a mainframe in EBCDIC format or when UNICODE translation is required.

    The following SELECT statement retrieves the SQL text information of a query.

                     SELECT QueryID, SqlRowNo, SqlTextInfo from DBC.QryLogSQL 
                       WHERE QueryId=201205134619838024;

    Result:

                     QueryID            SqlRowNo   SqlTextInfo
                     ------------------ ---------  ----------------------------
                     201205134619838024     1      CREATE TABLE table1A,
                                                     FALLBACK, NO BEFORE JOURNAL, 
                                                     NO AFTER JOURNAL (i INTEGER, 
                                                     i2 INTEGER)  
                                                     PRIMARY INDEX( i );

    Note: The SQL text is not edited to remove any blanks; it is stored the same way you entered the text.