52 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:
52.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.
52.3 DBMS_DBFS_SFS Constants
The DBMS_DBFS_SFS
package uses the constants shown in the following tables.
Table 52-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 52-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 52-3 DBMS_DBFS_SFS Constants - Used by the npartitions Parameter
Constant | Type | Value | Description |
---|---|---|---|
|
|
|
Default to 16 partitions |
Table 52-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 |
52.4 Summary of DBMS_DBFS_SFS Subprograms
This table lists and describes the DBMS_DBFS_SFS
Package subprograms.
Table 52-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 |
52.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 52-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 52-1) |
|
If |
|
encryption algorithm to use (see Table 52-2) |
|
If |
|
Number of partitions to create for the table (see Table 52-3). |
|
How to partition the table: by item name, by path name, or by GUID (see Table 52-4). |
|
If |
|
If |
|
If |
Usage Notes
The procedure executes like a DDL in that it auto-commits before and after its execution.
52.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 52-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 |
52.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 52-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.
52.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 52-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.