Sql-server – Ways of estimating the time to perform a database shrink on SQL Server

shrinksql serversql-server-2005

Is there a way to approximate how long a shrink will take on a SQL Server database? Are there tools available that could provide some guesstimate?

We have very large databases, so it would be good to know how long the database would be unavailable for (even if only an approximate estimate in hours).

Thanks in advance!

Best Answer

Shrinking a database is rarely recommended as it causes index and disk fragmentation. If you do need to shrink a file the operation is an online operation and won't take the database offline at all.