473,322 Members | 1,408 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How to recover deleted rows

hi

two days before arount 20,000 rows are manuly deleted, is there any way
to recover it back.
We have backup, that is 10 days old, Is there any way to recover only
that 20,000 rows,
Plz help me out ASAP.

Regards
Senthil Kumar.T

Sep 6 '06 #1
2 12537

se********@gmail.com wrote:
hi

two days before arount 20,000 rows are manuly deleted, is there any way
to recover it back.
We have backup, that is 10 days old, Is there any way to recover only
that 20,000 rows,
Plz help me out ASAP.

Regards
Senthil Kumar.T
Provided that no other rows other than the 20,000 ones were deleted
since then, you can write a trivial program that goes through all rows
available in the backup ( dumped into memory, files whatever) comparing
them with the ones you have left.

Find the ones that exist in the original set ( provided by the backup
) but do not exist on the current set ( the ones left after the manual
removal ).

Use INSERT IGNORE VALUES (...), (...), (...), (...)
to insert them back. Providing the column data for many rows ( as
opposed to just one ) for INSERT will considerably speed up the
process.

Sep 6 '06 #2
se********@gmail.com wrote:
hi

two days before arount 20,000 rows are manuly deleted, is there any way
to recover it back.
We have backup, that is 10 days old, Is there any way to recover only
that 20,000 rows,
Plz help me out ASAP.

Regards
Senthil Kumar.T
Yes, It may prove tedious, but step-by-step.

1. Create a temporary table using

CREATE TABLE temp AS SELECT * FROM realtable.

2. Delete the contents of the temp table.

3. Add the same primary index to temp

4. Load temp from your backup

5. Delete from the temp table where the primary key can be
found in the real table

What is left in the temp table are the deleted records

6. Insert them into the real table.
HTH
Jerry
Sep 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Grant | last post by:
Hi Is there a way to recover deleted records from a table. A mass deletion has occurred and Access has been closed since it happened Louis
1
by: Roberto La Forgia | last post by:
Hi all, there is a utility o procedure to recovery deleted record from a Access table (versione 2002/2003) ? Thanks in advance Roberto
2
by: Snonck | last post by:
Is is possible to recover deleted rows from a table from archive logs? For example, say you have a database with archive logging turned off. You create a table and populate it with records. You...
1
by: Astlik | last post by:
Hi, I was using phpmyadmin when, by mistake I deleted some rows from a table I didn't wanted to. I would like to know if anyone could help me recovering those records I deleted. I don't have any...
0
by: mike_dba | last post by:
I have been testing the db2 recover command on a DB2 V8.2 Linux database. The database contains a single partition. I am not archiving logs but retaining them on disk. the backup image is to...
4
by: =?Utf-8?B?cmFuZHkxMjAw?= | last post by:
I'm working in Visual Studio 2005 and C#. I have a DataTable with many rows. The user can delete a row. After the row is deleted, I'd like to column values for the deleted row, but any attempt to...
2
by: kalvarahul | last post by:
Hi All, I deleted few rows from a Table by mistake. Please could you write on the ways to rollback that data? I have still not commited any transaction. Please provide the steps / links /...
6
by: MLH | last post by:
Utilities to recover tbl removed from TABLE tab of database window with the DELETE key?
1
by: dbquest | last post by:
Hi, Is there a way to recover the deleted rows? We do have a backup but not for all the rows that got deleted. Appreciate some quick help on this. Thanks.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.