Oracle Database accidental deletion and data recovery

Source: Internet
Author: User

Last week, I deleted the production data because of a temporary embarrassment.

The delete statement is used, and commit is returned quickly.

So --- "has a cup.

----------------------------------------------------

The following two statements are found:

Alter table tablename ENABLE row movement;

Flashback table tablename to timestamp to_timestamp ('2017-09-13 13:00:00 ', 'yyyy-mm-dd hh24: mi: ss ');

------------------------------------------------------

Remember the delete --- commit statement that runs around half past two;

But it was recovered to 13:00:00, as I should have.

(In other words, it's cool at this time. Remember: It's okay. Don't take it for granted)

------------------------------------------------------

The data I accidentally deleted was indeed returned, but it was suddenly reflected the next day that the data inserted between 13:00:00 and 14:30:00 was still unavailable (I tried it in the test environment, the data for this period of time should be gone, because this table is the original list, and the directory will be continuously poll, parse the file, and insert details. So, I am really panic)

------------------------------------------------------

Fortunately, we found the lost data through other channels. Unfortunately, we were lucky.

------------------------------------------------------

Therefore, if this problem persists next time, we strongly recommend that you create a temporary table to back up the data in the current table before restoration, and then confirm that the data is not inserted or updated after backup, at this time, use the preceding statement to restore the table to a certain time, and then integrate the two tables.

------------------------------------------------------

I am so arrogant that there are more and more problems with the expression ...... Sad reminder ......

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.