Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 30 Jul 2009 @ 17:31:17 GMT


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


Subj:   Re: Get History of blocking.
 
From:   Wale Akala

And then run this query against the locking logger report to show more information to pass to dbql tables.

Just change the from statement to reflect the location of your logged table.

     select begdate (format 'mm/dd')(title 'Date')
          , begtime (format '99:99:99')(title 'Time')
          , delay (format '99:99:99.9') (char(20)) (title 'Delay')
          , a.username(format 'x(12)')(title 'Blocker')
          , blkingloghost
          , blkingsessno
          , blkinglevel (format 'x(8)')(title 'Bk-Lev')
          , blkingmode (format 'x(4)')(title 'Bk-M')
          , b.username(format 'x(12)')(title 'Blocked')
          , blkdloghost
          , blkdsessno
          , blkdlevel (format 'x(8)')(title 'Bkd-Lev')
          , blkdmode (format 'x(4)')(title 'Bd-M')
          , dbase.databasename (format 'x(30)')(title 'Target-DB')
          , tvm.tvmname (format 'x(30)')(title 'Table')
          , STMTTYPE (format 'x(30)')(title 'Statement_Type')
     from dba_maintenance.locklog_20060721
     left outer join dbc.tvm
          on tid = tvm.tvmid
     left outer join dbc.dbase
          on dbid = dbase.databaseid
     left outer join dbc.eventlog a
          on (blkingsessno = a.sessionno
                  and blkingloghost = a.logicalhostid
                  and begdate <= a.datefld
                  and begdate >= a.logondate
                  and a.event = 'logoff')
     left outer join dbc.eventlog b
          on (blkdsessno = b.sessionno
                  and blkdloghost = b.logicalhostid
                  and begdate <= b.datefld
                  and begdate >= b.logondate
                  and b.event = 'logoff')
     order by 1,2,3;

Best regards,

Wale



     
  <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