Friday, June 15, 2012

Sharepoint EventCache and EventLog tables are too big

When the Sharepoint database is out of control !


A few days ago I noticed that the database for my WebApplication Sharepoint was overgrown. On opening the database I noticed that 90% of space was concentrated in just two tables: EventCache and EventLog.

To save space, at least for the EventCache table, I saw that you must set the throttling Changelog; to do this select from Central Admin WebApplication -> General Settings -> Resource Throttling, and set the Change Log to a low number (eg . 5 days).

Once this is done run the job called Change Log which is responsible for deleting records from the table EventCache (despite the name ...).

Once the job have finished, if you are not satisfied of the result or the disk space occupied is mainly assigned to the SQL log file (the file. Ldf), then you can do this:

1. Open the SQL managment console.
2. Select the database of the WebApplication.
2. Set the database recovery mode to Simple.
3. Run the Shrink Database.
4. Reset to Full recovery mode.

For the implications regarding the Recovery Mode SQL I recommend you read it here

Warning: Most of the time is often a program that update continuously items in the Sharepoint list, check if there are some custom Job Timer, Service or other programs.

1 comment: