All Forums Database
muthu1802 20 posts Joined 01/12
10 Mar 2016
Find out any DELETE happened on a table or not

Is there any easy way to find out any DELETES happened on a table or not with out parsing the qrylog table.
Do we have any dbc tables that captures this information.
 
 
 

alikpr 5 posts Joined 02/14
11 Mar 2016

Hi,

 

There is a way to find it.

 

First control your dbs parameter. it should be set something below. It may require restart. 

You should first consult with the CS before changing any dbs parameter.

 

    30. ObjectUseCountCollectRate      = 10          (Minutes; Recommended)

 

Enable usecount on your_db that you want to trace it.

 

REPLACE QUERY LOGGING  WITH USECOUNT on your_db;  

 

Then  wait some minutes. and run below query when you want to trace.

 

  sel c.DatabaseNameI,b.fieldname ,a.* 

  from dbc.objectusage a

  join  DBC.tvfields b

  on a.objectid=b.tableid

  join  dbc.dbase c

  on a.DatabaseId=c.databaseid

  where c.DatabaseNameI='your_db'

  and b.fieldname='your_table'

  

 Thanks.

 Regards.

You must sign in to leave a comment.