Rolling back transactions for a paticular table

  • Made updates to a table (SQL Server 2005)

    Would like to rollback those changes

    Doing log shipping every 15 minutes

    Is there a way to rollback those changes w/o rolling back other changes within that time period.

    The changes committed at 10:15 AM. Is there a way to do this.

    Thanks,

    Newbie who may just be in over my head!!

  • I am not sure if this is a suggested method, but I am giving what's on top my head.

    You cannot rollback changes only to a single table, rather to a particular point in time for a database, so all tables will have effect.

    My plan would be to set up another database and recover till the point of time, get the data for this particular table to your current database.

    Experts please correct me...


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • I think you are correct just wanted to post to make sure.

  • jparks-1090949 (12/10/2009)


    Made updates to a table (SQL Server 2005)

    Would like to rollback those changes

    Only possible if you made the changes inside an explicit transaction and haven't run COMMIT yet.

    If that's not the case, fetch out your backups. Restore as a new database up to the time that you want to roll back to. Script changes over to main database. If the were updates, that can be tricky.

    If someone else has modified the same rows since your little accident, their changes will also be lost.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Gail, any corrections / suggestions to my method...


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

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

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