Oracle database restore point in time within 24 hours

Source: Internet
Author: User

--First query the data T_asn_dtl at a certain point in time  as the table name
SELECT * from T_asn_dtl as of TIMESTAMP to_timestamp (' 20180625 22:30:00 ', ' YYYYMMDD HH24:MI:SS ');
--Assigning this time-point data to a new table, Tab_bal; it's better to create a new two-sheet table, which is a backup create TABLE Tab_bak as SELECT * from T_ASN_DTL as of TIMESTAMP To_timestamp ( ' 20180625 22:30:00 ', ' YYYYMMDD HH24:MI:SS ');
--Query the table to see if the data has come in,
SELECT * from Tab_bak; SELECT * from T_ASN_DTL;
--Change the table name of the data confusion, and then change the new table name to the name of the table used, so the data is back.
ALTER TABLE T_ASN_DTL Rename to Tabaalter table Tab_bak Rename to T_asn_dtl

Because you forgot to carry the condition when updating, it caused the data confusion.

Use this method to restore data to 1 hours ago (22.30.00)

If you are an enterprise version of Oracle, you can use flashback directly

The standard version of Oracle does not support this flash-back!!!

Oracle database restore point in time within 24 hours

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.