flashback初步

上一篇 / 下一篇  2008-06-04 10:27:22 / 个人分类:資料庫備份與恢復

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);


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-09-08  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 610
  • 日志数: 28
  • 文件数: 6
  • 建立时间: 2008-04-26
  • 更新时间: 2008-09-03

RSS订阅

Open Toolbar