0

I somehow thought rollback means undo the last action. This is what I did:

SQL> update owns
  2  set DRIVER_ID=99999999
  3  ^[[A^Z;

4 rows updated.

SQL> select * from owns;

DRIVER_ID            LICENSE
-------------------- ----------
99999999             ABC222
99999999             MSA369
99999999             MZZ2828
99999999             ZGA123

SQL> rollback
  2  ;

Rollback complete.

SQL> select * from owns;

no rows selected

Is everything gone forever? All my data too? Thanks for any advice and help

Ollie
  • 17,058
  • 7
  • 48
  • 59
Caffeinated
  • 11,982
  • 40
  • 122
  • 216

1 Answers1

4

what you show is not complete... before that UPDATE you must have done something else like an INSERT...

There is no rollback of the rollback if that is what you are asking... the only way you will get this "undone" is to re-execute all statements executed between the last commit before the rollback and that rollback (in the same order!)...

Another option would exist IF your Oracle DB has an active Flashback area - then you could "rewind" the whole DB to the point in time just before you issued the rollback...

Yahia
  • 69,653
  • 9
  • 115
  • 144
  • Yes, before the update I did a lot of inserts, etc. I did everything manually. Hmm so it looks like I learned a lesson well today. Yeah I never ran a commit . I sure will next time. Thank You Very Much Yahia! – Caffeinated Oct 13 '11 at 01:25
  • Refer : http://stackoverflow.com/questions/15298516/how-to-restore-the-data-in-a-oracle-table --> To Flash back your data in a specific table – Raja Apr 19 '16 at 18:42