標籤:database oracle 資源回收筒 資料庫 資訊
開啟閃回資料庫
alter database flashback on;
alter database open;
修改日期時間顯示格式:
alter session set nls_date_format=‘yyyy-mm-dd hh24:mi:ss‘;
查看系統檢視表 v$flashback_database_log中查看閃回資料庫日誌資訊:
select * from v$flashback_database_log;
閃回資料庫:
flashback database to timestamp(to_date(‘2014-10-11 12:20:11‘,‘yyyy-mm-dd hh24:mi:ss‘));
閃回恢複後需要resetlogs 或者noresetlogs 開啟:
alter database open resetlogs/noresetlogs;
閃回表:
flashback table tablename to timestamp(to_date(‘2014-11-10 12:12:12‘,‘yyyy-mm-dd hh24:mi:ss‘));
閃回資源回收筒:
flashback table tablename to before drop;
刪除資源回收筒中的資料可以使用以下命令:;
purge table tablename;
清空資源回收筒:
purge dba_recyclebin;
閃回查詢:
select * from tablename as of timestamp to timestamp(to_date(‘2014-11-12 10:10:10‘,‘yyyy-mm-dd hh24:mi:ss‘)) where ....;
閃回版本查詢:
select versions_starttime,version_operation,name,score from tablename versions between timestamp minvalue and maxvalue;
閃回事務查詢:
select table_name,undo_sql from flashback_tracsaction_query where rownum<5;
本文出自 “積累中成長” 部落格,請務必保留此出處http://5200644.blog.51cto.com/5190644/1575173
oracle閃回那些事