T-SQL: Check progress of DBCC checkdb

Doing a dbcc checkdb can take a lot of time, and in case of corruption you really want to see the progress.

You can use the t-sql statement below to find the progress. Keep in mind to replace the YOUR_DB_ID to the id of your database. (find out in sys.databases)

 SELECT  session_id ,
         request_id ,
         percent_complete ,
         estimated_completion_time ,
        DATEADD(ms,estimated_completion_time,GETDATE()) AS EstimatedEndTime, 
         start_time ,
         status ,
         command 
 FROM sys.dm_exec_requests
 WHERE database_id = YOUR_DB_ID
 and command like 'DBCC%'
Share your love