Oracle DBMS_DBFS_SFS
Version 11.2
 
General Information
Purpose Specification for the "dbms_dbfs_sfs" and "dbms_dbfs_sfs_admin" packages. The SFS provider implements POSIX filesystem
Source {ORACLE_HOME}/rdbms/admin/dbmsfspi.sql
First Available 11.2

Constants
Name Data Type Value
Compression Parameters
compression_default VARCHAR2(32) ''
compression_low VARCHAR2(32) 'low'
compression_medium VARCHAR2(32) 'medium'
compression_high VARCHAR2(32) 'high'
Encryption Parameters
encryption_default VARCHAR2(32) ''
encryption_3des168 VARCHAR2(32) '3DES168'
encryption_aes128 VARCHAR2(32) 'AES128'
encryption_aes192 VARCHAR2(32) 'AES192'
encryption_aes256 VARCHAR2(32) 'AES256'
Partition Key Parameters
partition_by_item INTEGER 1
partition_by_path INTEGER 2
partition_by_guid INTEGER 3
nPartitions Parameters
default_partitions INTEGER 16

Dependencies
ALL_PROCEDURES DBMS_DBFS_CONTENT_LIST_ITEM_T
DBFS_SFS$_FS DBMS_DBFS_CONTENT_PROPERTIES_T
DBFS_SFS$_FSSEQ DBMS_DBFS_CONTENT_PROPERTY_T
DBFS_SFS$_FST DBMS_DBFS_CONTENT_RAW_T
DBFS_SFS$_FSTO DBMS_DBFS_HS
DBFS_SFS$_FSTP DBMS_DBFS_SFS_ADMIN
DBFS_SFS$_SNAP DBMS_DB_VERSION
DBFS_SFS$_TAB DBMS_LOB
DBFS_SFS$_VOL DUAL
DBMS_ASSERT PLITBLM
DBMS_DBFS_CONTENT SYS_STUB_FOR_PURITY_ANALYSIS
DBMS_DBFS_CONTENT_CONTEXT_T UTL_RAW
DBMS_DBFS_CONTENT_LIST_ITEMS_T  

Defined Data Types
TYPE table_t IS RECORD (
schema_name VARCHAR2(32),
table_name  VARCHAR2(32),
ptable_name VARCHAR2(32),
version#    VARCHAR2(32),
created     TIMESTAMP,
formatted   TIMESTAMP,
properties  dbms_dbfs_content_properties_t);

TYPE tables_t IS TABLE OF table_t;

TYPE volume_t IS RECORD (
schema_name   VARCHAR2(32),
table_name    VARCHAR2(32),
volume_name   VARCHAR2(128),
created       TIMESTAMP,
from_volume   VARCHAR2(128),
from_snapshot VARCHAR2(128));

TYPE volumes_t IS TABLE OF volume_t;

TYPE snapshot_t IS RECORD (
schema_name   VARCHAR2(32),
table_name    VARCHAR2(32),
volume_name   VARCHAR2(128),
snapshot_name VARCHAR2(128),
created       TIMESTAMP);

TYPE snapshots_t IS TABLE OF snapshot_t;

TYPE filesystem_t IS RECORD (
store_name    VARCHAR2(32),
schema_name   VARCHAR2(32),
table_name    VARCHAR2(32),
volume_name   VARCHAR2(128),
snapshot_name VARCHAR2(128),
created       TIMESTAMP);

TYPE filesystems_t IS TABLE OF filesystem_t;
Exceptions
Exception Number Exception Name
ORA-64007 Invalid Store Specified
Security Model Execute is granted to DBFS_ROLE. Runs with AUTHID CURRENT_USER.
 
CHECKACCESS

Check if a given pathname (store_name, path, pathtype) can be manipulated by "operation (see the various "dbms_dbfs_content.op_xxx" opcodes) by "principal")
dbms_dbfs_sfs.checkAccess(
store_name IN VARCHAR2,
path       IN VARCHAR2,
pathtype   IN INTEGER,
operation  IN VARCHAR2,
principal  IN VARCHAR2)
RETURN INTEGER;
TBD
 
CREATEDIRECTORY

