Get progress of ‘Shrink Database’ task on a Microsoft SQL Server

This posting is ~3 years years old. You should keep this in mind. IT is a short living business. This information might be outdated.

Shrinking a big database on a Microsoft SQL Server can take some time. And it’s one of those tasks, where you wont get a status until it’s finished. I really hate this… But this small T-SQL query can help:

Simply open a new query windows, paste the query into the query windows and execute the query. The query outputs the progress in percent and the estimated completion time.

Get progress of ‘Shrink Database’ task on a Microsoft SQL Server
4.9 (97.14%) 7 votes
Patrick Terlisten
Follow me

Patrick Terlisten

vcloudnine.de is the personal blog of Patrick Terlisten. Patrick has a strong focus on virtualization & cloud solutions, but also storage, networking, and IT infrastructure in general. He is a fan of Lean Management and agile methods, and practices continuous improvement whereever it is possible.

Feel free to follow him on Twitter and/ or leave a comment.
Patrick Terlisten
Follow me

Leave a Reply

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

I accept!