A friend has a rebuild index job execution generally stops and asks me if I can see which index has been rebuild. It was thought that Sys.index or sys.objects would store similar information and the results were not found.
On the Internet, SQL Server does not store similar information. However, because rebuild index automatically updates the statistics, the update time of the statistics is available. So we can estimate it roughly according to the time of statistical information.
Because the update of the statistic information is also likely to be done by updating the valve value, it is not very accurate.
The specific script is as follows:
SELECT object_name (OBJECT_ID) [TableName],
NAME [IndexName],
stats_date (object_id, stats_id) [ Laststatsupdate] from
sys.stats
WHERE name isn't like ' _wa% '--
and Stats_date (object_id, stats_id) are not NULL
and OBJECTPROPERTY (object_id, ' ismsshipped ') = 0--Query user-defined
ORDER BY TableName, IndexName
-----code from: http://stackoverflow.com/questions/2831293/ Tsql-know-when-index-rebuild-reorg-or-updatestatistics-was-last-run-on-sql-ser
You can filter according to your own added criteria.