Case 1: DB_SECUREFILE=PERMITTED
This mode represents the ideal state of LOB creation. SecureFiles are created on ASSM tablespaces, while BasicFiles are created on both ASSM as well as non ASSM tablespaces.
Sample Code
----Set the DB_SECUREFILE parameter as PERMITTED----
SQL> ALTER SYSTEM SET DB_SECUREFILE=PERMITTED;
System altered.
Now, we shall CREATE TABLES WITH SecureFiles AND BasicFiles ON ASSM AND non ASSM tablespaces respectively AND observe the results.
----Create table with SecureFile column on ASSM tablespace----
SQL> CREATE TABLE PERMITTED_SECUREFILE_1
2 (DOC BLOB)
3 LOB(DOC) STORE AS SECUREFILE
4 TABLESPACE USERS;
TABLE created.
----Create table with SecureFile column on non ASSM tablespace----
SQL> CREATE TABLE PERMITTED_SECUREFILE_2
2 (DOC BLOB)
3 LOB(DOC) STORE AS SECUREFILE
4 TABLESPACE SYSTEM;
CREATE TABLE PERMITTED_SECUREFILE_2
*
ERROR at line 1:
ORA-43853: SECUREFILE lobs cannot be used IN non-ASSM tablespace "SYSTEM"
----Create table with BasicFile column on ASSM tablespace----
SQL> CREATE TABLE PERMITTED_BASICFILE_1
2 (DOC BLOB)
3 LOB(DOC) STORE AS BASICFILE
4 TABLESPACE USERS;
TABLE created.
----Create table with BasicFile column on non ASSM tablespace----
SQL> CREATE TABLE PERMITTED_BASICFILE_2
2 (DOC BLOB)
3 LOB(DOC) STORE AS BASICFILE
4 TABLESPACE SYSTEM;
TABLE created.
Copyright exforsys.com
The above table creation scripts reveal the ideal behavior 11g LOBs and
differentiate them with LOB prior to 11g. SecureFiles can only reside in ASSM
tablespace, while there is no such restriction on BasicFiles.
The dictionary view USER_LOBS lists the properties of an LOB column.
SECUREFILE is a new column added in USER_LOBS dictionary view. Let us query the
view to check the SECUREFILE feature of the above tables.

The query results show that Securefile has been enabled only for BLOB column
contained in the table PERMITTED_SECUREFILE_1.
Case 2: DB_SECUREFILE = ALWAYS
This mode of DB_SECUREFILE ensures that all the LOBs created on an ASSM
tablespace shall be treated as SecureFiles, irrespective of the LOB
specification (SecureFile or BasicFile). Only the BasicFile LOBs on non ASSM
tablespace shall be treated as BasicFile.
Sample Code
----Set the DB_SECUREFILE parameter as ALWAYS----
SQL> ALTER SYSTEM SET DB_SECUREFILE=ALWAYS;
System altered.
----Create table with SecureFile column on ASSM tablespace----
SQL> CREATE TABLE ALWAYS_SECUREFILE_1
2 (DOC BLOB)
3 LOB(DOC) STORE AS SECUREFILE
4 TABLESPACE USERS
5 /
TABLE created.
Still, a SecureFile cannot be created ON non ASSM tablespace.
----Create table with SecureFile column on non ASSM tablespace----
SQL> CREATE TABLE ALWAYS_SECUREFILE_2
2 (DOC BLOB)
3 LOB(DOC) STORE AS SECUREFILE
4 TABLESPACE SYSTEM
5 /
CREATE TABLE ALWAYS_SECUREFILE_2
*
ERROR at line 1:
ORA-43853: SECUREFILE lobs cannot be used IN non-ASSM tablespace "SYSTEM"
----Create table with BasicFile column on ASSM tablespace----
SQL> CREATE TABLE ALWAYS_BASICFILE_1
2 (DOC BLOB)
3 LOB(DOC) STORE AS BASICFILE
4 TABLESPACE USERS
5 /
TABLE created.
----Create table with BasicFile column on non ASSM tablespace----
SQL> CREATE TABLE ALWAYS_BASICFILE_2
2 (DOC BLOB)
3 LOB(DOC) STORE AS BASICFILE
4 TABLESPACE SYSTEM
5 /
TABLE created.
Copyright exforsys.com
Now, check the SecureFile property for the above tables in USER_LOBS view.

Observe that only the BasicFile on non ASSM tablespace is under BasicFile
category. Otherwise, all the LOB columns on ASSM tablespace are stored as
SecureFiles.
This tutorial is part of a Oracle 11g Tutorial tutorial series. Read it from the beginning and learn yourself.
H I D E