Nitish
Nitish

Reputation: 14113

Get data changed 2 hours back in SQL

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.

Upvotes: 0

Views: 348

Answers (2)

Thato
Thato

Reputation: 128

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.

Upvotes: 1

user1959825
user1959825

Reputation:

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.

Upvotes: 0

Related Questions