How to check the progress of DBCC CHECKDB in SQL Server

SQL-Server

Running 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. Remember to replace YOUR_DB_ID with the ID of your database. (Find it 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%'