Oracle accidental deletion and data recovery

Source: Internet
Author: User

1. Check the system version number SCN according to the time point:

Select timestamp_to_scn (to_timestamp ('2017-01-07 11:20:00 ', 'yyyy-MM-DD hh: MI: ss') from dual

2. Check whether the data at the SCN time point of the table to be deleted is to be restored:
Select count (*) from ct_sal_ordertosaleissue as of SCN 44482681

3. Create a table that temporarily saves data:
Create Table temp1 as select * From ct_sal_ordertosaleissue

4. Insert the data before the temporary data table is accidentally deleted:
Insert into temp1 select * From ct_sal_ordertosaleissue as of SCN 44482681

5. Insert deleted data from the temporary table to the original table:
Insert into ct_sal_ordertosaleissue select * From temp1

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.