Welcome 微信登录

首页 / 数据库 / MySQL / 利用闪回查看Oracle表历史时刻数据

利用闪回查看Oracle表历史时刻数据1.查看表历史时刻数据select * from tab_test AS OF TIMESTAMP to_timestamp("20140917 10:00:00","yyyymmdd hh24:mi:ss");2、利用flashback table恢复表到过去某一时刻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、查看过去某一段时间内对表的操作,以确认需要恢复到的时间点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、确认是否开启闪回select log_mode,flashback_on from v$database;Oracle 11g Flashback Data Archive(闪回数据归档) http://www.linuxidc.com/Linux/2013-06/86696.htmOracle Flashback闪回机制 http://www.linuxidc.com/Linux/2013-05/84223.htmOracle Flashback database http://www.linuxidc.com/Linux/2013-05/84129.htmFlashback table快速恢复误删除的数据 http://www.linuxidc.com/Linux/2012-09/70988.htmOracle 备份恢复:Flashback闪回 http://www.linuxidc.com/Linux/2012-09/69958.htm更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12本文永久更新链接地址