Home » RDBMS Server » Server Administration » recover deleted records
recover deleted records [message #315585] Tue, 22 April 2008 01:33 Go to next message
ora_2007
Messages: 430
Registered: July 2007
Location: Mumbai
Senior Member
Hi,

I have deleted 1000 records from the TEST table and i also commited those records.
But i want to recover those records because i deleted wrong records.

The idea which i know is that

SELECT NAME,FIRST_TIME,NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY first_time DESC;

I will chose the appropriate arcive log.

EXECUTE DBMS_LOGMNR.ADD_LOGFILE(logfilename=>'/home/oracle/ARCHIVE_LOG/1_20_650546031.dbf',options=>DBMS_LOGMNR.NEW);


EXECUTE DBMS_LOGMNR.start_logmnr(options=>DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG);


SELECT username,OPERATION,sql_undo,sql_redo 
FROM v$logmnr_contents


Is it a right procedure?
If yes then one more thing i would like to know is that my deleted records are in the redo log and till now archive is not generated. How can i use those redo log?

Thanks
Re: recover deleted records [message #315586 is a reply to message #315585] Tue, 22 April 2008 01:36 Go to previous messageGo to next message
varu123
Messages: 754
Registered: October 2007
Senior Member
Query v$log.
If the redo log is not archived,it is the current redo log that has the deleted rows.

Use it in the procedure you mentioned.
Re: recover deleted records [message #315588 is a reply to message #315585] Tue, 22 April 2008 01:38 Go to previous messageGo to next message
gopu_g
Messages: 54
Registered: March 2008
Location: mumbai
Member

hi,
please go through this link..

http://www.orafaq.com/node/50

Regards
Gopu
Re: recover deleted records [message #315629 is a reply to message #315585] Tue, 22 April 2008 04:30 Go to previous message
ora_2007
Messages: 430
Registered: July 2007
Location: Mumbai
Senior Member
Thanks to all.
It works.

But i thing i found is that the insert statement contains one extra column like "" and in values => NULL

Why that extra column is created?

Thanks,

[Updated on: Tue, 22 April 2008 05:18]

Report message to a moderator

Previous Topic: Segment Space management
Next Topic: IDLE_TIME & CONNECT_TIME in seconds
Goto Forum:
  


Current Time: Fri Sep 06 16:47:09 CDT 2024