MSSQL Find Last Date & Time Database Table Accessed

This is a T-SQL that will show all the last access date and time for Select, tables in a database.

select
t.name
,user_seeks
,user_scans
,user_lookups
,user_updates
,last_user_seek
,last_user_scan
,last_user_lookup
,last_user_update
from
sys.dm_db_index_usage_stats i JOIN
sys.tables t ON (t.object_id = i.object_id)
where
database_id = db_id()

Source: SQL Authority
Additional Information/Links:  SQL Blog
 

Published by

Rich

Just another IT guy.

2 thoughts on “MSSQL Find Last Date & Time Database Table Accessed”

Leave a Reply

Your email address will not be published. Required fields are marked *