Creates a directory in an existing store
dbms_dbfs_sfs.createDirectory(
store_name IN     VARCHAR2,
path       IN     VARCHAR2,
properties IN OUT NOCOPY dbms_dbfs_content_properties_t,
prop_flags IN     INTEGER,
recurse    IN     INTEGER,
ctx        IN     dbms_dbfs_content_context_t);
TBD
 
CREATEFILE

Stores a BLOB as a file in an existing store at an existing "path" location
dbms_dbfs_sfs.createFile(
store_name IN     VARCHAR2,
path       IN     VARCHAR2,
properties IN OUT NOCOPY dbms_dbfs_content_properties_t,
content    IN OUT NOCOPY BLOB,
prop_flags IN     INTEGER,
ctx        IN     dbms_dbfs_content_context_t);
TBD
 
CREATEFILESYSTEM

Create a file system, schema, in an existing 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  DEFAULT 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   DEFAULT default_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);
TBD
 
CREATELINK

Undocumented
dbms_dbfs_sfs.createLink(
store_name IN     VARCHAR2,
srcPath    IN     VARCHAR2,
dstPath    IN     VARCHAR2,
properties IN OUT NOCOPY dbms_dbfs_content_properties_t,
prop_flags IN     INTEGER,
ctx        IN     dbms_dbfs_content_context_t);
TBD
 
CREATEREFERENCE

Undocumented
dbms_dbfs_sfs.createReference(
store_name IN     VARCHAR2,
srcPath    IN     VARCHAR2,
dstPath    IN     VARCHAR2,
properties IN OUT NOCOPY dbms_dbfs_content_properties_t,
prop_flags IN     INTEGER,
ctx        IN     dbms_dbfs_content_context_t);
TBD
 
CREATESNAPSHOT
Creates a new snapshot on the specified store/volume dbms_dbfs_sfs.createSnapshot(
store_name IN VARCHAR2,
snap_name  IN VARCHAR2,
vol_name   IN VARCHAR2 DEFAULT 'main',
do_wait    IN BOOLEAN  DEFAULT TRUE);
TBD
 
CREATESTORE

A wrapper around createFilesystem
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 '');
TBD
 
DELETECONTENT
Undocumented dbms_dbfs_sfs.deleteContent(
store_name  IN VARCHAR2,
contentID   IN RAW,
filter      IN VARCHAR2,
soft_delete IN INTEGER,
ctx         IN dbms_dbfs_content_context_t);
TBD
 
DELETEDIRECTORY

Deletes a directory and reference elements (subject to store feature support)
dbms_dbfs_sfs.deleteDirectory(
store_name  IN VARCHAR2,
path        IN VARCHAR2,
filter      IN VARCHAR2,
soft_delete IN INTEGER,
recurse     IN INTEGER,
ctx         IN dbms_dbfs_content_context_t);
TBD
 
DELETEFILE

Deletes a file and reference elements (subject to store feature support)
dbms_dbfs_sfs.deleteFile(
store_name  IN VARCHAR2,
path        IN VARCHAR2,
filter      IN VARCHAR2,
soft_delete IN INTEGER,
ctx         IN dbms_dbfs_content_context_t);
TBD
 
DROPFILESYSTEM
It is necessary to run dropFilesystem or
unregisterFilesystem before a store table can be dropped
Overload 1
dbms_dbfs_sfs.dropFileSystem(
schema_name IN VARCHAR2 DEFAULT NULL,
tbl_name    IN VARCHAR2);
TBD
Overload 2 dbms_dbfs_sfs.dropFileSystem(store_name IN VARCHAR2);
exec dbms_dbfs_sfs.dropFilesystem('UWSTORE');
 
DROPSNAPSHOT

Drops the specified snapshot from the specified store/volume
dbms_dbfs_sfs.dropSnapshot(
store_name IN VARCHAR2,
snap_name  IN VARCHAR2,
vol_name   IN VARCHAR2 DEFAULT 'main',
do_wait    IN BOOLEAN  DEFAULT TRUE,
recurse    IN BOOLEAN  DEFAULT FALSE);
TBD
 
