jthalliens
jthalliens

Reputation: 544

Shrink Database progress status

is there any way to view using SQL Server what's the percentage of a shrink process not using

sys.dm_exec_requests r WHERE command IN ('DbccFilesCompact','DbccLOBCompact','DbccSpaceReclaim')

if the process is stopped for some particular reason, how we can determine what's the percentage left for completion?

Thanks

Upvotes: 0

Views: 653

Answers (1)

Jeff L
Jeff L

Reputation: 102

You can't, as that information isn't saved anywhere.

If you resume the shrink, it will, necessarily, start from the beginning. This is because you may have dumped a pile of data between the runs, may have done nothing or something inbetween. So saving that information is of little use.

Of course, if you haven't done anything and the data pages are still in marked as unused, it might get to the resume point faster. But it still has to get there by traversing from the top.

Upvotes: 1

Related Questions