Oracle 11g 11.2.0.1.0 使用exp無法匯出空表的解決辦法

來源:互聯網
上載者:User

Oracle 11g(11.2.0.1.0)中有bug,當表無資料時,不分配segment

解決方案:

1、insert一行,再rollback就產生segment了。

該方法是在在空表中插入資料,再刪除,則產生segment。匯出時則可匯出空表。

2、設定deferred_segment_creation 參數

SQL>show parameter deferred_segment_creation

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

deferred_segment_creation            boolean     TRUE

SQL> alter system set deferred_segment_creation=false;

改變後只對之後的表起作用,並且需要重啟oracle服務才會生效

3、手動給空表分配空間

  1. DECLARE  
  2.   CURSOR EMPTY_TABLES IS  
  3.     SELECT TABLE_NAME FROM USER_TABLES WHERE NUM_ROWS = 0;  
  4. BEGIN  
  5.   FOR TAB IN EMPTY_TABLES LOOP    
  6.     EXECUTE IMMEDIATE 'alter table ' || TAB.TABLE_NAME || ' allocate extent';  
  7.   END LOOP;  
  8. END;  
  9. /  
11g(11.2.0.2.0)這個bug好像就修複了,建議用expdb 命令匯出。

聯繫我們

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