0

I am trying to get the list of databases modified between 2 dates in SQL Server 2008.

I tried this query,

select * 
from sys.objects            
where modify_date between '2015-12-01' and GETDATE()

but the modify_date column in said query changes only when design of table is changed. If data is inserted to the table it will not be covered.

I have checked the Default trace option in SQL Server, it is ON (set to 1) for the databases.

Is there any method to list the databases which are modified between 2 specified dates?

Thank you in advance.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
IT researcher
  • 3,274
  • 17
  • 79
  • 143

1 Answers1

0

To monitor data you should look into CDC ( change data capture)

Change Data Capture records INSERTs, UPDATEs, and DELETEs applied to SQL Server tables, and makes a record available of what changed, where, and when, in simple relational 'change tables' rather than in an esoteric chopped salad of XML. These change tables contain columns that reflect the column structure of the source table you have chosen to track, along with the metadata needed to understand the changes that have been made. Pinal Dave explains all, with plenty of examples in a simple introduction.

Jayanti Lal
  • 1,175
  • 6
  • 18