• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 832
  • Last Modified:

REcovering deleted records from oracle database.

I have mistaken deleted records from a table in a database ( Oracle) , How can i retrieve the information back into the database.
0
FranklinRaj22
Asked:
FranklinRaj22
3 Solutions
 
schwertnerCommented:
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
 
johnsoneSenior Oracle DBACommented:
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
 
Richard OlutolaConsultantCommented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now