0

Yesterday I wrote some code module, that wrote wrong data in almost 400 existing records in important database on SQL Server 2008. I didn't make backup of this database (my mistake). So the question is how do I rollback these 400 transactions? Is there any way to do this? Thanks.

1
  • Manually fixing these transactions looks to be the only option, if it was yesterday then most likely you've already committed the changes. Commented Apr 8, 2014 at 8:32

2 Answers 2

2

You can't rollback, but if the database is in full recovery model, then you can restore to another servar with stopat, and recover the deleted rows from there.

Sign up to request clarification or add additional context in comments.

Comments

0

You can roll back a transaction as long as you haven't committed it.

But if you ran it yesterday, chances are very high you did commit - and then there's no way back.

So you're options are to

  • either restore a backup (and next time remember to take one before such an operation!)
  • manually "undo" those 400 transactions

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.