jessbryant68
Posts: 4
|
| Posted: 12/02/2009, 8:38 AM |
|
I hope someone can help me out here!! I do not have a current backup of my database (one STUPID oversite - while developing my application). I was trying to update two tables by using a Custom Insert, and when I made a simple change to one record's email address, it overwrote ALL of my recrods with the data from the record I was working on. This would be close to 1200 records.
I have been trying to figure out how to do a ROLLBACK. But I can't open the transaction log. I know there are 3rd party software out there that will allow me to read the transaction logs (very pricey) - and even if I got the log opened, I wouldn't know what to do with it.
Does anyone know how I can "UNDO" the change I just made?
I am seriously freaking out here!!! PLEASE HELP!!!!
|
 |
 |
Gena
Posts: 591
|
| Posted: 12/02/2009, 8:48 AM |
|
all I can say is: "DO the test on localhost BEFORE put your project online!!" and make db backup before.
_________________
Gena |
 |
 |
jessbryant68
Posts: 4
|
| Posted: 12/02/2009, 9:13 AM |
|
OK, I figured out how to get the data back. Thank the LORD! And you are right, I definately need to make changes locally and make a backup first. HUGE LESSON learned!
If this ever happens to anyone - I downloaded the trial version of ApexSQL Log. It goes out and reads the transaction log and then creates a ROLLBACK script for you based upon a time frame that you give it (for example, I told it I wanted a rollback script from 9 am today). I then copied and pasted the script it created into Query Analyzer and it gave me all my data back!
BIG SIGH OF RELIEF!!!
|
 |
 |
datadoit
|
| Posted: 12/02/2009, 3:39 PM |
|
What was your database engine?
|
|
|
 |
damian
Posts: 838
|
| Posted: 12/02/2009, 4:24 PM |
|
sounds like mssql
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
jessbryant68
Posts: 4
|
| Posted: 12/03/2009, 1:44 PM |
|
Yes, it was MS SQL
|
 |
 |
Crotten
Posts: 12
|
| Posted: 12/03/2009, 1:56 PM |
|
Quote jessbryant68:
OK, I figured out how to get the data back. Thank the LORD! And you are right, I definately need to make changes locally and make a backup first. HUGE LESSON learned!
If this ever happens to anyone - I downloaded the trial version of ApexSQL Log. It goes out and reads the transaction log and then creates a ROLLBACK script for you based upon a time frame that you give it (for example, I told it I wanted a rollback script from 9 am today). I then copied and pasted the script it created into Query Analyzer and it gave me all my data back!
BIG SIGH OF RELIEF!!!
You could have actually selected all the records from the Deleted Table and inserted them into a temporary (NOT TEMPDB) then updated the actual data from the temporary one.
OR, you could create a Transaction LOG table and Update And/Or Delete Triggers for your DB system and store data in there for recovery. This way, if you forget to do a bup, then at least you have a fighting chance.
I've done this numerous times and has saved me big time.
|
 |
 |
|