Forum Discussion

Visual's avatar
Visual
Copper Contributor
Dec 08, 2025

Truncate and load data

Hi Expert after truncate and load data ... how we can roll back to original data

 

Agreed. We’ll validate by running the scripts in UAT DB and confirm 100% fact–dim key alignment. If that checks out, we’ll consider it a success.

1 Reply

  • Hi,

    a TRUNCATE can only be rolled back if it was executed inside an explicit BEGIN TRANSACTION block. 

    If the TRUNCATE was executed normally (which is usually the case), it commits as a data definition operation immediately and cannot be undone. In that case, only a database backup or reload can restore the original data can help.

    These are the ways SQL Server can roll back a TRUNCATE

    • TRUNCATE direkt and stand alone can not be rolled back (exception BEGIN TRANSACTION)
    • Only a database restore (full, differential, log) can recover the previous state
    • Or reload the old data from an external source

    Sorry for having no other feedback on this. 

    Best

Resources