Mahavirsinh Padhiyar
Mahavirsinh Padhiyar

Reputation: 1179

Rollback updated data in table in SQL Server 2008 R2

I am using SQL Server 2008 R2 and in my database I have by mistake updated all the data in one table and all the records in one column are updated and I want to get back those data which was updated.

Is it any query or something rollback functionality to get those data back?

Upvotes: 1

Views: 2024

Answers (2)

Mahavirsinh Padhiyar
Mahavirsinh Padhiyar

Reputation: 1179

[Solved]

I have used APEX SQL to recover my lost data just installed and connect to my database and rollback my lost data.

It's just simple now.

APEX SQL

Upvotes: 1

Jesús López
Jesús López

Reputation: 9221

Restore the latest backup done before the incident into a new database (RestoredDatabase for example). Then update the column from the restored database using a statement similar to the following:

USE MyDatabase
GO

UPDATE T
   SET T.TheColumn = S.TheColumn
FROM
   TheTable T INNER JOIN RestoredDatabase.dbo.TheTable S
      ON T.Id = S.Id

Upvotes: 0

Related Questions