oracle 資源回收筒 recyclebin

來源:互聯網
上載者:User
Oracle10g提供了類似作業系統中的資源回收筒功能。當drop table的時候,實際上只是將其重新命名,並將table以及相關聯的對象如index,constraint等放到資源回收筒(RecycleBin)中,後續如果發現drop錯了table,可以使用flashback table命名將資源回收筒中的table還原,這就是Oracle10g的Flashback Drop功能。1,  查看資源回收筒時候開啟     show parameters recyclebin;     2.如何啟用/禁用RecycleBin通過設定初始化參數recyclebin,可以控制是否啟用資源回收筒功能,預設是開啟的。SQL> alter system set recyclebin=off;系統已更改。SQL> alter system set recyclebin=on;系統已更改。SQL> alter session set recyclebin=off;會話已更改。SQL> alter session set recyclebin=on;會話已更改。3 SQL> create table goods    (id number(8),     good varchar2(20));表已建立。SQL> insert into goods values('1','pens');已建立 1 行。SQL> insert into goods values('2','banas');已建立 1 行。SQL> insert into goods values('3','king');已建立 1 行。SQL> commit;提交完成。SQL> select * from goods;        ID GOOD---------- --------------------         1 pens         2 banas         3 kingSQL> show parameters recyclebin;NAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------recyclebin                           string      ONSQL> drop table goods;表已刪除。SQL> show recyclebin;用於閃回資料SQL> flashback table goods to before drop;已經放到資源回收筒裡的表是不能用drop 命令刪除的(注意對象名字上的雙引號):PURGE  table   表名 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.