Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 27 Jan 2003 @ 08:32:10 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: DBQL.
 
From:   Deepa Nagaraj

Following is the syntax to enable DBQL :

BEGIN QUERY LOGGING

    [ WITH logging-option [ ... ,logging-option ] ]

    [ LIMIT limit-option [AND limit-option ] ]

      { ALL [ ACCOUNT = ('account id' [ ... ,'account id' ] ) ] }
   ON { user-name [ ACCOUNT = ('account id' [ ... ,'account id' ] ) ] }
      { user-name [ ... ,user-name ] } ;

where:

logging-option is
    OBJECTS    database, table, column and index information in DBQLObjTbl.
    SQL        log the full text of all SQL statements in DBQLSqlTbl.
    STEPINFO   log AMP step-level information in DBQLStepTbl.
    ALL        log object, step information and SQL.

limit-option is

    SQLTEXT[=n]       maximum number of SQL text characters in DBQLogTbl.
                      Without n: 10,000 characters, n=0 no SQL.
    SUMMARY=n1,n2,n3  count the number of queries for a session that fall
                      into each of four intervals for the DBQLSummaryTbl.
    THRESHOLD[=n]     queries that run in n seconds or less are counted in
                      DBQLSummaryTbl; longer ones are logged in DBQLogTbl.
                      Without n: 5 seconds.

LIMIT - SUMMARY cannot be specified with THRESHOLD.

ON - Account string information can be entered for ALL or for a single
     user name.  With a list of users, no account string can be
specified.

Following syntax is used to disable DBQL :

END QUERY LOGGING

     { ALL [ ACCOUNT = ('account id' [ ... ,'account id' ] ) ] }
  ON { user-name [ ACCOUNT = ('account id' [ ... ,'account id' ] ) ] }
     { user-name [ ... ,user-name] } ;

where a BEGIN QUERY LOGGING command was previously issued for ALL, the user-name and/or account id.

More details can be found in the teradata V2R5 manual - SQL reference volume4 : Data Definition Statements.



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023