17.05 - Example: Report a DBQL Rule That Logs a Specific User for Any Account - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Content Type
Programming Reference
Publication ID
B035-1144-175K
Language
English (United States)
Last Update
2021-01-22

Search for a DBQL rule that logs user1 for any account.

     SHOW QUERY LOGGING ON user1;

The system finds possible matches at levels 3 and 5 of the rules hierarchy and determines that the best fit match is at level 3, which logs the SQL text for user1, and returns the DBC.DBQRules row for Rule 5, as follows.

    Rule UserName   user1
      Rule UserId   00001244
          Account   (Rule for any Account)

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