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 May 2nd, 2009, 04:25 AM
Authorized User
 
Join Date: Jul 2006
Posts: 13
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by englere View Post
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

Eric
See the stored procedure dbo.aspnet_Profile_DeleteProfiles
and Class ProfileManager e.g. ProfileManager.DeleteInactiveProfiles





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.