SecureFiles - using, licensing and changes in 12c
SecureFiles were introduced in 11gR1 as a replacement for (or better enhancement of) existing LOB storage architecture (now known as BasicFiles) which used to be the default storage until 12cR1. You can of course use both types together in the same table.
Idea behind this post is to discuss changes in12c and also to eliminate confusion which is still around this feature and this confusion is very often created due to misinterpretation of Licensing terms.
The irony is that there are some companies specialized for Software Asset Management are very often providing partial or vague information which creates misinterpretations and confusion on customer's side or even worse they are presenting these misinterpretations to customers.
First of all there is no licensing implication in use of SecureFiles (you don't have to pay additional fees) unless you are using any of option such as Compression, Deduplication or Encryption.
According to Oracle Database documentation and Oracle Database Licensing information you need license only for:
- Compression - Advanced Compression option
- Deduplication - Advanced Compression option
- Encryption - Advanced Security option
Let's create a tables using standard command without additional options.
SYS@ORA11GR2:SQL> CREATE TABLE test.t1 ( a CLOB, b BLOB) LOB(a, b) STORE AS SECUREFILE;
Table created.
SYS@ORA11GR2:SQL> col table_name format a15
SYS@ORA11GR2:SQL> col segment_name format a32
SYS@ORA11GR2:SQL> select table_name, segment_name, securefile, encrypt, compression, deduplication from dba_lobs where owner = 'TEST';
TABLE_NAME SEGMENT_NAME SEC ENCR COMPRE DEDUPLICATION
--------------- -------------------------------- --- ---- ------ ---------------
T1 SYS_LOB0000024831C00001$$ YES NO NO NO
T1 SYS_LOB0000024831C00002$$ YES NO NO NO
If you see similar output everything is fine and you're not required to pay any additional licensed option. There is a quotation of Kevin Jernigan, Senior Director Product Management at Oracle which confirm this conclusion:
"The change we made in Oracle Database 12c wrt SecureFiles and LOBs is that SecureFiles is now the default. So, when you create a LOB column in a table, if you don't specify BasicFiles or SecureFiles, it will default to SecureFiles. There is no change to licensing requirements - SecureFiles is available in all editions of Oracle Database 12c with no licensing requirements beyond the database license, and using the compression and deduplication features of SecureFiles LOBs requires licensing the Advanced Compression Option.
-KJ"
Above statement talks about another important change which comes with 12cR1. SecureFiles is now default LOB storage. Until now you had to specify using of SecureFiles explicitly, now it's implicit. Let's check it.
SYS@ORA12CR1:SQL> CREATE TABLE test.t1 ( a CLOB, b BLOB);
Table created.
SYS@ORA12CR1:SQL> col table_name format a15
SYS@ORA12CR1:SQL> col segment_name format a32
SYS@ORA12CR1:SQL> select table_name, segment_name, securefile, encrypt, compression, deduplication from dba_lobs where owner = 'TEST';
TABLE_NAME SEGMENT_NAME SEC ENCR COMPRE DEDUPLICATION
--------------- -------------------------------- --- ---- ------ ---------------
T1 SYS_LOB0000024836C00001$$ YES NO NO NO
T1 SYS_LOB0000024836C00002$$ YES NO NO NO
This behaviour is caused by change of default value of DB_SECUREFILE instance parameter from PERMITTED to PREFERRED.
Note that this parameter affects results of upgrade to 12c. Consider to remove (if explicitly set) this parameter before upgrade database.
Results of upgrade when DB_SECUREFILE is set to PERMITTED (default value for 11gR1 and 11gR2), PREFERRED (default value for 12cR1) and ALWAYS:
SYS@ORA12CR1> col owner format a20
SYS@ORA12CR1> select distinct owner, count(*) from dba_lobs where securefile = 'YES' group by owner;
OWNER COUNT(*)
-------------------- ----------
GSMADMIN_INTERNAL 1
XDB 291
SYS 19
Results of upgrade when DB_SECUREFILE is set to NEVER or IGNORE:
SYS@ORA12CR1> col owner format a20
SYS@ORA12CR1> select distinct owner, count(*) from dba_lobs where securefile = 'YES' group by owner;
no rows selected
Another change which comes with Oracle Database 12c is support for parallel DML operations for LOB columns stored as SecureFiles LOBs in non-partitioned tables and Direct load support for SecureFiles LOB columns that have context index defined on them. This extends Parallel DML functionality introduced in Oracle Database 11gR2. Note Parallel DML support applies also to BasicFiles in case of partitioned tables.
To be continued...