Undo Changes in Table Help!!

I accidentally executed this query

Update Table Set Field = 1 Where Date < dt

I need to undo this, is there i way to do so

Havent touch sqlserver since the execution of that query.




Answer this question

Undo Changes in Table Help!!

  • Edward1

    Hi Giber,

    If you are using 2005, you may be able to restore the pages that were affected, however the easiest solution may be to restore the database backup to either another server, or same server but under a different database name. You would then be able to revert to the unchanged/correct table be referring to the restored db backup.

    Have a look at http://msdn2.microsoft.com/en-gb/library/ms191253.aspx for an overview of backup options etc.

    Cheers,
    Rob


  • Ggoogle

    The server makes a backup daily of the whole sqlserver folder under program files. Is there a way to locate just the table pages to overwrite the ones I just messed up. Is the tables data inside this folder (program files- Microsoft SqlServer). If it is so should I replace the entire SQLServer Folder from my backup

    Thanks for helping



  • NewToVba

    Hello,

    Unless still within a uncommited transaction (in which case you would issue a ROLLBACK), there is no way to "undo" this data modification except to restore from backup (and if available) apply transaction logs to point-in-time.

    Cheers,
    Rob


  • Undo Changes in Table Help!!