Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Paul 154 posts 520 karma points
    1 week ago

    How to delete Umbraco Forms records direct from DB

    Hi All,

    We've hit an issue with Umbraco forms that appears to be related to the number of records we have stored in the database (or rather it doesn't appear as an issue when we have less db records!). We don't need to keep the DB records, but would like to delete out the old records and tidy the database up a bit. Using the back office regularly times out and each record takes ~10s to delete; so when I'm looking at purging 40,000 of them I need something a little quicker! Below is the error we're seeing:

    ERROR Umbraco.Core.Persistence.UmbracoDatabase - Exception (ae436937).
    System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

    Can anyone advise the SQL query we'd need run to delete not only the record itself; but also the associated entries in the other Umbraco Forms tables (e.g data bit/data long string etc).

    *edit: If I delete a form does it remove all of the entries for that form as well?


  • Marc Goodson 1562 posts 10433 karma points MVP 6x c-trib
    7 days ago
    Marc Goodson

    Hi Paul

    This is quite old but the database structure is still pretty much the same:

    So this might give you a good starting point for working out what you need, or at least the strategy of deleting the entries in the value tables first, before deleting the 'records' entry.

    If you try to delete from a table that is joined to another table, it won't let you delete that record, and it will tell you why, so you'll be able to discover you need to delete from that joined table first...



Please Sign in or register to post replies

Write your reply to: