以下建表语句,指定红色部分可以使自动生成的分区包含的clob字段,放到默认表空间;否则放到用户默认表空间
CREATE TABLE TBL_SMS_LOG_NEW
(
N_SMS_LOGID NUMBER(20),
C_REQ_EMP VARCHAR2(300 BYTE),
C_REQ_DPT VARCHAR2(300 BYTE),
T_REQ_TM DATE,
C_REQ_TYPE VARCHAR2(20 BYTE),
C_REQ_CONTEXT CLOB,
C_RES_CODE VARCHAR2(50 BYTE),
C_RES_MSG VARCHAR2(2000 BYTE),
C_RES_CONTEXT CLOB,
C_SUCCESS_FLAG VARCHAR2(10 BYTE),
C_CASE_NO VARCHAR2(30 BYTE),
C_MOBILE_TEL VARCHAR2(50 BYTE),
C_PLY_NO VARCHAR2(30 BYTE),
C_SMS_INFOID VARCHAR2(30 BYTE)
)
LOB(C_REQ_CONTEXT) STORE AS (TABLESPACE CLAIM_LOB)
LOB(C_RES_CONTEXT) STORE AS (TABLESPACE CLAIM_LOB)
TABLESPACE CLAIM
PCTFREE 0
INITRANS 1
MAXTRANS 255
PARTITION BY RANGE (T_REQ_TM)
INTERVAL( NUMTOYMINTERVAL(6,'MONTH'))
(
PARTITION PART1406 VALUES LESS THAN (TO_DATE(' 2014-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
noLOGGING
COMPRESS
TABLESPACE CLAIM
LOB (C_REQ_CONTEXT) STORE AS
( TABLESPACE CLAIM_LOB
ENABLE STORAGE IN ROW
CHUNK 8192
RETENTION
NOCACHE
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
)
LOB (C_RES_CONTEXT) STORE AS
( TABLESPACE CLAIM_LOB
ENABLE STORAGE IN ROW
CHUNK 8192
RETENTION
NOCACHE
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
)
PCTFREE 0
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
BUFFER_POOL DEFAULT
)
);
CREATE TABLE TBL_SMS_LOG_NEW
(
N_SMS_LOGID NUMBER(20),
C_REQ_EMP VARCHAR2(300 BYTE),
C_REQ_DPT VARCHAR2(300 BYTE),
T_REQ_TM DATE,
C_REQ_TYPE VARCHAR2(20 BYTE),
C_REQ_CONTEXT CLOB,
C_RES_CODE VARCHAR2(50 BYTE),
C_RES_MSG VARCHAR2(2000 BYTE),
C_RES_CONTEXT CLOB,
C_SUCCESS_FLAG VARCHAR2(10 BYTE),
C_CASE_NO VARCHAR2(30 BYTE),
C_MOBILE_TEL VARCHAR2(50 BYTE),
C_PLY_NO VARCHAR2(30 BYTE),
C_SMS_INFOID VARCHAR2(30 BYTE)
)
LOB(C_REQ_CONTEXT) STORE AS (TABLESPACE CLAIM_LOB)
LOB(C_RES_CONTEXT) STORE AS (TABLESPACE CLAIM_LOB)
TABLESPACE CLAIM
PCTFREE 0
INITRANS 1
MAXTRANS 255
PARTITION BY RANGE (T_REQ_TM)
INTERVAL( NUMTOYMINTERVAL(6,'MONTH'))
(
PARTITION PART1406 VALUES LESS THAN (TO_DATE(' 2014-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
noLOGGING
COMPRESS
TABLESPACE CLAIM
LOB (C_REQ_CONTEXT) STORE AS
( TABLESPACE CLAIM_LOB
ENABLE STORAGE IN ROW
CHUNK 8192
RETENTION
NOCACHE
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
)
LOB (C_RES_CONTEXT) STORE AS
( TABLESPACE CLAIM_LOB
ENABLE STORAGE IN ROW
CHUNK 8192
RETENTION
NOCACHE
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
)
PCTFREE 0
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
BUFFER_POOL DEFAULT
)
);
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23944170/viewspace-2151527/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/23944170/viewspace-2151527/