Oracle restores deleted tables/data ____oracle

Source: Internet
Author: User
recover data that was delete Suppose the table name is: Table_delete View System Current time

--Get the system current time

Select To_char (sysdate, ' Yyyy-mm-dd hh24:mi:ss ') from dual;


View the data in this table at a point in time before deleting data

SELECT * from Table_delete as of timestamp to_timestamp (' 2015-12-18 17:16:00 ', ' yyyy-mm-dd hh24:mi:ss ');


If there are deleted data at this point in time, then restore the data to this time

Flashback table Table_delete Totimestamp to_timestamp (' 2015-12-18 17:16:00 ', ' yyyy-mm-dd hh24:mi:ss ');


If you appear the execution

ALTER TABLE table_delete enable row movement;


If you appear because the table is truncate, the method is invalid

Restore the table that was truncate Suppose the table name that is deleted is: Testtruncate View Recycle bin

SELECT * from User_recyclebin ORDER by droptime Desc;

Recovery

Flashback table Testtruncate to before drop;

or

Flashback table "Bin$kdgua10bbhnguweaah8doa==$0" to before drop rename to NewName;

Note: Double quotes for table names









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.