views:

32

answers:

3

Does SQL Server 2005 maintain built-in, queryable, row-level last-modified timestamp metadata?

I'm doing some analysis on a database that did not include any sort of column to track a revision date/time stamp. I usually create columns for this purpose, but the designer of this database didn't, so I'm stuck with reconstructing history on his data.

+4  A: 

No, You have to build it into your table yourself.

many people add some sort of LastChangeDate and LastChangeUserID column on each table to track these on.

If it isn't there, you're at the mercy of whatever data you can pull from related tables, if at all.

KM
The other alternative is audit tables. But they need to be planned for and built from the start to be useful.
HLGEM
+1  A: 

Without the presence of explicit change tracking, your only real option will be to review database backups and the transaction log. You can get some information with the DBCC log command.

Adam Robinson
+1  A: 

Nothing automatic.

I like to use AutoAudit - it's pretty painless to apply it to tables and works well. It will even create views for deleted rows and a DDL trigger to automatically update the triggers if a table schema changes.

Cade Roux