I updated couple of rows in a table wrongly

  • I updated couple of rows in a table wrongly.

    How to rollback the table without using retore db option.

    Thanks in Advance

    Ganesh

    GaNeSH

  • ganesh (6/19/2009)


    I updated couple of rows in a table wrongly.

    How to rollback the table without using retore db option.

    Thanks in Advance

    Ganesh

    I dont think u can do it...

    if u have a clean backup, restore it as a different db. and move the table from the restored db to original db.

    If there were updates post the last backup which were genuine, you might want to

    1. rename original table in prod db

    2. move table from restored db

    3. move clean records from renamed table to moved table.

    4. drop restored db.



    Pradeep Singh

  • The only way I know how to do this is plan in advance.

    We have a "user" database that we SELECT...INTO all data from the tables we are updating prior to the actual update. Then, if we make mistakes, all we have to do is join back to these archived tables on the identity field and fix back to the way they were.

    Of course, we also use an SDLC process. NOTHING goes into Production without having gone through QC (Quality Control) and testing by the business unit.

    Those two together makes our lives much easier.

    Plus in 2005, you can do snapshots which help ameliorate problems somewhat, but still require a database restore.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

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

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