DotNetNuke Scheduler task to Clean DB log

Tested only with Dotnetnuke version 05.02.03+
This project is a small utility I created as a DNN Scheduler task in order to automate the task of cleaning the DNN log files.
All it does is to run the sql commands as follows:
(-- is for comments here)
ALTER DATABASE thisDBname SET RECOVERY simple; --To change the recovery model
dbcc shrinkdatabase (thisDBname, TRUNCATEONLY); -- shrink database
TRUNCATE TABLE eventlog; -- clean eventlog table
TRUNCATE TABLE sitelog; -- clean sitelog

When the task is finished it gives a report of the DB size before and after.
You can set the task intervals in the Scheduler page (under Host menu)
Please see the documentation for details.

You may use the command sp_spaceused to see the DB size
(via host menu - SQL)

Yehuda Tiram
AtarimTR ltd
Dotnetnuke CMS experts

Last edited Dec 6, 2012 at 6:59 PM by tiram, version 4