Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 31st, 2006, 06:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
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
  #2 (permalink)  
Old October 17th, 2006, 06:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
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

  #3 (permalink)  
Old October 17th, 2006, 07:35 PM
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks.

  #4 (permalink)  
Old October 20th, 2006, 12:25 PM
Friend of Wrox
 
Join Date: Aug 2006
Location: , , .
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

  #5 (permalink)  
Old November 14th, 2006, 04:12 PM
Friend of Wrox
 
Join Date: Aug 2006
Location: , , .
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?

  #6 (permalink)  
Old November 15th, 2006, 10:21 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
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.

  #7 (permalink)  
Old December 7th, 2006, 01:21 PM
Registered User
 
Join Date: Dec 2006
Location: , , .
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

  #8 (permalink)  
Old December 11th, 2006, 03:17 PM
Friend of Wrox
 
Join Date: Aug 2006
Location: , , .
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

  #9 (permalink)  
Old December 12th, 2006, 11:37 AM
Friend of Wrox
 
Join Date: Aug 2006
Location: , , .
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

  #10 (permalink)  
Old May 2nd, 2009, 04:07 AM
Authorized User
 
Join Date: Jul 2006
Location: , , .
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")>
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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 marco.vanSchaijk@eds.com Classic ASP Professional 0 January 29th, 2004 10:48 AM



All times are GMT -4. The time now is 09:15 PM.


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