bschelst/ May 10, 2019/ SQL-Server/ 0 comments

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 this Post

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
*
*

15 + 17 =