HenningF
asked on
SUPERURGENT!! Updated 500 rows in prod database accidentally. 500 points
I accidentally updated 500 rows in my production database without the possibility of a rollback. I do however have the translogs and I have closed my website so that no other transactions can be made.
I need to undo my update fast as hell, can anyone please help me??? I do know that I should have practised this ages ago but you know how it is...
HenningF
I need to undo my update fast as hell, can anyone please help me??? I do know that I should have practised this ages ago but you know how it is...
HenningF
I don't suppose this update was something transformal like SET salary = salary * 5; ?? If so just do the opposite. If not then you need to go to your last backup, restore it, then replay the logs up to the massive UPDATE statement.
ASKER
Heh, I'm afraid it has to be the a restore of some sort...
Then you will have to restore your backup and replay your logs.
ASKER
Any pointers in doing so? I have a full daily backup and translogbackup every 3 hours. I would like to restore up to my crucial UPDATE-statement. Code would be nice...
Actually I don't use MSSQL, but I am sure someone will give you the steps.
Please maintain this old open question:
https://www.experts-exchange.com/questions/20681696/SSL-works-locally-but-not-in-production.html
Thanks,
Anthony
https://www.experts-exchange.com/questions/20681696/SSL-works-locally-but-not-in-production.html
Thanks,
Anthony
if you have full db back up and transaction log backup every 3 hours then go through this article on MSDN and follow the recovery plan.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_565v.asp?frame=true
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_565v.asp?frame=true
ASKER
Allright, thanx fellas...no offence but I managed without our help. The tsql I used is enclosed at the bottom. Now for you to make any points maybe you could help me with this:
I had some transactions beeing completed *after* the point of failure that I had to manually put in the database after the restore was completed. Now this was a total pain in the a** and I would really like to avoid that in the future since it leaves alot of room for errors. Do you guys know how to restore portions of a logfile AFTER a certain point in time?
HenningF
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
USE Master
GO
RESTORE DATABASE xxx FROM
DISK = N'D:\Microsoft SQL Server\MSSQL\BACKUP\xxx_db _200311120 300.BAK'
WITH NORECOVERY
RESTORE LOG xxx FROM
DISK = N'D:\Microsoft SQL Server\MSSQL\BACKUP\xxx_tl og_2003111 20300.TRN'
WITH NORECOVERY
RESTORE LOG xxx FROM
DISK = N'D:\Microsoft SQL Server\MSSQL\BACKUP\xxx_tl og_2003111 30000.TRN'
WITH RECOVERY,
STOPAT='2003-11-12 22:50:00'
GO
I had some transactions beeing completed *after* the point of failure that I had to manually put in the database after the restore was completed. Now this was a total pain in the a** and I would really like to avoid that in the future since it leaves alot of room for errors. Do you guys know how to restore portions of a logfile AFTER a certain point in time?
HenningF
--------------------------
USE Master
GO
RESTORE DATABASE xxx FROM
DISK = N'D:\Microsoft SQL Server\MSSQL\BACKUP\xxx_db
WITH NORECOVERY
RESTORE LOG xxx FROM
DISK = N'D:\Microsoft SQL Server\MSSQL\BACKUP\xxx_tl
WITH NORECOVERY
RESTORE LOG xxx FROM
DISK = N'D:\Microsoft SQL Server\MSSQL\BACKUP\xxx_tl
WITH RECOVERY,
STOPAT='2003-11-12 22:50:00'
GO
>>Allright, thanx fellas...no offence but I managed without our help. <<
Than please go ahead and close this question. See here for help:
I answered my question myself. What do I do?
https://www.experts-exchange.com/help/closing.jsp#4
Thanks,
Anthony
Than please go ahead and close this question. See here for help:
I answered my question myself. What do I do?
https://www.experts-exchange.com/help/closing.jsp#4
Thanks,
Anthony
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.