Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: DBCC shrinkdatabase (mydb, 25)
10-16-2002, 10:55 PM #1
- Join Date
- Jul 2002
- Thanked 0 Times in 0 Posts
DBCC shrinkdatabase (mydb, 25)
I can't understand how the percent works exactly! Let's bring the books online's example, we have a database called mydb with 2 data files and 2 log files, that each of them are 10MB. The first data file is 6MB now, it means that it's 4MB free space ( the original size is 10MB), so, if we excecute:
dbcc shrinkdatabase (mydb)
It'll shrink the file to 6MB, right? Now if I write :
dbcc shrinkdatabase (mydb, 25)
The new size should be = The current size (6) + 25% of free space b4 shrink
In other words:
File size after shrink = 6 + 25% * (10 -6 = 4) = 6 + 1
So, the new file size should be 7 MB, but the example says that it is 8MB! Help please, I'm getting more confused!