How to Truncate your DNN Logs in your MS SQL Database
If you need to clear your DotNetNuke logs directly through the database please follow the steps below. To perform these steps you will need Microsoft SQL Server Management Studio installed on your computer. If you do not have Microsoft SQL Server Management Studio installed follow the instructions in the following article: How To Connect To Your MSSQL 2012 Database
- Open Microsoft SQL Server Management Studio
- Click New Query button
- Paste the following Script into the New Query page replacing [database name] with the name of your database
use [database_name]
truncate
table
sitelog
truncate
table
eventlog
truncate
table
schedulehistory
- Click Execute
DNN 7.4.2+
You will need to run the following query in place of 'truncate
table
eventlog'.
As truncate will not work on the Event Log because of Foreign Key Constraints added in 7.4.2.
delete from eventlog
This will clear your DNN site log, event log, and schedule history.
Article ID: 627, Created: April 12, 2012 at 11:06 AM, Modified: October 2, 2019 at 9:45 AM