Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Using flashback to view historical moment data of oracle table

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. View table Historical time data

select * from tab_test AS OF TIMESTAMP to_timestamp('20140917 10:00:00','yyyymmdd hh34:mi:ss');

2. Use flashback table to restore table 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 hh34:mi:ss');alter table tab_test disable row movement;

3. Check the operation of the table in the past period of time to confirm the time point to be restored.

select SQL_TEXT,LAST_ACTIVE_TIME from v$sqlarea where LAST_ACTIVE_TIME >to_date('20140917 10:00:00','yyyymmdd hh34:mi:ss') and SQL_TEXT like '%tab_test%';

4. Confirm whether to open flashback

select log_mode,flashback_on from v$database;

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report