Database Reference
In-Depth Information
If you're using Oracle Database 11 g , the default LOB type is BasicFiles, therefore in Oracle 11 g , if you want to
create a SecureFiles LOB, you'll need to use the STORE AS SECUREFILE clause, as follows:
EODA@ORA11GR2> create table t
2 ( id int primary key,
3 txt clob
4 )
5 segment creation immediate
6 lob(txt) store as securefile
7 /
Table created.
Seemingly, LOBs are as simple to use as the NUMBER , DATE , or VARCHAR2 datatypes. Or are they? The prior small
examples show the tip of the iceberg—the bare minimum you can specify about a LOB. Using DBMS_METADATA , we can
get the entire picture:
EODA@ORA12CR1> select dbms_metadata.get_ddl( 'TABLE', 'T' ) from dual;
DBMS_METADATA.GET_DDL('TABLE','T')
--------------------------------------------------------------------------------
CREATE TABLE "EODA"."T"
( "ID" NUMBER(*,0),
"TXT" CLOB,
PRIMARY KEY ("ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ENABLE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS"
LOB ("TXT") STORE AS SECUREFILE (
TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192
NOCACHE LOGGING NOCOMPRESS KEEP_DUPLICATES
STORAGE(INITIAL 106496 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT))
As you can see, there are quite a few parameters. Before going into the details of these parameters, in the next
section I'll generate the same type of output for a BasicFiles LOB. This will provide a basis for discussing the various
LOB attributes.
 
Search WWH ::




Custom Search