Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 28 Jul 2006 @ 09:35:43 GMT


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


Subj:   DBQL and dropping a table
 
From:   Barrow, Martin

Whilst looking at the DBQL tables to find out who dropped a live table I noticed that whilst the details make it onto the query log table, no details are added to the query log objects table.

Example:

     Select *
     >From QryLog T1 INNER JOIN
              QryLogObjects t2
     On T1.ProcId = T2.Procid
     And T1.QueryId = T2.QueryId
     And T1.CollectTimeStamp Between (T2.CollectTimeStamp - Interval '4'
     Hour)
     and (T2.CollectTimeStamp + Interval '4' Hour)
     And T2.ObjectDatabasename = 'DB1'
     and t2.objecttablename = 'Table1'
     and t1.collecttimestamp > (current_timestamp - interval '8' day);
     Does not return a row for the drop table.
     Select * From Dqviewsp.QryLog_Hst
     where querytext like 'drop table table1%'           /* Parameter */
     and collecttimestamp > (current_timestamp - interval '8' day)

This does return the details of the drop table.

Does anyone have an explanation for this?

Is it due to the fact that the table is no longer around when the query completes and therefore just a 'feature' of DBQL?


Thanks,

Martin



     
  <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