Question

I was just curious to know about the meaning of dbcc shrinkfile(m,n) connamd. say if I run the command

dbcc shrinkfile(1,2000)

what does that 1,2000 indicates?

How does dbcc is different from normal sql shrink (when you rightclick on DB and task>shrink>files)?

Was it helpful?

Solution

Yes link as above, but just say no to Shrinkfile, Its the equivalent of taking a library of correctly indexed and arranged books where half are out on loan and moving them all on to the minimum number of shelves in the quickest way possible. Yes it takes up less space, but now try and find a specific book, you just dont know where its been moved to. If you are clearing out a database completely, then maybe. Yes I also know that defrag helps file systems, but they are different beasts -- defrag => reindex, Shinkfile => fragment

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top