|
I have recently migrated tables to their own filegroups and now the primary file group is too large. The initial size of the primary data file (.mdf) is 150GB. I want to reduce this to say 40GB. DBCC SHRINKFILE doesn't work because it can't go below 150GB. I've done it with an emptyfile and it won't empty it because its the primary file. ALTER DATABASE doesn't work because the file isn't empty. It looks like I need to create a new database and transfer the data?? There must be another way, any suggestions SSC?
(comments are locked)
|
|
If you try to shrink it with the size specified as 0 or without a specifified size, then it will target that databases default which is what it was created at. However, if you specify your target size, like:
Then it will come as close to your specified target as it can and should happily go below the size it was created with, and that will reset that databases default size. Of course, it will not go below what is actually needed to store the current data. If this is not working for you, can you please provide the exact commands you are using and any messages? That worked. Thank you.
Nov 19 '09 at 04:26 AM
Vic G
Vic, make sure you mark it by clicking on the tick!
Nov 19 '09 at 07:10 AM
Melvyn Harbour 1 ♦♦
(comments are locked)
|


Could you post the command you used with SHRINKFILE and the results you got? Thanks...