Delete data

  • My database got very big 49516.69 MB and I want to set up a job to delete a data,but my concern that my logs will be too big.Anyone knows a good solution for this problem? Thank you

  • You probably have three options:

    Delete a 'range' of records in several executions, instead of one large-scale removal, and backup the database between these executions.

    Make sure you have enough space for a Log File that will be much larger than normal, and backup the database once the deletion is completed.

    Switch to Simple Recovery, run the deletion, backup the database and switch back to whichever recovery model you're using. Certainly the least favourite option, and you would have to ensure that a backup was taken beforehand and that nothing other than the deletion was running whilst in Simple Recovery.

  • I'd also look at the option of selecting the data that you want to retain out, either into a BCP file or another table, then drop the original table, re-create it and load the data you're retaining. But that's only a good option if you're planning to delete a large percentage of the data in the table.

  • Thank you

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply