Skip to content Skip to sidebar Skip to footer

Getting Last User Update Time For All Tables In A Database

In SQL SERVER 2008 R2 I have 7 databases, each one with around 1000 tables. I need to know wich tables were last updated by users. With some research I got to this code: SELECT OB

Solution 1:

Try this:

SELECT  OBJECT_NAME(OBJECT_ID) AS TableName,
                              last_user_update,
                              user_updates,
                              index_id
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID('SP3D_DB_RESEARCH_MDB')

Post a Comment for "Getting Last User Update Time For All Tables In A Database"