Logging Scenarios | Database Administration | VantageCloud Lake - Logging Scenarios - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The following tables have examples of the type of data that is logged according to the rules you defined and the behavior of the query.

Action Result
Try to drop a user or database with DBQL enabled Error 5780 occurs. You cannot drop a user or database that has DBQL logging enabled. First disable logging for that user or database.
Log on as the authorized user DBC (or your DBA user) and attempt to DROP, UPDATE, or ALTER any DBQL object Statement fails with an access error:

Failure 3523 (<username> does not have <drop | update | alter> access to <DBQL table name>)

Log on as an unauthorized user (not DBC or an administrative user) and submit a BEGIN QUERY LOGGING or REPLACE QUERY LOGGING statement BEGIN QUERY LOGGING or REPLACE QUERY LOGGING statement fails with an access error:

Failure 3523 (username does not have statement permission)

Disable query logging for a user running a session that is being logged No more rows are cached for that session or that user after the running query completes.
End a session that is being logged AbortFlag value is set to T in the DBQLogTbl row for the query.
Begin query logging for a user and that user runs the same query multiple times during one session Multiple rows are logged in DBQLogTbl.

If the query is in the steps cache when run after its first run, the CacheFlag is set to T. The second time a query is run, the query goes into the steps cache. The third and subsequent times, the CacheFlag is set to T.

View all logged rows for a query Use the QueryID field to join DBQLogTbl rows with (depending on the rules for the user) other DBQL table rows.
Forbid logging for any MULTILOAD job Submit the following statement:
BEGIN QUERY LOGGING WITH NONE ON APPLNAME= 'MULTILOAD';
Valid application names are drawn from the pool of names returned in the LogonSource string, and for MultiLoad, LogonSource returns MULTILOAD (no I). See General Usage Guidelines for BEGIN QUERY LOGGING .
Start logging queries for a user who already has a WITH NONE rule in place Submit REPLACE QUERY LOGGING.
REPLACE QUERY LOGGING WITH STEPINFO ON user5 ACCOUNT = ‘abc’;
Find out if statement errors occurred in the successful multiple-statement or iterated request Check the ErrorCode column of the DBQL log table. If the ErrorCode column is populated with error 9259, the query succeeded but contains statement errors.