ITPub博客

首页 > Linux操作系统 > Linux操作系统 > flashback初步

flashback初步

原创 Linux操作系统 作者:benn_wpj 时间:2008-06-04 10:27:22 0 删除 编辑

select flashback_on from v$database;

alter database flashback on;

select * from tab_name as of timestamp to_timestamp('2008-06-03 12:00:00','yyyy-mm-dd hh24:mi:ss) where column_name=value;   ## timestamp/scn

select sysdate from dual;

alter table tab_name enable row movement;

flashback table tab_name to timestamp to_timestamp('2008-06-03 12:00:00','yyyy-mm-dd hh24:mi:ss);

drop table tab_name;

show recyclebin;

select owner,original_name,object_name,ts_name,droptime,can_undrop,space from dba_recyclebin;    (space以db_block為單位)


select table_name,dropped from user_tables;

flashback table tab_name to before drop;

flashback table tab_name to before drop rename to tab_name2;

flashback table "BIN$TqcduaZU07bgQJQKLDcRfg==$0" to before drop;
 ## if table name forgot,list the name from recyclebin)

drop table tab_name purge;  ## drop table forever

purge recyclebin    ## clean the recyclebin

purge dba_recyclebin;  ## clean all of data owned by all user;


flashback database to scn scn_num;
flashback database to timestamp to_timestamp('2008-06-03 12:00:00','yyyy-mm-dd hh24:mi:ss);

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

上一篇: drop undo tablespace
下一篇: oracle空間壓縮
请登录后发表评论 登录
全部评论

注册时间:2008-04-26

  • 博文量
    57
  • 访问量
    137429