oracle 11g不能匯出空表的解決方法

2022-08-24 04:21:08 字數 524 閱讀 1903

select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0;

alter system set deferred_segment_creation=false;

注意:該值設定後只對後面新增的表產生作用,對之前建立的空表(已經存在的)不起作用,仍不能匯出。

並且要重新啟動資料庫,讓引數生效。

select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0 or num_rows is null;

但是:資料庫本身的deferred_segment_creation屬性還是true,也是就是說如果再建立新錶的話,預設還是不分配segment的。所以還是需要更改deferred_segment_creation的引數,以便以後建立的新錶自動分配segment。

oracle11g匯出空表

該引數意思是當建立物件 如表 初始時沒有資料,是否立即建立segment。預設是true。這會導致在按使用者匯出時,沒有segment的物件不會匯出。首先執行下面的語句 select alter table table name allocate extent from user tables wh...

oracle 11g匯出空表

oracle 11g 用exp命令匯出庫檔案備份時,發現只能匯出來一部分表而且不提示錯誤,之前找不到解決方案只能把沒匯出來的表重新建建立。後來發現是所有的空表都沒有匯出來。於是想好好查查,因為在以前的10g版本中沒有這樣的問題。查資料發現oracle 11g中有個新特性 新增了乙個引數 deferr...

oracle11g 空表匯出

oracle11g的新特性,資料條數是0時不分配segment,所以就不能被匯出。解決方法 1插入一條資料 或者再刪除 浪費時間,有時幾百張表會累死的。2建立資料庫之前 使用 sql alter system set deferred segment creation false 調整再建表 這兩種...