EXPORTFILESYSTEM
Export a file system (for general cross-schema use) by granting suitable permissions to the tables underlying the file ystem to the "dbfs_role" dbms_dbfs_sfs.exportFileSystem(
store_name IN VARCHAR2,
toUserRole IN VARCHAR2 DEFAULT 'DBFS_ROLE');
TBD
 
EXPORTTABLE
Export a table (for general cross-schema use) by granting suitable permissions to the tables underlying the file system to the "dbfs_role" dbms_dbfs_sfs.exportTable(
schema_name IN VARCHAR2 DEFAULT NULL,
tbl_name    IN VARCHAR2,
toUserRole  IN VARCHAR2 DEFAULT 'DBFS_ROLE');
TBD
 
GETFEATURES
Lookup repository features (see dbms_content.feature_XXX) dbms_dbfs_sfs.getFeatures(store_name IN VARCHAR2) RETURN VARCHAR2;
SELECT dbms_dbfs_sfs.getFeatures('UWSTORE') FROM dual;
 
GETPATH

Undocumented

Overload 1
dbms_dbfs_sfs.getPath(
store_name IN     VARCHAR2,
path       IN     VARCHAR2,
properties IN OUT NOCOPY dbms_dbfs_content_properties_t,
content       OUT NOCOPY BLOB,
item_type     OUT INTEGER,
prop_flags IN     INTEGER,
forUpdate  IN     INTEGER,
deref      IN     INTEGER,
ctx        IN     dbms_dbfs_content_context_t);
TBD
Overload 2 dbms_dbfs_sfs.getPath(
store_name IN     VARCHAR2,
path       IN     VARCHAR2,
properties IN OUT NOCOPY dbms_dbfs_content_properties_t,
amount     IN OUT NUMBER,
offset     IN     NUMBER,
buffer        OUT NOCOPY RAW,
prop_flags IN     INTEGER,
ctx        IN     dbms_dbfs_content_context_t);
TBD
Overload 3 dbms_dbfs_sfs.getPath(
store_name IN     VARCHAR2,
path       IN     VARCHAR2,
properties IN OUT NOCOPY dbms_dbfs_content_properties_t,
amount     IN OUT NUMBER,
offset     IN     NUMBER,
buffers       OUT NOCOPY dbms_dbfs_content_raw_t,
prop_flags IN     INTEGER,
ctx        IN     dbms_dbfs_content_context_t);
TBD
 
GETPATHBYSTOREID
Lookup pathnames by (store_name, std_guid) or (store_mount, std_guid) tuples. If the underlying "std_guid" is found in the underlying store, this function returns the store-qualified pathname. If the "std_guid" is unknown,  "null" is returned. dbms_dbfs_sfs.getPathByStoreId(
store_name IN VARCHAR2,
guid       IN INTEGER)
RETURN VARCHAR2;
TBD
 
GETPATHNOWAIT

Implies a "forUpdate", and, if implemented (see
"feature_nowait"), allows providers to return an exception (ORA-54) rather than wait for row locks
dbms_dbfs_sfs.getPathNoWait(
store_name IN     VARCHAR2,
path       IN     VARCHAR2,
properties IN OUT NOCOPY dbms_dbfs_content_properties_t,
content       OUT NOCOPY BLOB,
item_type     OUT INTEGER,
prop_flags IN     INTEGER,
deref      IN     INTEGER,
ctx        IN     dbms_dbfs_content_context_t);
TBD
 
GETSTOREID
Undocumented dbms_dbfs_sfs.getStoreId(store_name IN VARCHAR2) RETURN VARCHAR2;
SELECT dbms_dbfs_sfs.getStoreID('UWSTORE') FROM dual;
 
GETVERSION
Undocumented dbms_dbfs_sfs.getVersion(store_name IN VARCHAR2) RETURN VARCHAR2;
SELECT dbms_dbfs_sfs.getVersion('UWSTORE') FROM dual;
 
INITFS
Initializes a POSIX store dbms_dbfs_sfs.initFS(store_name IN VARCHAR2);
exec dbms_dbfs_sfs.initFS('UWSTORE');
 
