Close

MS SQL Server – Find Last Date Time Updated for Any Table

If a user wants to finds out when was the last table updated
user can query dynamic management view (dmv) – sys.dm_db_index_usage_stats
and easily figure out when was the table updated last.
Run the following query to find out when it was last updated.

USE [DB_Name]
GO
SELECT OBJECT_NAME(OBJECT_ID) AS ObjectName, last_user_update,*
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID( ‘[DB_Name]‘)

Running query provides accurate details of when was  the table last updated.
If WHERE condition is entirely removed it will provide details of the entire database.

scroll to top