Solved

REcovering deleted records from oracle database.

Posted on 2008-06-13
5
799 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
5 Comments
 
LVL 47

Accepted Solution

by:
schwertner earned 168 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 34

Assisted Solution

by:johnsone
johnsone earned 166 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 166 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

910 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now