0

We are using WFFM 2.4 with Sitecore 7.2 and have "save to database" action in many forms.As WFFM database size is more then 21 GB now, I am looking a script to remove old records. Please share if same kind of work you have done before.

Thanks

  • 1
    I'm not sure if this really applies to Sitecore. If you are interested in removing old data, just find where it's saving and Delete From the table for all records older than x date. – Dylan Young Jun 15 '18 at 4:00
  • I agree with @DylanYoung. This is DB Admin sort of work not related to Sitecore – Peter Procházka Jun 15 '18 at 5:48
1

I think that it is better backup WFFM db and attach the new one clear database rather than do any manipulations with old data. But in case if you wish to do it, here is script:

DELETE FROM Field
WHERE FormId in (select Id from Form where Timestamp < '2018/06/15')    

GO

DELETE FROM Form
WHERE Id in (select Id from Form where Timestamp < '2018/06/15')

Put date that you require instead of '2018/06/15' and don't forget to backup before running it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.