Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 839
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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