Reputation: 61
I have a database of 3TB. I need to perform shrinking in the test environment before doing on production database. I read some blogs they say to do in small chunks.
How to do in small chunks?
Upvotes: 1
Views: 2377
Reputation: 1633
In management studio you can tell shrink command new size. So basically you set smaller size every time you run shrink.
I don't know SQL command for doing it. But as usual in SQL-Server you can generate one for yourself.
OK just googled it. Following shrinks DB UserDB and leaves it with 10% of free space.
DBCC SHRINKDATABASE (UserDB, 10);
GO
MS reference to SHRINKDATABASE
Upvotes: 1