DNN-Forum

You do not need to register to post your questions or comments so fire away !!
Topics related to Dnn only please.

Database size is growing SQL 2005
Last Post 29 Sep 2010 10:21 PM by . 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
Sort:
PrevPrev NextNext
Author Messages
jane
Basic Member
Basic Member
Posts:289

--
03 Jul 2009 12:51 PM QuoteQuote ReplyReply  

 

Just received an email from hosting company saying that my database is at 80 % allowed size. What do I need to make it smaller, the website is not that big and it does not have functionality that would require anything to be written to the database - I am not sure why this is happening, is this  abug or something in the application ?

 

DNN_Design
Veteran Member
Veteran Member
Posts:44
Avatar

--
03 Jul 2009 01:18 PM QuoteQuote ReplyReply  


Here are steps as suggested by Mark Doyle
this works for us

1. Purge the Database Tables

If your DNN installation has been running for any amount of time, you will have built up log data. You will want to either purge or delete some of the data in these log tables. Consider using one of the following SQL examples.

_Example 1.A
_truncate table EventLog
go
truncate table ScheduleHistory
go
truncate table SiteLog
 

_Example 1.B_
delete from EventLog where LogCreateDate < (getdate() - 7)
go
delete from ScheduleHistory where EndDate < (getdate() - 7)
go
delete from SiteLog where [DateTime] < (getdate() - 7)
go

In Example 1.A, the truncate step clears the tables, and, because it does not have to record the transaction in SQL Server, is instantaneous. However, db_owner privileges are required.

In Example 1.B, the delete statement is used to only delete data older than 7 days. Because this operation requires transaction logging by SQL Server, running this statement will take longer than a truncate, and may timeout in a web-based SQL utility.


 2. Limit the Event Log

Whether you use the Log Viewer or not, events will be captured unless you instruct your DNN installation not to. Again, this is incredibly useful when installing a new module, or verifying your install, but, as you'll see, it borders on overkill.

Log in as the administrator or host, and navigate to Admin -> Log Viewer. One of two things will happen - either you will see many colorful rows indicating the many events, or you will get a timeout exception. If you get an exception, you will need to purge the EventLog table in the DNN database.
You will also be able to clear the event log by clicking the Clear Log button, or select the events you wish to delete, and click Delete Selected Exceptions.

To configure the event log, and reduce the amount of logging, click Edit Log Configurations at the lower left-hand corner. Here, you can edit the various Log Types. First, you may wish to disable the APPLICATION_START and APPLICATION_END events, especially if you are on a shared web hosting server, where the application can start and stop frequently.  Also, the "*" Log Type captures many events, and is enabled by default. This should be disabled or restricted.

Click the Edit button beside each Log Type you wish to configure, and either enable or disable, or configure the history for each event. The DNN Scheduler will purge older data, which will be explained next.


 3. Schedule History

The DNN Scheduler controls numerous events, including the various purge jobs by default. To view the Scheduler information, navigate to Host -> Schedule.

If the Site Log is enabled at the Host and Admin levels, the Site Log purge job should be enabled. Click the Edit button next to the Scheduler Type "DotNetNuke.Services.Log.SiteLog.PurgeSiteLog, DOTNETNUKE", and check the Schedule Enabled checkbox. The default settings will purge site logs daily, for information older than that allowed by the Host.

You can also purge the Schedule History by enabling the Scheduler Type "DotNetNuke.Services.Scheduling.PurgeScheduleHistory", or restrict the data kept.

http://www.doyleits.com/Default.asp...;EntryID=3

DNN Designs | Web Design, Skin Development, E-commerce | www.dnn-design.com
jane
Basic Member
Basic Member
Posts:289

--
17 Jul 2009 02:12 AM QuoteQuote ReplyReply  

Here is one we are using - this was posted on dnn site

replace xxxx with your database name, this script works on SQL 2005 it will nort work on sql 2008

BACKUP LOG xxxx WITH TRUNCATE_ONLY
TRUNCATE TABLE {databaseOwner}{objectQualifier}EventLog
TRUNCATE TABLE {databaseOwner}{objectQualifier}SiteLog
TRUNCATE TABLE {databaseOwner}{objectQualifier}schedulehistory
DBCC SHRINKDATABASE (xxxx);

do not forget to back up your database first
barryz
Basic Member
Basic Member
Posts:289

--
29 Sep 2010 10:21 PM QuoteQuote ReplyReply  
On Host menu, was getting a timeout when clicking on the Schedule.
Error: Schedule is currently unavailable.
The fix was to goto the Host > SQL page and do the
truncate table {databaseOwner}{objectQualifier}ScheduleHistory ... and wait a few minutes until the page refreshes.
which then allowed me to go into the various Schedules and reduce the number of entries on each listing.
Thanks for this thread.


Quick Reply
toggle
  Username:
Subject:
Body:
Security Code:
CAPTCHA image
Enter the code shown above in the box below

Submit
Active Forums 4.1

DNN Forum New Posts

I have another application that I want to feed info to. From a DNN site.  The DNN site pag...
Number of replies: 1
I am working in DNN 5.6.2 for the first time. I want to be able to create pages which have no n...
Number of replies: 1
I am working on a site in DNN for the first time. I am running 5.6.2 on IIS7 Windows 2008. I wo...
Number of replies: 1
Hi, I am looking for a DNN module that allows me to have a photo book for each user that logs i...
Number of replies: 0
I am wondering if there is anyway to integrate Catalook with Amazon and other similar affiliate...
Number of replies: 2
Hello, I need to know how to embed a video on a DNN website so that the video player is a pa...
Number of replies: 2
  SCENARIO. OS Win 2008 R2 IIS 7.5   Database  MS SQL 2008 Framework 2.0 ...
Number of replies: 3
I edited text field and now all portals are down - how do I fix? After editing 'terms of servic...
Number of replies: 1
 This is reaaally driving me nuts. I thought it had something to do with me changing the p...
Number of replies: 1
Hi, I need to find solution to replace text/html across the portal. I used a module form Iowa C...
Number of replies: 2