How to use RECOVER?
Help! I mistakenly ran an update to a table and overwrote the
contents of
one column. I need to restore this table (or this column) to
what it was
before the update, which ran at 6:15 PM.
I am looking at the RECOVER command, and it looks like I can restore
a
tablespace or a database, but not a single table. Is this true?
If I do need the RECOVER command, can someone help with the syntax?
I am
using archive log mode.
The recovery mechanism is there to protect the database against instance
failure and media failure. It does not protect against user error.
You should
also perform regular exports. However, it looks like in your case the
accident
already happened. Don't worry: you are not the first one (I once did
the same:
deleting 32 rows from a table with 3 million rows, and no exports)
and
probably also not the last one.
So yes, you can not restore a single table, recover is no restore.
You can 'misuse' recover to do so.
Basically
restore the database from the last cold backup
recover database until '1999-02-?? 06:15'
export the affected table
restore the database from the last cold backup again
execute complete recovery.
Hth,
Sybrand Bakker, Oracle DBA