I changed data for record with id 12 in column _column in table _table two hours back. But now I want it back. Followed this but not getting what is said. Can someone help me to retrieve it back.
Asked
Active
Viewed 290 times
0
-
Do you not have any backups of the DB you could restore to another DB and query? – bendataclear Feb 05 '13 at 09:04
-
This will be the final option for me. If there is somehow I can get that data without updating, please tell. If there is no way, please tell how to rollback to previous value. – Nitish Feb 05 '13 at 09:05
-
@bendataclear : No backups :( – Nitish Feb 05 '13 at 09:05
-
What is your recovery model for the DB (eg Simple, Full)? – bendataclear Feb 05 '13 at 09:40
-
What you mean by `changed` ? was it an update operation? – Kaf Feb 05 '13 at 09:56
-
@Kaf : I right clicked the table and opened Edit 200 records. Table opened and I changed the value from there. – Nitish Feb 05 '13 at 10:02
-
What are the values `before` and `after` changing? and the column names of your table? – Kaf Feb 05 '13 at 10:09
-
@Kaf : No offense but how does that matter ? Also,I have written the column and table name in question. It is _column and _table – Nitish Feb 05 '13 at 10:14
-
It does matter to build a query to revert back to your original state. – Kaf Feb 05 '13 at 10:17
-
Ok. Consider the old value as _oldValue and new value as _newValue – Nitish Feb 05 '13 at 10:18
-
Then make your new value to old value ;). I wasn't trying to nick your data. – Kaf Feb 05 '13 at 10:26
-
@Kaf : I am sure you were not :) But I can't write it. I hope you understand. – Nitish Feb 05 '13 at 10:38
-
Have you tried the restore mathed answered by @Thato? – Kaf Feb 05 '13 at 11:15
2 Answers
1
Make sure your database is in FULL or Bulk-Logged recovery model and that you are at least doing transaction log backups. You would need to restore transaction log backups by using the STOPAT option. http://support.microsoft.com/kb/321836
HOW TO RESTORE TO A POINT IN TIME
RESTORE DATABASE AdventureWorks FROM DISK = 'C:\AdventureWorks.BAK' WITH NORECOVERY GO RESTORE LOG AdventureWorks FROM DISK = 'C:\AdventureWorks.TRN' WITH RECOVERY, STOPAT = 'Feb 05, 2013 05:31:00 PM' GO
Good luck.

Thato
- 128
- 1
- 7
0
That question you linked is related to actually returning rows minus a day, not data recovery. Are you trying to recover data that has actually been changed 2 hours ago? If so, I do not believe it's possible unless you were to attempt some sort of HD recovery process which can get quite messy.