LIST
List the contents of directory pathnames, optionally recursing into sub-directories, optionally seeing soft-deleted items, optionally using flashback "as of" a provided timestamp, and optionally filtering items in/out within the store based on list/search predicates. dbms_dbfs_sfs.list(
store_name IN VARCHAR2,
path       IN VARCHAR2,
filter     IN VARCHAR2,
recurse    IN INTEGER,
ctx        IN dbms_dbfs_content_context_t)
RETURN dbms_dbfs_content_list_items_t PIPELINED;
TBD
 
LISTFILESYSTEMS
List all registered POSIX filesystems dbms_dbfs_sfs.listFileSystems RETURN filesystem_t PIPELINED;
SELECT * FROM TABLE(dbms_dbfs_sfs.listFileSystems);
 
LISTSNAPSHOTS
List all snapshots available for POSIX store tables dbms_dbfs_sfs.listSnapshots RETURN snapshots_t PIPELINED;
SELECT * FROM TABLE(dbms_dbfs_sfs.listSnapshots);
 
LISTTABLES
List all available store tables and their properties dbms_dbfs_sfs.listTables RETURN tables_t PIPELINED;
SELECT * FROM TABLE(dbms_dbfs_sfs.listTables);
 
LISTVOLUMES
List all volumes available for POSIX store tables dbms_dbfs_sfs.listVolumes RETURN volumes_t PIPELINED;
SELECT * FROM TABLE(dbms_dbfs_sfs.listVolumes);
 
LOCKPATH
Clients of the DBFS API can apply user-level locks to any valid pathname (subject to store feature support), associate the lock with user-data, and subsequently unlock these pathnames

Overload 1
dbms_dbfs_sfs.lockPath(
store_name IN VARCHAR2,
path       IN VARCHAR2,
lock_type  IN INTEGER,
lock_data  IN VARCHAR2,
ctx        IN dbms_dbfs_content_context_t);
TBD
Overload 2 dbms_dbfs_sfs.lockPath(
store_name IN VARCHAR2,
path       IN VARCHAR2,
ctx        IN dbms_dbfs_content_context_t);
TBD
 
PURGEALL

Undocumented
dbms_dbfs_sfs.purgeAll(
store_name IN VARCHAR2,
path       IN VARCHAR2,
filter     IN VARCHAR2,
ctx        IN dbms_dbfs_content_context_t);
TBD
 
PURGEPATH

Undocumented
dbms_dbfs_sfs.purgePath(
store_name IN VARCHAR2,
path       IN VARCHAR2,
filter     IN VARCHAR2,
ctx        IN dbms_dbfs_content_context_t);
TBD
 
PUTPATH

Undocumented

Overload 1
dbms_dbfs_sfs.putPath(
store_name IN     VARCHAR2,
path       IN     VARCHAR2,
properties IN OUT NOCOPY dbms_dbfs_content_properties_t,
content    IN OUT NOCOPY BLOB,
item_type     OUT INTEGER,
prop_flags IN     INTEGER,
ctx        IN     dbms_dbfs_content_context_t);
TBD

Overload 2
dbms_dbfs_sfs.putPath(
store_name IN     VARCHAR2,
path       IN     VARCHAR2,
properties IN OUT NOCOPY dbms_dbfs_content_properties_t,
amount     IN     NUMBER,
offset     IN     NUMBER,
buffer     IN     RAW,
prop_flags IN     INTEGER,
ctx        IN     dbms_dbfs_content_context_t);
TBD

Overload 3
dbms_dbfs_sfs.putPath(
store_name IN     VARCHAR2,
path       IN     VARCHAR2,
properties IN OUT NOCOPY dbms_dbfs_content_properties_t,
written       OUT NUMBER,
offset     IN     NUMBER,
buffers    IN     dbms_dbfs_content_raw_t,
prop_flags IN     INTEGER,
ctx        IN     dbms_dbfs_content_context_t);
TBD
 
REGISTERFILESYSTEM
Undocumented dbms_dbfs_sfs.registerFileSystem(
store_name  IN VARCHAR2,
schema_name IN VARCHAR2,
tbl_name    IN VARCHAR2,
vol_name    IN VARCHAR2 DEFAULT 'main',
snap_name   IN VARCHAR2 DEFAULT NULL);
TBD
 
