If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Rterieving data before committing a transaction.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-07-11, 01:19
sunny_007 sunny_007 is offline
Registered User
 
Join Date: Sep 2010
Posts: 141
Smile Rterieving data before committing a transaction.

Hi guys,

After a successful transaction (after committing), i found that i sent wrong records of one the column (wrongly updated). How do i get back my initial stage? i mean, how do i get back all the previous results? Is there a way to retrieve my previous data which were before committing a transaction?


Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 12-07-11, 02:44
flyboy flyboy is offline
Registered User
 
Join Date: Mar 2007
Posts: 546
Hi,

it depends on your Oracle version, time which lasted from the transaction COMMIT and/or current database workload.

From 9i, you may use flashback query to retrieve data from given time (in your case it would be before committing the wrong transaction).
From 10g, you may flashback the whole table to that time.
These techniques are described in many articles on web, e.g. here:
http://www.oracle-base.com/articles/...hbackQuery.php
http://www.oracle-base.com/articles/...ashback10g.php

Note, that data obtained will be exactly the same as before that wrong transaction commit; any other changes made from that time will not be reflected in those techniques. So, if you/anybody else made any other changes after that wrong transaction, you will lose them with flashback table. In flashback query, you may be more successful by selecting primary key with wrong column/rows and recovering only them.

If this not possible, the other option would be recovering it from backup (again, only data before that wrong transaction). You should ask your DBA for doing that.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On