question

Mohan avatar image
Mohan asked

list of last modified date tables

Need a list of all tables with last transaction date (few tables does't have indexes) in a specific database.
t-sqltable
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenJ avatar image KenJ commented ·
retagged t-sql and table
0 Likes 0 ·

1 Answer

·
Grant Fritchey avatar image
Grant Fritchey answered
Assuming we're talking SQL Server 2005 or better you can query sys.dm_db_index_usage_stats to see last_user_seek, last_user_scan, last_user_update, and last_user_lookup. That will give you an indication of when transactions occurred. Other than that, if you haven't set up transaction monitoring using something like extended events or queries against other dynamic management objects, there's no way to know what transactions occurred within a database.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.