Find out any DELETE happened on a table or not

Database
Enthusiast

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.

Tags (3)
1 REPLY
Enthusiast

Re: Find out any DELETE happened on a table or not

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.