Solved

SUPERURGENT!! Updated 500 rows in prod database accidentally. 500 points

Posted on 2003-11-12
10
331 Views
Last Modified: 2012-08-14
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
0
Comment
Question by:HenningF
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 17

Expert Comment

by:Squeebee
ID: 9735907
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.
0
 
LVL 1

Author Comment

by:HenningF
ID: 9735920
Heh, I'm afraid it has to be the a restore of some sort...
0
 
LVL 17

Expert Comment

by:Squeebee
ID: 9736052
Then you will have to restore your backup and replay your logs.
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 1

Author Comment

by:HenningF
ID: 9736069
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...
0
 
LVL 17

Expert Comment

by:Squeebee
ID: 9736266
Actually I don't use MSSQL, but I am sure someone will give you the steps.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 9736441
Please maintain this old open question:

http://www.experts-exchange.com/Web/Web_Servers/IIS/Q_20681696.html

Thanks,
Anthony
0
 
LVL 39

Expert Comment

by:appari
ID: 9737645
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
0
 
LVL 1

Author Comment

by:HenningF
ID: 9739494
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_200311120300.BAK'
WITH NORECOVERY

RESTORE LOG xxx FROM
DISK = N'D:\Microsoft SQL Server\MSSQL\BACKUP\xxx_tlog_200311120300.TRN'
WITH NORECOVERY

RESTORE LOG xxx FROM
DISK = N'D:\Microsoft SQL Server\MSSQL\BACKUP\xxx_tlog_200311130000.TRN'
WITH RECOVERY,
STOPAT='2003-11-12 22:50:00'

GO
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 9740002
>>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?
http://www.experts-exchange.com/help/closing.jsp#4

Thanks,
Anthony
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 9742162
A request has been made in Community Support to close this question:

http://www.experts-exchange.com/Community_Support/Q_20796975.html

PAQ-ing the question and refunding 500 points

Experts please leave any comment here when you disagree.

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MS SQL Sever Import/export problem 7 49
SQL- GROUP BY 4 25
SQL Server Express or Standard? 5 29
calculate running total 8 10
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question