Skrinking the primary data file below initial size

  • This question is also on Ask SSC, I thought it might be better as a discussion.

    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?

  • Ask SSC works!! DBCC SHRINKFILE ('LogicalFileName',40000), set the specific size and it goes below the initial size.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply