?
Solved

REcovering deleted records from oracle database.

Posted on 2008-06-13
5
Medium Priority
?
821 Views
Last Modified: 2008-09-27
I have mistaken deleted records from a table in a database ( Oracle) , How can i retrieve the information back into the database.
0
Comment
Question by:FranklinRaj22
[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
5 Comments
 
LVL 48

Accepted Solution

by:
schwertner earned 672 total points
ID: 21778353
Have you committed the transaction? If not then issue 'rollback' command.
If you have commited the try to flashback the table:

SELECT * FROM my_table AS OF TIMESTAMP (sysdate - 0.3);

If you see the deleted records create a new table:

CREATE TABLE copy_my_table AS (SELECT * FROM my_table AS OF TIMESTAMP (sysdate - 0.3));

0.3 stands for fraction of the day, so it means close to 7 hours in the past.
0
 
LVL 35

Assisted Solution

by:johnsone
johnsone earned 664 total points
ID: 21778374
If that does not work and your database is in archive log mode, you should be able to use Log Miner to recover the records.
0
 
LVL 16

Assisted Solution

by:Richard Olutola
Richard Olutola earned 664 total points
ID: 21778993
If you are NOT in archivelog mode, I dread to think, you have 2 options.

1. Shutdown and restore from backup

2. Create a duplicate instance, restore to last cold backup, export the table and import it into the live instance.

If you are in ARCHIVELOG mode, then don't panic, you don't have to lose data.

R.

0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Suggested Courses

764 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