溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

oracle 11g exp默認空表不導(dǎo)出 原因及解決方法

發(fā)布時間:2020-06-29 06:26:23 來源:網(wǎng)絡(luò) 閱讀:738 作者:張marlie 欄目:關(guān)系型數(shù)據(jù)庫

在oracle11g中,每張表在起初創(chuàng)建時,默認是不分配區(qū)段給此對象。

當(dāng)首次插入數(shù)據(jù)時,會分配對應(yīng)的區(qū)段。

對應(yīng)控制參數(shù)為 deferred_segment_creation=true

如果要保持跟低版本保持一致的屬性,可以設(shè)定此參數(shù)值為flase

alter system set deferred_segment_creation=false scope=both;

在后續(xù)創(chuàng)建的新表中,會默認分配區(qū)段。


如果參數(shù)值設(shè)定為true,即使在創(chuàng)建表時指定具體的存儲參數(shù)來獲取初始區(qū)段大小,也不會分配對應(yīng)區(qū)段。

eg:

create table A_ALLOCAT_EXTENT

(

  userno   NUMBER,

  username VARCHAR2(20 CHAR)

)

tablespace USERS

  pctfree 10

  initrans 1

  maxtrans 255

  storage

  (

    initial 64K

    next 1M

    minextents 1

    maxextents unlimited

  );

SQL> select * from user_extents t where t.segment_name = 'A_ALLOCAT_EXTENT';


no rows selected


在設(shè)定參數(shù)值為false后,需要把沒有分配區(qū)段的表,增加區(qū)段。

獲取沒有分區(qū)的表名:

select table_name from user_tables

minus

select segment_name from user_segments 


然后執(zhí)行分區(qū)語句進行分配:

alter table A_ALLOCAT_EXTENT allocate extent (size 8K); -- 大小自己定義

向AI問一下細節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI