Grant DBQL Administrative Privileges | Teradata Vantage - Granting DBQL Administrative Privileges to Other Users - Analytics Database - Teradata Vantage

Database Administration

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
pgf1628096104492.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
ujp1472240543947
lifecycle
latest
Product Category
Teradata Vantageā„¢

You need the EXECUTE privilege on the special macro DBQLAccessMacro to enable and disable query logging. DBQLAccessMacro is created by DIPVIEWSV of the DIP utility.

The system users DBC and SystemFE have the EXECUTE privilege on DBQLAccessMacro and can grant it to others when needed. If you want other users, such as your administrative user, to be able to execute DBQLAccessMacro, follow this procedure:

  1. Log on as user DBC (or SystemFE).
  2. List the contents of database DBC to see if the DBQLAccessMacro, DBQLRuleTbl, and DBQLRuleCountTbl have been created:
    HELP DATABASE DBC ;

    The DBQL tables, views, and macros should be reported.

  3. Grant the following privileges to your database administrator user:
    GRANT EXECUTE ON DBC.DBQLAccessMacro TO DBADMIN ;
    GRANT SELECT ON DBC.DBQLRULESV TO DBADMIN ;
  4. Log off the DBC or SystemFE session.
  5. Log on again as user DBADMIN.
  6. Define query logging rules for one or more users, one or more accounts, or applications using BEGIN QUERY LOGGING or REPLACE QUERY LOGGING statements. (For full syntax, see Teradata Vantageā„¢ - SQL Data Definition Language Syntax and Examples, B035-1144.)
  7. Check the DBQLRules[V] view to see if the rules are correct:
    SELECT * FROM DBC.DBQLRulesV ;

    If you find an error, submit an REPLACE QUERY LOGGING statement for that user.