0

I have a question for you concerning the PRIMARY filegroup.

Out goal is to have a small PRIMARY, so that we can do partial restores to other systems (test, dev)

So, we moved all tables and indexed from the PRIMARY to other filegroups.

However, the PRIMARY filegroup is still large. I have been trying to see what system object actually is in an "empty" PRIMARY, but can't seem to find anything that takes up that much space!

So, the question is, is the size of an "empty" PRIMARY dependent on the over-all size of the database? And if so, which kind of system objects lurks with in the PRIMARY, and is there anything one can do the decrease the size of these?

The total size of the database is 5300 GB. The total space used of the "empty" PRIMARY is now 444 GB (and 134 GB free space.)

1 Answer 1

1

you can use shrinkdatabase command to reclaim the freespace, But be aware ! shrinking in many cases causes fragmentation , you can rebuild or reogranize all indexes depend on fragmentation percentage.

DBCC SHRINKDATABASE(N'YourDatabaseName' ) or 
DBCC SHRINKFILE(N'YourDatabaseName', Size )

After that, you should change your default filegroup from primary filegroup to another one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.