Environment:
OS: Red Hat Linux As 5
DB: Oracle 10.2.0.4
Today, a developer deleted all the data in a table, because it was not a long time before the undo space was overwritten, And the undo space was restored. the recovery process is simulated as follows.
SQL> connect hxl/hxl
Connected.
SQL> alter session set nls_language = american;
Session altered.
SQL> create table tb_rollback_test
2
3 select rownum rn from dual connect by rownum <= 100;
Table created.
SQL> select to_char (sysdate, 'yyyy-MM-DD HH24: MI: ss') sys_date from dual;
SYS_DATE
-------------------
20:18:31
SQL> delete from tb_rollback_test;
100 rows deleted.
SQL> commit;
Commit complete.
SQL> select count (1) from tb_rollback_test
2 as of TIMESTAMP
3 to_date ('2017-07-08 20:18:31 ', 'yyyy-MM-DD HH24: MI: ss ');
COUNT (1)
----------
100
SQL>
We can see that the deleted data can be retrieved from the undo space, but the truncate cannot be recovered.
-- The End --