oracle閃回那些事

來源:互聯網
上載者:User

標籤: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閃回那些事

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.