ConfigMgr 2007 - Policy and ci_sdmpackages table large and growing fast

How to eliminate slack space in the Microsoft ConfigMgr 2007 database?

I have a customer with a big Microsoft Configuration Manager 2007 database (more than 25 GB). The table Policy and the ci_sdmpackages table were unusually large. I found that the disk space consumption comes from a FEP 2010 bug...

I can fix this issue with the following SQL-Commands. Please make a backup of your database before you start with the execution of the commands and look for enough disk space (minimum double of database size)!
Good luck!

First SQL command:
DELETE FROM Policy WHERE PolicyID NOT IN (SELECT PolicyID FROM PolicyAssignment WHERE PADBID IN (SELECT PADBID FROM ResPolicyMap)) AND PolicyID NOT IN (SELECT ModelName FROM CI_ConfigurationItems) AND PolicyID LIKE '%SUM_%'

Second SQL command:
dbcc cleantable ('(Your DB Name)','ci_sdmpackages')
GO
alter index CI_SDMPackages_AK on ci_sdmpackages
reorganize with (lob_compaction=ON)
GO
alter index CI_SDMPackages_AK2 on ci_sdmpackages
reorganize with (lob_compaction=ON)
GO
alter index CI_SDMPackages_PK on ci_sdmpackages
reorganize with (lob_compaction=ON)
GO

You can find more information about the second SQL command under the following hyperlink -> http://blogs.technet.com/b/configurationmgr/archive/2011/08/30/eliminating-slack-space-in-the-configmgr-2007-database.aspx

Comments

Popular posts from this blog

SCCM 2012 Software Center returned error code 0x0041013 (-2147217389)

How to fix the check box on RDWeb 2012 for use private computer

Fix Error 30105 Citrix servers do not trust the server message in XenDesktop 5.5