Monday, April 12, 2010

Content DB grows but site collections size are not, how come ? EventCache table !

Ok - Imagine this scenario. Your content DB is growing, but no new data is getting into your sites. How come ? a Bug.

If you still haven't installed your SP2 to your Moss farm , you are might meeting this deal. Each operation is written to that table, and need to be deleted after a certain amount of time by the timer job. But the bug is that it doesnt delete those old records in the table, and it just getting bigger and bigger...

So what you can do now is install SP2 or if it's not feasible now, you can do this method :

Use the SQL management studio. Go to your content DB and run the Store procedure named - "proc_DeleteChanges".

It gets two parameters ( both are integer ). One is for how many days to keep the changes and the second for how many days to keep events. So just put in the last month ( the number 30 as 30 days ) and execute it.

Things to notice before - while this operation run, your log might grow very much ( make sure you have enough disk space and might take a few hours depends on your DB size ).

Afterwards just make a re-organize pages before releasing unused space, and you got yourself the normal size of the content DB as it should be.

Of course do it before on a non-production environment.

Good Luck.