从这个表sys.dm_db_index_usage_stats可以获取到所有表或某一张表的用户或系统异动时间:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
SELECT OBJECT_NAME(object_id) AS table_name, last_user_seek, last_user_scan, last_user_lookup, last_user_update, last_system_seek, last_system_scan, last_system_lookup, last_system_update FROM sys.dm_db_index_usage_stats WHERE database_id = DB_ID('dataname') GO