Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
My co DBA has done Index Rebuild Yesterday on a Datbase.He is out todayIs there any way I can find which tables or indexes got rebuild yesterdayThanking You
robvolk
Most Valuable Yak
15732 Posts
Posted - 2012-05-04 : 14:52:05
Try this:
select * from sys.dm_db_index_usage_stats where last_system_update>=DATEADD(day,DATEDIFF(day,0,GETDATE())-1,0)
You can add additional WHERE conditions for database_id, etc.
rohaandba
Starting Member
33 Posts
Posted - 2012-05-04 : 15:08:29
Thnank You.
quote:Originally posted by robvolk Try this:
select * from sys.dm_db_index_usage_stats where last_system_update>=DATEADD(day,DATEDIFF(day,0,GETDATE())-1,0)
You can add additional WHERE conditions for database_id, etc.