Here's some handy sql that we run when the DNN SQL database size has run amok.

Use DatabaseName

TRUNCATE TABLE EventLog
TRUNCATE TABLE SiteLogTRUNCATE TABLE ScheduleHistory
TRUNCATE TABLE SearchItemWordPosition
DELETE SearchItemWord
DELETE SearchWord
DELETE SearchItembackup

 

--Shrink the DB

dbcc shrinkfile(Database_Logname)

dbcc shrinkdatabase(DatabaseName)

--Update statistics

Use DatabaseName

exec sp_updatestats;