ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle中的回收站recyclebin

oracle中的回收站recyclebin

原创 Linux操作系统 作者:jack22220613 时间:2010-05-21 17:42:47 0 删除 编辑

oracle 10g中,加入了recyclebin的功能,即drop table 之后,还能用命令直接restore。

SQL> create table x (id number);

表已创建。

SQL> drop table x;

表已删除。

SQL> set serveroutput on
SQL> select * from user_tables where table_name ='X';

未选定行

SQL> flashback table x to before drop;

闪回完成。                                                                          

SQL> select 1 from user_tables where table_name ='X';

         1                                                                     
----------                                                                     
         1                                                                     

SQL> drop table x;

表已删除。

SQL> purge table x;

表已清除。

SQL> select 1 from user_tables where table_name ='X';

未选定行

SQL> flashback table x to before drop;
flashback table x to before drop
*
第 1 行出现错误:
ORA-38305: 对象不在回收站中

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10037372/viewspace-663392/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 基于函数的索引
请登录后发表评论 登录
全部评论

注册时间:2009-05-13

  • 博文量
    94
  • 访问量
    385663