Restore deleted table data under Red Hat Linux As 5

Source: Internet
Author: User

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 --

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.