Oracle 11g R2新增加一種功能:deferred segment creation(延緩的區段建立)
也就是在建立新區段時,並不會立刻配置區段.而是延緩到區段第一次被新增資料列時,才真正配置區段
SQL> show parameter deferred_segment_creation
NAME TYPE VALUE
------------------------------ ----------- ------------------------------
deferred_segment_creation boolean TRUE
SQL> create user frank identified by oracle;
User created.
SQL> grant create session,create table to frank;
Grant succeeded.
SQL> create table frank.t1 (a number,b varchar2(10)) tablespace users;
Table created.
frank並沒有被設定配額(Quota)在users表格空間上,但是還是可以成功地建立t1表格
SQL> insert into frank.t1 values(1,'A');
insert into frank.t1 values(1,'A')
*
ERROR at line 1:
ORA-01950: no privileges on tablespace 'USERS'
因為延緩的區段建立的機制,所以現在才試圖建立區段,所以才會出現上面的錯誤訊息
SQL> select object_id,data_object_id from dba_objects
2 where object_name='T1' and object_type='TABLE' and owner='FRANK';
OBJECT_ID DATA_OBJECT_ID
---------- --------------
74695 74695
SQL> select segment_name,segment_type from dba_segments
2 where segment_name='T1' and owner='FRANK';
no rows selected