Monday, 21 November 2016

How to Find when the Table got refreshed last in SQL Server

How to Find when the Table last updated by user in SQL Server
SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, last_user_update,*
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID( 'TAMATAM')     --Database name need to pass here

AND OBJECT_ID=OBJECT_ID('TBL_Weekly_Data') –Table name need to pass here

Thanks,
TAMATAM

No comments:

Post a Comment

Follow Me by Email

ExcelKingdom-Popular Posts

ExcelKingdom-Random Posts