Check progress of DBCC ShrinkFile

You needed to know where the DBCC Shrink operation is currently at or if it’s even doing anything so that you can cancel if it doesn’t look like it will finish in time. This also applies to DBCC CHECKDB on a big database. It will take a long time to complete, but management sudio does not give any hint about how long it will take or a percentage progress.

Luckily sql has a DMV that can solve your problem.

SELECT 
       percent_complete, 
       start_time, 
       status, 
       command, 
       estimated_completion_time, 
       cpu_time, 
       total_elapsed_time
FROM sys.dm_exec_requests
where command like '%DBCC%'

2 thoughts on “Check progress of DBCC ShrinkFile

Leave a comment