Today I was doing a database backup for a DotNetNuke website. When I did the backup, I was amazed at how big the database was.
I tried to shrink it, and it didn’t work.
The next thing I did was Googled it, and found a little help in pointing me to what the issue was. A couple posts in the DotNetNuke forums had commented on big events logs, so I checked mine out.
581MB!!!
Okay now how to clear this? I couldn’t even view them via the website when logged in as “host”.
I cleared them by doing the following steps.
- Log into your website as a "host user"
- Go to Host > SQL
- Run the script below
Truncate table eventlog
- Logged into my SQL server and Shrunk the database
- All my issues were solved!!
This seems like an easy no brainer, but I hope it helps people out there with there DNN databases.
Oh and one other helpful hint: Set your db’s “Recovery Model” to be simple in the options, if you backup your database on a regular basis. This will keep your db from getting too big also.