17.00 - Example: Report a DBQL Rule That Logs a Specific User for All Accounts - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Release Date
September 2020
Content Type
Programming Reference
Publication ID
B035-1144-170K
Language
English (United States)

Search for a DBQL rule that logs user2 for all accounts.

     SHOW QUERY LOGGING ON user2;

The system finds possible matches at levels 3 and 5 of the rules hierarchy and determines that the best fit match is at level 5 (because there is no rule for user2 with any account, so Vantage defaults to the ALL user rule, Rule 1), and returns the DBC.DBQRules row for Rule 1, as follows.

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

       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