Delete all Entries in the Event Log

Without regular reviews the DotNetNuke admin event log can grow too large.

An excessively large table will slow a DotNetNuke website.

DNN delete all entries in the event log

The image above shows the admin event log from a DNN 7 website. Below the log list are the buttons to manage the log entries.

To empty the log table click on the button marked Clear log.

This is somewhat a brute force clearing of the table.

If you find that deleting the entries in the event log isn’t completing with the action timing out, then maybe a different approach is required.

Usually it’s possible to delete the log entries. But I have found problems in deleting entries in DNN tables which have become overly large. The action to delete the table entries via the DNN based website timing out and failing to complete.

You may want to take the approach covered in the post regards clearing the site log table. But the event log is more complex storing its data across two linked tables.

The tables of interest are:

  • EventLog
  • EventQueue
  • Exceptions

The task is to purge the table. I have found that doing this via the DNN SQL control console can lead to time outs and failure to action. It’s suffering from the same slowness as the running DNN site after all.

Better to perform the action via the SQL Server Management Studio if possible.

I navigate to the required database table view and click on the New Query button.

Enter the following

TRUNCATE TABLE EventLog

Refresh your table view to see the change in the number of records.

And similarly for the other two tables.

You may need to restart the application.

To limit the size of the event log enable the scheduled event/task PurgeEventLog. note it may not be within the schedule list.