November Happy Hour will be moved to Thursday December 5th.

Delete old versions

Vote:
 
Does anyone know if there's a way to delete old verions of all pages? Since the default value in EPiServer is "unlimited" some of our pages have over 450 verions. If i set the allowed verions to 100, which is the top limit, it's to much work and the databaseconnection timeout. There must be a stored procedure or SQL-script to fix this.
#12544
Mar 09, 2006 9:33
Vote:
 
You probably just need to increase the query timeout for the database. There are two settings for this. The first is to update the key in the web.config EPnQueryTimeout, make it 600 or something like that (600 = 10 minutes). The other is to update the SQL Server properties. Go to Enterprise Manager, [You database] Properties > Connections > Edit query timeout value here (Should default to 600 also). Jeremy.
#14474
Mar 09, 2006 21:48
Vote:
 
Hello! I just added a code sample that clears old versions from the database as a scheduled job. It also shows how it's possible to set the user context when executing a scheduled job. This feature was added in EPiServer 4.61 and does not work in older versions. http://www.episerver.com/en/EPiServer_Knowledge_Center/developerforum/2628/2640/Remove-old-versions-job/
#14475
Jul 04, 2006 11:36
Vote:
 
Tried the link in the previous post but its not valid. Would be happy if someone could repost the code example. Thanks.
#14476
Feb 16, 2007 13:40
Vote:
 

On the Support Tools page (http://world.episerver.com/Support/Support-Tools/) you'll find a job called RemoveOldPageVersionsJob. It enumerates pages, calling the SP editDeleteObsoletePageVersions to truncate the number of kept versions.

#45495
Nov 09, 2010 13:49
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.