Skip navigation

Checking for operation completion

Here's a tip that comes by way of MVPs Dr. Tom Moreau (no, not that Dr. Moreau) and Tibor Karaszi (http://www.karaszi.com/sqlserver/default.asp).

You probably know that you can backup a database and add WITH STATS = ... to get the running percentage progress of the backup. Have you ever wondered if there's a DMV that captures this information?

You might try checking out sys.dm_exec_requests and it's columns, percent_complete and estimated_completion_time columns. Tibor mentions that according to his notes, those columns should be populated for operations including:

DBCC CHECKDB
DBCC SHRINKDATABASE
DBCC SHRINKFILE
BACKUP DATABASE
ROLLBACK

Of course, it would be really interesting to see a full list of the commands that populates the DMV with this information.  Let me and other readers know by posting a note here if you try another command and find that it's also tracked by sys.dm_exec_requests.

Best regards,

-Kevin

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish