17.00 - Example: Using QryLogObjectsV - Teradata Database

Teradata Vantageā„¢ - Data Dictionary

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
created_date
June 2020
category
Administration
Programming Reference
featnum
B035-1092-170K

The following SELECT statement retrieves the object information of a query:

SELECT QueryID, ObjectDatabaseName (Named ObjDBName), ObjectTableName (Named ObjTblName), ObjectColumnName (Named ObjColName), ObjectID (Named ObjId), ObjectNum (Named ObjNum), ObjectType (Named ObjType), FreqofUse
FROM DBC.QryLogObjectsV where queryid = 201205134619838031;

Result:

QueryID            ObjDBName    ObjTblName  ObjColName ObjID    ObjNum   ObjType  FreqofUse
------------------ -----------  ----------  ---------- -------- -------  -------- ------
201205134619838031 D_PERSONNEL  ?            ?         00001604   0        DB      1
201205134619838031 D_PERSONNEL  DEPARTMENT   ?         00009005   0        Tab     1
201205134619838031 D_PERSONNEL  DEPARTMENT   DeptNo    00009005   1,025    Col     2
201205134619838031 D_PERSONNEL  DEPARTMENT   DeptName  00009005   1,026    Col     1
201205134619838031 D_PERSONNEL  DEPARTMENT   EmpCount  00009005   1,027    Col     1
201205134619838031 D_PERSONNEL  DEPARTMENT   Loc       00009005   1,028    Col     1