Welcome 微信登录

首页 / 数据库 / MySQL / Oracle Flashback基础应用

查看用户是否具有Flashback权限
 select * from session_privs where privilege like "FLASHBACK%";
 
授予用户Flashback权限
 grant flashback any table to test;
 
恢复刚才删除的一条数据
 alter database add supplemental log data;
 delete from dept where dname="IT";
 commit;
 select * from dept where dname="IT";
 
查看操作,并使用undo_sql恢复
 select t.start_timestamp,t.commit_timestamp,t.logon_user,t.operation,t.table_name,t.table_owner,t.undo_sql from flashback_transaction_query t where table_name="DEPT";
 基于时间段恢复
 update dept set dname="china";
 select * from dept;
 commit;
 
开启对应表的行移动,并使用基于时间段的闪回(10分钟)
 alter table dept enable row movement;
 flashback table dept to timestamp to_timestamp(sysdate-10/(24*60));
 
恢复删除的表
 drop table dept;
 flashback table dept to before drop;
 
查看回收站
 select * from user_recyclebin order by droptime desc;更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12Oracle RMAN基础应用Oracle 修改用户名办法相关资讯      Flashback  Oracle flashback 
  • 闪回事务查询Flashback Transactio  (08/22/2015 09:42:46)
  • 使用Flashback Database进行数据表  (08/22/2015 09:38:06)
  • 使用dbms_flashback工具包实现闪回  (08/22/2015 09:14:51)
  • 闪回版本查询Flashback Version   (08/22/2015 09:41:05)
  • 使用Flashback Transaction方法来  (08/22/2015 09:19:56)
  • Oracle闪回技术flashback  (08/20/2015 10:45:10)
本文评论 查看全部评论 (0)
表情: 姓名: 字数