cancel
Showing results for 
Search instead for 
Did you mean: 

More filegroups than retention configuration, need to remove filegroups

More filegroups than retention configuration, need to remove filegroups

The post shows you how to check your file retention setting and then how to remove filegroups if needed. 

 

View the retention settings. use the following query against BigDataInsightUC:

select * from settings

 

community post1.jpg

then you can compare to the filegroup in the database properties of BigDataInsightUC 

Community post2.jpg

Rule of thumb is you will have the Mneht to keep + 2 ( month before and month ahead)

If you need to remove a filegroup manually;

 

  1. Log into SSMS
  2. open a new query
  3. run the following commands for the file groups identified to be removed

    DBCC SHRINKFILE (BigDataInsightUC_201807,EmptyFile)
    ALTER DATABASE [BigDataInsightUC] REMOVE FILE BigDataInsightUC_201807

  4. repeat step 3 for each file group that needs to be removed

SQL references 
https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-shrinkfile-transact-sql?vi...

https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql?view=sql-server-ve...

If my answer helped you today, please give my post a like and be sure to mark the 'Accept Solution' button to help others find the answer!
Cheers
Levon Lyons
Webinar: Keep the modern workforce connected

Unified Communications has always been an important part of companies' digital transformation efforts due to its ability to enable rich virtual collaboration and communication. But with COVID-19, we've reached a break-through point.

Join Bill Haskins, Sr. Analyst & Partner, Unified Communications at Wainhouse Research, and John Ruthven, CEO at IR discuss UC challenges companies are experiencing due to the COVOID-19 crisis.

Join webinar