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:
Overview
Security Model
Constants
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.
The DBMS_DBFS_SFS
package uses the constants shown in following tables:
Table 51-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 51-2 DBMS_DBFS_SFS Constants - Used by the encryption Parameter
Constant | Type | Value | Description |
---|---|---|---|
|
|
|
Use the default SecureFile encryption algorithm |
|
|
|
Use encryption 3DES 168 bit |
|
|
|
Use encryption AES 128 bit |
|
|
|
Use encryption AES 192 bit |
|
|
|
Use encryption AES 256 bit |
Table 51-3 DBMS_DBFS_SFS Constants - Used by the npartitions Parameter
Constant | Type | Value | Description |
---|---|---|---|
|
|
|
Default to 16 partitions |
Table 51-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 |
Table 51-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 |
This procedure creates a file system store.
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);
Table 51-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 DBMS_DBFS_SFS Constants - Compression Levels) |
|
If |
|
encryption algorithm to use (see DBMS_DBFS_SFS Constants - Used by the encryption Parameter) |
|
If |
|
Number of partitions to create for the table (see DBMS_DBFS_SFS Constants - Used by the npartitions Parameter). |
|
How to partition the table: by item name, by path name, or by GUID (see DBMS_DBFS_SFS Constants - Used by the partition_key Parameter). |
|
If |
|
If |
|
If |
This procedure creates a new DBFS SFS store owned by the invoking session user.
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 '');
Table 51-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 |
This procedure drops the DBFS SFS store, purging all dictionary information associated with the store, and dropping the underlying file system table.
DBMS_DBFS_SFS.DROPFILESYSTEM ( schema_name IN VARCHAR2 DEFAULT NULL, tbl_name IN INTEGER); DBMS_DBFS_SFS.DROPFILESYSTEM ( store_name IN VARCHAR2);
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.