Wednesday, March 28, 2012

how to shrink a file fast

I had a 100GB database and i truncated some few tables and now the database
used is around 20GB.I ran the dbcc shrinkfile to shrink the file to around
40GB and its over 1 hr now and its still running . It is running and not
being blocked. Is there any way to make this run faster ?
Using SQL 2KHassan,
If you use TRUNCATEONLY clause with the DBCC command, it will free up
the space but won't move any data around. The drawback is that you might
not meet your shrink target. Worth a try anyway.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Hassan wrote:
> I had a 100GB database and i truncated some few tables and now the database
> used is around 20GB.I ran the dbcc shrinkfile to shrink the file to around
> 40GB and its over 1 hr now and its still running . It is running and not
> being blocked. Is there any way to make this run faster ?
> Using SQL 2K
>

No comments:

Post a Comment