Tuesday 21 October 2008

Percent Complete - sys.sm_exec_requests

You can use this to monitor

* backup / restore
* dbcc checkdb / checktable / etc.
* dbcc shrinkdatabase / shrinkfile
* dbcc indexdefrag
* alter index reorganize
* rollback operations

SELECT percent_complete, (estimated_completion_time/60000) 'Estimated Completion Time in Minutes') FROM SYS.DM_EXEC_REQUESTS
WHERE percent_complete <> 0

No comments: