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

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Advanced SQL Engine
Teradata Database
Release Number
Release Date
September 2020
Content Type
Programming Reference
Publication ID
English (United States)

Search for a rule that logs user1 , but only when logged on under account ‘hr’.

     SHOW QUERY LOGGING ON user1 ACCOUNT = 'hr';  

The system searches level 3 of the rules hierarchy, finds an exact match, and returns Rule 4, as follows.

    Rule UserName   user1
      Rule UserId   00001244
          Account   HR

       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