55 DBMS_DBFS_SFS
The DBMS_DBFS_SFS
package provides an interface to operate a SecureFile-based store (SFS) for the content interface described in the DBMS_DBFS_CONTENT
package.
This chapter contains the following topics:
55.1 DBMS_DBFS_SFS Overview
The DBMS_DBFS_SFS
package is a sample implementation of a package that implements and extends the DBMS_DBFS_CONTENT_SPI
interface. It provides a POSIX-compliant file system stored in the RDBMS.
55.3 DBMS_DBFS_SFS Constants
The DBMS_DBFS_SFS
package uses the constants shown in the following tables.
Oracle has deprecated the older encryptions and hashing algorithms. The deprecated
algorithms for DBMS_CRYPTO
and native network encryption include
MD4, MD5, DES, 3DES, and RC4-related algorithms as well as 3DES for Transparent Data
Encryption (TDE). Removing older, less secure cryptography algorithms prevents
accidental use of these algorithms. To meet your security requirements, Oracle
recommends that you use more modern cryptography algorithms, such as the Advanced
Encryption Standard (AES).
Table 55-1 DBMS_DBFS_SFS Constants - Compression Levels
Constant | Type | Value | Description |
---|---|---|---|
|
|
|
Use the default SecureFile compression level |
|
|
|
Use compression level |
|
|
|
Use compression level |
|
|
|
Use compression level |
Table 55-2 DBMS_DBFS_SFS Constants - Used by the encryption Parameter
Constant | Type | Value | Description |
---|---|---|---|
|
|
|
Use the default SecureFile encryption algorithm |
|
|
|
Use encryption AES 128 bit |
|
|
|
Use encryption AES 192 bit |
|
|
|
Use encryption AES 256 bit |
Table 55-3 DBMS_DBFS_SFS Constants - Used by the npartitions Parameter
Constant | Type | Value | Description |
---|---|---|---|
|
|
|
Default to 16 partitions |
Table 55-4 DBMS_DBFS_SFS Constants - Used by the partition_key Parameter
Constant | Type | Value | Description |
---|---|---|---|
|
|
|
Use a hash of the item name for the partition key |
|
|
|
Use a hash of the path name for the partition key |
|
|
|
Use a hash of the GUID as the partition key |
55.4 Summary of DBMS_DBFS_SFS Subprograms
This table lists and describes the DBMS_DBFS_SFS
Package subprograms.
Table 55-5 DBMS_DBFS_SFS Package Subprograms
Subprogram | Description |
---|---|
Creates a file system store |
|
Creates a new DBFS SFS store |
|
Drops the DBFS SFS store |
|
Initializes a POSIX file system store |
55.4.1 CREATEFILESYSTEM Procedure
This procedure creates a file system store.
Syntax
DBMS_DBFS_SFS.CREATEFILESYSTEM ( store_name IN VARCHAR2, schema_name IN VARCHAR2 DEFAULT NULL, tbl_name IN VARCHAR2 DEFAULT NULL, tbl_tbs IN VARCHAR2 DEFAULT NULL, lob_tbs IN VARCHAR2 DEFAULT NULL, use_bf IN BOOLEAN DEFAULT FALSE, properties IN DBMS_DBFS_CONTENT_PROPERTIES_T DEFAULT NULL, create_only IN BOOLEAN FALSE, use_objects IN BOOLEAN DEFAULT FALSE, with_grants IN BOOLEAN DEFAULT FALSE, do_dedup IN BOOLEAN DEFAULT FALSE, do_compress IN BOOLEAN DEFAULT FALSE compression IN VARCHAR2 DEFAULT COMPRESSION_DEFAULT, do_encrypt IN BOOLEAN DEFAULT FALSE, encryption IN VARCHAR2 DEFAULT ENCRYPTION_DEFAULT, do_partition IN BOOLEAN DEFAULT FALSE, npartitions IN NUMBER DEFAULTDEFAULT_PARTITIONS, partition_key IN NUMBER DEFAULT PARTITION_BY_ITEM, partition_guidi IN BOOLEAN DEFAULT FALSE, partition_pathi IN BOOLEAN DEFAULT FALSE, partition_prop IN BOOLEAN DEFAULT TRUE);
Parameters
Table 55-6 CREATEFILESYSTEM Procedure Parameters
Parameter | Description |
---|---|
|
Name of store |
|
Schema for the store, defaulting to the current schema |
|
Table for store entries. If not specified, an internally generated name is used. |
|
Tablespace for the store, defaulting to the schema's default tablespace |
|
Tablespace in which to create the LOB segment. It defaults to the user's default tablespace. |
|
If |
|
Table of (name, value, typecode) tuples used to configure the store properties. Currently no such properties are defined or used. |
|
If |
|
If |
|
If |
|
If |
|
If |
|
Compression algorithm to use (see Table 55-1) |
|
If |
|
encryption algorithm to use (see Table 55-2) |
|
If |
|
Number of partitions to create for the table (see Table 55-3). |
|
How to partition the table: by item name, by path name, or by GUID (see Table 55-4). |
|
If |
|
If |
|
If |
Usage Notes
The procedure executes like a DDL in that it auto-commits before and after its execution.
55.4.2 CREATESTORE Procedure
This procedure creates a new DBFS SFS store owned by the invoking session user.
Syntax
DBMS_DBFS_SFS.CREATESTORE ( store_name IN VARCHAR2, tbl_name IN VARCHAR2 DEFAULT NULL, tbs_name in VARCHAR2 DEFAULT NULL, use_bf in BOOLEAN DEFAULT FALSE, stgopts in VARCHAR2 DEFAULT '');
Parameters
Table 55-7 CREATESTORE Procedure Parameters
Parameter | Description |
---|---|
|
Name of store |
|
|
|
Placeholder for the store content cached in database |
|
Named tablespace |
|
If |
|
Currently non-operational, reserved for future use |
55.4.3 DROPFILESYSTEM Procedures
This procedure drops the DBFS SFS store, purging all dictionary information associated with the store, and dropping the underlying file system table.
Syntax
DBMS_DBFS_SFS.DROPFILESYSTEM ( schema_name IN VARCHAR2 DEFAULT NULL, tbl_name IN INTEGER); DBMS_DBFS_SFS.DROPFILESYSTEM ( store_name IN VARCHAR2);
Parameters
Table 55-8 DROPFILESYSTEM Procedure Parameters
Parameter | Description |
---|---|
|
Name of schema |
|
Name of tablespace |
|
Name of store path |
Usage Notes
-
If the specified store table is registered by the current user, it will be unregistered from the content interface described in the
DBMS_DBFS_CONTENT
package and the POSIX metadata tables. -
Subsequent to unregistration, an attempt will be made to store table(s). This operation may fail if other users are currently using this store table.
-
The user attempting a drop of the tables underlying the store must actually have the privileges to complete the drop operation (either as the owner of the tables, or as a sufficiently privileged user for cross-schema operations).
-
The procedure executes like a DDL in that it auto-commits before and after its execution.
55.4.4 INITFS Procedure
This procedure initialize a POSIX file system store. The table associated with the POSIX file system store store_name
is truncated and reinitialized with a single "root" directory entry.
Syntax
DBMS_DBFS_SFS.INITFS ( store_name IN VARCHAR2);
Parameters
Table 55-9 INITFS Procedure Parameters
Parameter | Description |
---|---|
|
Name of store |
Usage Notes
The procedure executes like a DDL in that it auto-commits before and after its execution.