Home > Ask the Oracle Database / Applications Experts > Oracle database backup and recovery Questions & Answers > How do I recover deleted data without writing over current data?
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

How do I recover deleted data without writing over current data?

Brian Peasland1 EXPERT RESPONSE FROM: Brian Peasland1

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site


Oracle tips, scripts, and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 02 December 2005
I am trying to restore a database where data was inadvertently deleted. I am recovering the deleted data from a backup. My question is how can I merge the two together without writing over my current data? I'm using an Oracle10g database. Thanks for your time and help. (Donna Bonderud says hi.)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Oracle database backup and recovery
How to perform Oracle database recovery with a corrupt online redo log
Can I create an Oracle Catalog Database with the Enterprise Console?
Do I need to recreate views after an Oracle table reorg?
Client-based apps vs. web-based apps in Developer 2000
How to perform an Oracle 8i to 10g migration
Can I move the tablespace online with missing datafiles in Oracle?
Oracle upgrade process vs. Oracle exp/imp for 9i to 10g migration
How to use RMAN CONVERT to migrate from Solaris to Oracle 11g RHEL
Why am I having trouble installing Oracle 10g on Vista?
Can I load Oracle 8 on Windows Server 2003?

Oracle database backup and recovery
How to perform Oracle database recovery with a corrupt online redo log
Can I create an Oracle Catalog Database with the Enterprise Console?
Do I need to recreate views after an Oracle table reorg?
Client-based apps vs. web-based apps in Developer 2000
Can I move the tablespace online with missing datafiles in Oracle?
How to perform an Oracle 8i to 10g migration
Oracle upgrade process vs. Oracle exp/imp for 9i to 10g migration
How to use RMAN CONVERT to migrate from Solaris to Oracle 11g RHEL
Why am I having trouble installing Oracle 10g on Vista?
Can I load Oracle 8 on Windows Server 2003?
Oracle database backup and recovery Research

Other recovery operations
Recovering from user errors
Data warehouse disaster recovery 101
Copying data from test server database
Creating a Recovery Catalog in Oracle 8i
Updating a remote database using redo logs
Restoring an inadvertently dropped table
Deploy redundant recovery catalogs
Perform tablespace recovery with RMAN
Create a database clone using an open backup
Recovering lost table and data before TSPITR

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


Depending on your backup and recovery strategy, you may have some data loss here. You can perform an incomplete recovery or even a Tablespace Point In Time Recovery (TSPITR). With incomplete recovery, you specify the point in time you recover to, but you will lose all transactions after that point. With TSPITR, you will recover a specific tablespace to a point in time, but you will lose all transactions in that tablespace after that point. So without knowing more about your current backup strategy, I am assuming that a recovery from the backup will lose some data changes that occurred after the accidental deletion.

There are some options that may be available to you. In Oracle 10g, you can specify a Flashback Area and you can flashback the database to right before the delete operation was performed. You can then query for the deleted data, save that data in a cursor, and then revert back to the current point in time. This lets you recover that deleted data. Flashback queries in some form have been around since Oracle 9i, but Oracle 10g greatly enhances the flashback functionality. I would suggest that this option is not available to you as your flashback data may have been overwritten in the time it took me to get a response back to you.

Another option is to mine your redo logs for the UNDO statements to your DELETE statements using Log Miner. Since you were talking about rolling forward (at least I'm assuming that's what you were talking about) then you can mine your archived redo logs for the Undo statements to your DELETE statements. You can save these Undo statements in a SQL script and then run the script to perform the INSERT operations to undo your DELETE operations. Chapter 17 of the Oracle 10gR2 Utilities guide contains the instructions for using the Log Miner. You can find a copy of this documentation on Technet. The site is free but you will need to register for an account. The direct link to Chapter 17 is here.

Tell Donna I said "Hi!!!" and if you want to email me directly, she has my email address.




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Oracle White Papers: Fusion Middleware
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts