Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 31st, 2006, 06:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default Routine Maintenance

I haven't been watching my site closely because it's just a demo site for the book, but I noticed today that there's a big build-up of records in the aspnet_profile and aspnet_users tables. This is caused by the way we're tracking anonymous users - we never clear out those entries and the tables keep getting bigger.

So, as a part of the routine maintenace of the site, these anonymous records should be purged periodically (maybe once a month). This SQL will do that:

delete from aspnet_profile
where userid in
 (select userid from aspnet_users where isanonymous = 1)
go
delete from aspnet_users where isanonymous = 1
go

And, of course, if you have set up any Custom Web Events, you'll need to purge that table also.

Eric
 
Old October 17th, 2006, 06:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is an update to the above SQL. Instead of deleting ALL anonymous users, it might be better to delete only the ones who haven't returned to your site in the last 60 days (or 30, or whatever number you like):

delete from aspnet_profile
where userid in
 (select userid from aspnet_users
  where isanonymous = 1
    and datediff(dd, LastActivityDate, getdate()) > 60)
go
delete from aspnet_users
where isanonymous = 1
  and datediff(dd, LastActivityDate, getdate()) > 60
go

And don't forget about the aspnet_WebEvent_Events table! I removed the healthMonitoring section from my web.config because I wasn't actually looking at the events, anyway. But this kind of monitoring can be good if you intend to keep up with it, and purge that table occasionally.

Eric

 
Old October 17th, 2006, 07:35 PM
Authorized User
 
Join Date: Aug 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks.

 
Old October 20th, 2006, 12:25 PM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kherrerab Send a message via Yahoo to kherrerab
Default

great.. thanks man

www.clubvwnica.com

 
Old November 14th, 2006, 04:12 PM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kherrerab Send a message via Yahoo to kherrerab
Default

is it ok to delete all data from aspnet_WebEvent_Events?

 
Old November 15th, 2006, 10:21 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes, you can delete the events. They're only there to tell you what happened. Think of it as an audit trail that can also help you debug problems.

 
Old December 7th, 2006, 01:21 PM
Registered User
 
Join Date: Dec 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Isaak
Default

Quote:
quote:Originally posted by kherrerab
 great.. thanks man

www.clubvwnica.com

 
Old December 11th, 2006, 03:17 PM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kherrerab Send a message via Yahoo to kherrerab
Default

thanks

 
Old December 12th, 2006, 11:37 AM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to vantoko
Default

Hi,

isn't the anonymous tracking used to check if for instance an anonymous user already voted ?

is there any manual on doing maintenance on the site ?

koen

 
Old May 2nd, 2009, 04:07 AM
Authorized User
 
Join Date: Jul 2006
Posts: 13
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by vantoko View Post
Hi,

isn't the anonymous tracking used to check if for instance an anonymous user already voted ?
The votes are stored in cookies with expiration settings here:
<ConfigurationProperty("ratingLockInterval", DefaultValue:="15")>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Maintenance Job AristotleYu SQL Server 2005 1 November 23rd, 2006 11:06 AM
Help needed in designing maintenance form method Access 1 June 30th, 2005 02:35 PM
WebHosting Maintenance tools [email protected] Classic ASP Professional 0 January 29th, 2004 10:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.