RENAMEPATH
Rename an existing path dbms_dbfs_sfs.renamePath(
store_name IN     VARCHAR2,
oldPath    IN     VARCHAR2,
newPath    IN     VARCHAR2,
properties IN OUT NOCOPY dbms_dbfs_content_properties_t,
ctx        IN     dbms_dbfs_content_context_t);
TBD
 
RESTOREALL
Undocumented dbms_dbfs_sfs.restoreAll(
store_name IN VARCHAR2,
path       IN VARCHAR2,
filter     IN VARCHAR2,
ctx        IN dbms_dbfs_content_context_t);
TBD
 
RESTOREPATH
Undocumented dbms_dbfs_sfs.restorePath(
store_name IN VARCHAR2,
path       IN VARCHAR2,
filter     IN VARCHAR2,
ctx        IN dbms_dbfs_content_context_t);
TBD
 
REVERTSNAPSHOT
Drops all snapshots/changes in the specified store/volume more recent than the specified snapshot dbms_dbfs_sfs.revertSnapshot(
store_name IN VARCHAR2,
snap_name  IN VARCHAR2,
vol_name   IN VARCHAR2 DEFAULT 'main',
do_wait    IN BOOLEAN  DEFAULT TRUE);
TBD
 
SEARCH
Search the contents of directory pathnames, optionally recursing into sub-directories, optionally seeing soft-deleted items, optionally using flashback "as of" a provided timestamp, and optionally filtering items in/out within the store based on list/search predicates. dbms_dbfs_sfs.search(
store_name IN VARCHAR2,
path       IN VARCHAR2,
filter     IN VARCHAR2,
recurse    IN INTEGER,
ctx        IN dbms_dbfs_content_context_t)
RETURN dbms_dbfs_content_list_items_t PIPELINED;
TBD
 
SETPATH
Undocumented dbms_dbfs_sfs.setPath(
store_name IN     VARCHAR2,
contentID  IN     RAW,
path       IN     VARCHAR2,
properties IN OUT NOCOPY dbms_dbfs_content_properties_t,
ctx        IN     dbms_dbfs_content_context_t);
TBD
 
SPACEUSAGE

Query file system space usage statistics
dbms_dbfs_sfs.spaceUsage(
store_name IN  VARCHAR2,
blksize    OUT INTEGER,  -- natural tablespace block size holding the repository
tbytes     OUT INTEGER,  -- total repository size in bytes
fbytes     OUT INTEGER,  -- free unused repository in bytes
nfile      OUT INTEGER,  -- number of currently available files
ndir       OUT INTEGER,  -- number of currently available directories
nlink      OUT INTEGER,  -- number of currently available links
nref       OUT INTEGER); -- number of references in the repository
set serveroutput on

DECLARE
 vBlkSize INTEGER;
 vTBytes  INTEGER;
 vFBytes  INTEGER;
 vNFile   INTEGER;
 vNDir    INTEGER;
 vNLink   INTEGER;
 vNRef    INTEGER;
BEGIN
 
dbms_dbfs_sfs.spaceUsage(???, vBlkSize, vTBytes, vFBytes, vNFile, vNDir, vNLink, vNRef);

  dbms_output.put_line(vBlkSize);
  dbms_output.put_line(vTBytes);
  dbms_output.put_line(vFBytes);
  dbms_output.put_line(vNFile);
  dbms_output.put_line(vNDir);
  dbms_output.put_line(vNLink);
  dbms_output.put_line(vNRef);
END;
/
 
UNLOCKPATH
Unldocumented dbms_dbfs_sfs.unlockPath(
store_name IN VARCHAR2,
path       IN VARCHAR2,
ctx        IN dbms_dbfs_content_context_t);
TBD
 
UNREGISTERFILESYSTEM
It is necessary to run dropFilesystem or
unregisterFilesystem before a store table can be dropped
dbms_dbfs_sfs.unregisterFileSystem(store_name IN VARCHAR2);
exec dbms_dbfs_sfs.unregisterFileSystem('UWSTORE');
 
Related Topics
DBMS_APBACKEND
DBMS_DBFS_CONTENT
DBMS_DBFS_CONTENT_ADMIN
DBMS_DBFS_CONTENT_SPI
DBMS_DBFS_HS
DBMS_DBFS_SFS_ADMIN
DBMS_SPACE
 
Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: