Flashback
来源:互联网 发布:卖家对淘宝诈骗提醒 编辑:程序博客网 时间:2024/06/11 19:53
test@ORCL>exec :scn := dbms_flashback.get_system_change_number
PL/SQL procedure successfully completed.
test@ORCL>print scn
SCN
----------
682621
test@ORCL>select count(*) from emp;
COUNT(*)
----------
14
test@ORCL>delete from emp;
14 rows deleted.
test@ORCL>select count(*) from emp;
COUNT(*)
----------
0
test@ORCL>commit;
Commit complete.
test@ORCL>select *
2 from (select count(*) from emp),
3 (select count(*) from emp as of scn:scn)
4 /
COUNT(*) COUNT(*)
---------- ----------
0 14
test@ORCL>flashback table emp to scn:scn
2 ;
Flashback complete.
PL/SQL procedure successfully completed.
test@ORCL>print scn
SCN
----------
682621
test@ORCL>select count(*) from t;
COUNT(*)
----------
0
test@ORCL>drop table t;
Table dropped.
test@ORCL>flashback table t to scn:scn
2 ;
flashback table t to scn:scn
*
ERROR at line 1:
ORA-00942: table or view does not exist
这样无法恢复被删除的表
There is a table tb in database, use it to perform dropping table and flashbacking operation;
There is a index tb_index on table tb;
Drop table tb ;
Table tb is missing from system table tab;
The table tb deleted is in recyclebin.
The index on table tb is deleted also;
Use flashback command to restore the table had been deleted.
参考:http://www.sudu.cn/info/article/articleInfo.php?aId=196883
- flashback
- Flashback
- flashback
- flashback
- Flashback
- flashback
- flashback
- flashback
- flashback
- Flashback
- flashback
- flashback
- Flashback
- flashback
- Oracle Flashback----flashback drop
- flashback之flashback query
- flashback之flashback table
- flashback之flashback database
- 在update中使用case when更新列
- 终于明白那些企鹅是什么了
- linux关闭selinux
- QT phonon在windows下的编译( 转)
- ubunbu 系统安装注意的问题及网络设置
- Flashback
- ee
- libmemcached的Bug Patch
- 运行命令
- 数组集合+反射
- 大数值
- adb shell进入时执行的/system/bin/sh的原码
- 静态引入包
- JAVA5新特性“可变参数”