How to check status on Database Shrink Task in SQL Server?

Through Below Query we can check the status of  database Shrink Operation :-


SELECT
       percent_complete,
       start_time,
       status,
       command,
       estimated_completion_time,
       cpu_time,
       total_elapsed_time
FROM
       sys.dm_exec_requests
WHERE
       command = ‘DbccFilesCompact’

Leave a Reply

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