Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 28th, 2004, 10:00 AM
Registered User
 
Join Date: Jan 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dangerous mistake

hi friends,

  i did a big mistake.

 in my production database, i had to update one row. normally i had to give one WHERE condition.

But i forgot WHERE condition.

One field in all rows in my table is blank now. Very dangerous maaan.

I am going mad... Please help me...

Rollback transaction is not possible, i guess, since i didnt do any begin trans in the beginning.

if any one knows anything on this, plz send me a reply very fast

Thanx in advance
revin

Reply With Quote
  #2 (permalink)  
Old January 28th, 2004, 11:51 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default

Why don't you go back to your previous back up?
Reply With Quote
  #3 (permalink)  
Old January 28th, 2004, 02:13 PM
Authorized User
 
Join Date: Jun 2003
Location: , , Romania.
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, you should try to recover the lost values from the last complete database backup. You can restore this backup as a _NEW_ database, and you can copy the data from the restored database to the "real" database.

Here is an example of copying the Employees.LastName data in the Northwind database:

update e
set LastName = eold.LastName
from Northwind.dbo.Employees e
    inner join NorthwindOld.dbo.Employees eold
        on e.EmployeeId = eold.EmployeeId

The second option is to do a point-in-time recovery. This is possible if your last backup doesn't contain the values you accidentally deleted. If the database uses the full recovery model (bulk-logged also?), you can restore the last complete database backup as a new database and then restore the transaction log backup until before the accidental delete. You can recover the values from here.

defiant.
Reply With Quote
  #4 (permalink)  
Old January 29th, 2004, 01:34 AM
Registered User
 
Join Date: Jan 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for the reply guys.. but i dont have a backup for this table.

can i revert the update someways or can i attain the previous stage of table by doing something from the Transaction log?

if so how can it be done...

Reply With Quote
  #5 (permalink)  
Old February 4th, 2004, 12:06 PM
Authorized User
 
Join Date: Jun 2003
Location: , , Romania.
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can use a tool like Lumigent Log Explorer (www.lumigent.com) to browse through the log file. I never used it.

or maybe you can try the following: create a new database and back-it up. Then restore it WITH NORECOVERY and then try to do a point-in-time restore using the transaction log backup, from the production database, to a point before the acident. the chances for this to work are slim, but maybe it will. i don't have time to test this myself.

defiant.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Did you find a mistake? nzakas BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 47 July 18th, 2006 05:51 PM
mistake in code yami56 Access 3 February 24th, 2005 04:04 PM
mistake in my topics zakarya_hazara Classic ASP Basics 1 October 9th, 2004 02:49 AM
A potentially dangerous Request.Form value was det bmains ASP.NET 1.0 and 1.1 Basics 1 February 17th, 2004 01:33 PM
Dangerous error occurs on topic and reply forms drfunkie BOOK: ASP.NET Website Programming Problem-Design-Solution 2 July 11th, 2003 09:00 AM



All times are GMT -4. The time now is 01:51 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.