ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
Purpose
This package is an API service provider, underneath DBMS_DBFS_CONTENT that enables use of tape or Amazon S3 web service as store for data.
The data on tape (or Amazon S3 web service) is part of the Oracle Database and can be accessed through all standard APIs, but only via the database.
DBMS_DBFS_HS package provides users the ability to use tape (or Amazon S3 web service) as a storage tier when doing Information Lifecycle Management of their content.
AUTHID
CURRENT_USER
Constants
Name
Data Type
Value
createStore Methods
STORETYPE_AMAZONS3
VARCHAR2(50)
'HS_S3'
STORETYPE_TAPE
VARCHAR2(50)
'HS_TAPE'
setStoreProperty Properties
PROPNAME_BUCKET
VARCHAR2(50)
'BUCKET'
PROPNAME_CACHESIZE
VARCHAR2(50)
'CACHE_SIZE'
PROPNAME_COMPRESSLEVEL
VARCHAR2(50)
'COMPRESSION_LEVEL'
PROPVAL_COMPLVL_HIGH
VARCHAR2(50)
'HIGH'
PROPNAME_HTTPPROXY
VARCHAR2(50)
'HTTP_PROXY'
PROPNAME_LICENSEID
VARCHAR2(50)
'LICENSE_ID'
PROPNAME_LOBCACHE_QUOTA
VARCHAR2(50)
'LOBCACHE_QUOTA'
PROPVAL_COMPLVL_LOW
VARCHAR2(50)
LOW'
PROPNAME_MEDIAPOOL
VARCHAR2(50)
'MEDIA_POOL'
PROPVAL_COMPLVL_MEDIUM
VARCHAR2(50)
'MEDIUM'
PROPVAL_COMPLVL_NONE
VARCHAR2(50)
'NONE'
PROPNAME_OPTTARBALLSIZE
VARCHAR2(50)
'OPTIMAL_TARBALL_SIZE'
PROPNAME_READCHUNKSIZE
VARCHAR2(50)
'READ_CHUNK_SIZE'
PROPNAME_SBTLIBRARY
VARCHAR2(50)
'SBT_LIBRARY'
PROPNAME_S3HOST
VARCHAR2(50)
'S3_HOST'
PROPNAME_WALLET
VARCHAR2(50)
'WALLET'
PROPNAME_ALIAS
VARCHAR2(50)
'WALLET_ALIAS'
PROPNAME_WRITECHUNKSIZE
VARCHAR2(50)
'WRITE_CHUNK_SIZE'
LRU timestamp update frequency
PROPNAME_LRUTS_UPD_FREQ
VARCHAR2(50)
'LRUTS_UPD_FREQ'
PROPVAL_CHUNKSIZE
VARCHAR2(50)
'1048576'
PROPVAL_MAXBF_S3
NUMBER
3154728
Miscellaneous
PROPNAME_ENABLECLEANUPONDELETE
VARCHAR2(50)
'ENABLE_CLEANUP_ON_DELETE'
PROPNAME_MAX_BACKUPFILE_SIZE
VARCHAR2(50)
'MAX_BACKUPFILE_SIZE'
PROPNAME_STORE_TYPE
VARCHAR2(50)
'STORE_TYPE'
PROPNAME_STREAMABLE
VARCHAR2(50)
'STREAMABLE'
FAIL
NUMBER
0
SUCCESS
NUMBER
1
ERROR
NUMBER
2
Data Types
CREATE OR REPLACE TYPE dbms_dbfs_hs_item_t AUTHID DEFINER AS OBJECT (
storename VARCHAR2(32),
storeowner VARCHAR2(32),
path VARCHAR2(1024),
contentfilename VARCHAR2(1024));
/
CREATE OR REPLACE TYPE dbms_dbfs_hs_litems_t
AS TABLE OF dbms_dbfs_hs_item_t;
/
dbms_dbfs_hs.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);
dbms_dbfs_hs.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);
dbms_dbfs_hs.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);
dbms_dbfs_hs.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);
Creates a new HS store in the schema under the ownership of the invoking session user."tbl_name" in tablespace "tbs_space" is a placeholder of the store content cached in database.
A "cache_size" worth of space will be used by the store to cache content in "tbs_name".
dbms_dbfs_hs.createStore(
store_name IN VARCHAR2,
store_type IN VARCHAR2,
tbl_name IN VARCHAR2,
tbs_name IN VARCHAR2,
cache_size IN NUMBER,
lob_cache_quota IN NUMBER DEFAULT NULL,
optimal_tarball_size IN NUMBER DEFAULT NULL,
schema_name IN VARCHAR2 DEFAULT NULL);
dbms_dbfs_hs.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);
dbms_dbfs_hs.getPath(
store_name IN VARCHAR2,
path IN VARCHAR2,
properties IN OUT NOCOPY dbms_dbfs_content_properties_t,
content OUT BLOB,
item_type OUT INTEGER,
prop_flags IN INTEGER,
forUpdate IN INTEGER,
deref in IN INTEGER,
ctx IN dbms_dbfs_content_context_t);
TBD
Overload 2
dbms_dbfs_hs.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 RAW,
prop_flags IN INTEGER,
ctx IN dbms_dbfs_content_context_t);
TBD
Overload 3
dbms_dbfs_hs.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 dbms_dbfs_content_raw_t,
prop_flags IN INTEGER,
ctx IN dbms_dbfs_content_context_t);
dbms_dbfs_hs.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);
Retrieves the values of a property, identified by PropertyName, of a store from the database.
If NoExcp is false, an exception is raised if the property does not exist. If noexcp is true, null is returned if the property does not exist.
dbms_dbfs_hs.getStoreProperty(
store_name IN VARCHAR2,
property_name IN VARCHAR2,
noexcp IN BOOLEAN DEFAULT FALSE)
RETURN VARCHAR2;
dbms_dbfs_hs.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;
dbms_dbfs_hs.putPath(
repos_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_hs.putPath(
repos_name IN VARCHAR2,
path IN VARCHAR2,
properties IN OUT NOCOPY dbms_dbfs_content_properties_t,
amount IN NUMBER,
offset IN NUMBER,
buffers OUT RAW,
prop_flags IN INTEGER,
ctx IN dbms_dbfs_content_context_t);
TBD
Overload 3
dbms_dbfs_hs.putPath(
repos_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);
Registers commands for a store with the Archive Provider to be sent to the Media Manager for the external storage device associated with the repository
dbms_dbfs_hs.reconfigCache(
repos_name IN VARCHAR2,
cache_size IN NUMBER DEFAULT NULL,
lob_cache_quota IN NUMBER DEFAULT NULL,
optimal_tarball_size IN NUMBER DEFAULT NULL);
To begin pushing data to or getting data from an external store, first begin an API session (to talk to the store), and after beginning the session, send all registered messages to the store before writing data
dbms_dbfs_hs.registerReposCommand(
repos_name IN VARCHAR2,
message IN VARCHAR2,
flags IN NUMBER);
BEFORE_PUT CONSTANT NUMBER := 1;
BEFORE_GET CONSTANT NUMBER := 2;
dbms_dbfs_hs.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);
dbms_dbfs_hs.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;
dbms_dbfs_hs.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);
dbms_dbfs_hs.spaceUsage(
store_name IN VARCHAR2,
blksize OUT INTEGER,
tbytes OUT INTEGER,
fbytes OUT INTEGER,
nfile OUT INTEGER,
ndir OUT INTEGER,
nlink OUT INTEGER,
nref OUT INTEGER);