Example: Report a DBQL Rule That Logs All Users for a Specific Account - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
wgr1555383704548.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

Search for a DBQL rule that logs all users for the finance account.

     SHOW QUERY LOGGING ON ALL ACCOUNT = 'finance';

The system finds possible matches at levels 2, 3, 4 and 5 of the rules hierarchy and determines that the best fit match is at level 4 (because there is no rule for user3 , but level 4 has a rule for ALL users and the finance account, so Vantage defaults to the that rule), and returns the DBC.DBQRules row for Rule 2 as follows.

    Rule UserName   "ALL" (From an ALL rule)
      Rule UserId   00000000
          Account   FINANCE

       DBQL RULE:
          Explain   F
           Object   F
              SQL   F
             Step   F
          XMLPlan   F
       StatsUsage   F
         UseCount   F
            Param   F
          Verbose   F
     StatsDetails   F
      UtilityInfo   F
          Summary   F
        Threshold   F
  Text Size Limit   200