Friday, February 20, 2015

SQL snippet which shows the progression of a database shrinkage operation



SELECT
    Percent_Complete [Completed],
    Start_time [Start Time],
    Status,
    Command,
    ((estimated_completion_time/60000)) [ETA (Min)],
    ((cpu_time/60000)) [CPU Time (MIN)],
    ((total_elapsed_time/60000)) [Total Elapsed Time (MIN)]
 FROM
    sys.dm_exec_requests 
WHERE
    command = 'DbccFilesCompact'

No comments:

Post a Comment