Accidentally deleted a table from Oracle. It's really easy to find the recovery method. According to the ORACLE10G features, When I execute DropTable or deleteall,
Accidentally deleted a table from Oracle. It's really easy to find the recovery method. According to the ORACLE10G feature, when I run Drop Table or delete all,
Accidentally deleted a table from Oracle. It's really easy to find the recovery method.
According to ORACLE10G features, When I execute Drop Table or delete all, Oracle will put the deleted Table or data records in the Database Recycle Bin (Database Recyclebin. In this way, we can use the flashback table command to restore the deleted table. Syntax:
Flashback table name to before drop;
SQL @ kokooa> flashback table test003 to before drop;
Flashback complete.
SQL @ kokooa> select * from test003;
NAME STATE PERSON
------------------------
A 1
A 2
A 1
A 1
B 2
B 2
6 rows selected.
Update table
SQL @ kokooa> flashback table a to timestamp to_timestamp ('2017-11-09 11:00:00 ', 'yyyy-mm-dd hh24: mi: ss ');
Generally, an error is reported:
ERROR at line 1:
ORA-08189: cannot flashback the table because row movement is not enabled
You only need:
SQL @ kokooa> alter table a enable row movement;
Table altered.
OK.
SQL @ kokooa> flashback table a to timestamp to_timestamp ('2017-11-09 11:00:00 ', 'yyyy-mm-dd hh24: mi: ss ');
Flashback complete.
SQL @ kokooa> select * from;
NAME NUM
------------------------------
Jim 90
Tom 100
Kate 220
Lili 330
By default, oracle performs 1440 minutes on the submitted data, that is, the "cache" of the day. Therefore, there is a way to retrieve the data within one day.