Use Flashback to view Oracle Table historical moment data

Source: Internet
Author: User

Use Flashback to view Oracle Table historical moment data

1. View the table history moment data

SELECT * from Tab_test as of TIMESTAMP to_timestamp (' 20140917 10:00:00 ', ' yyyymmdd hh24:mi:ss ');

2. Use Flashback table to restore the tables to a certain time in the past

ALTER TABLE tab_test enable row movement;

Flashback table Tab_test to timestamp (' 20140917 10:00:00 ', ' yyyymmdd hh24:mi:ss ');

ALTER TABLE tab_test disable row movement;

3. Check the operation of the table for a certain period of time in the past to confirm the point at which you need to recover

Select Sql_text,last_active_time from V$sqlarea where Last_active_time >to_date (' 20140917 10:00:00 ', ' YYYYMMDD hh24: Mi:ss ') and sql_text like '%tab_test% ';

4, confirm whether to turn on the flash back

Select log_mode,flashback_on from V$database;

Use Flashback to view Oracle Table historical moment data

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.