PL/SQL Packages and Types Reference 10g Release 1 (10.1) Part Number B10802-01 |
|
|
View PDF |
The DBMS_XDB
package supports the following features:
This chapter contains the following topics:
The DBMS_XDB
package supports the following features:
LINK Procedure
, EXISTSRESOURCE Function
, LOCKRESOURCE Function
, GETLOCKTOKEN Procedure
, UNLOCKRESOURCE Function
, CREATERESOURCE Functions
, RENAMERESOURCE Procedure
, DELETERESOURCE Procedure
, GETRESOID Function
, CREATEOIDPATH Function
, REBUILDHIERARCHICALINDEX Procedure
and CREATEFOLDER Function
methods, which complement Resource Views.CHECKPRIVILEGES Function
, GETACLDOCUMENT Procedure
, CHANGEPRIVILEGES Function
and GETPRIVILEGES Function
for Oracle Resources. ACLCHECKPRIVILEGES Function
provides access to Oracle's ACL-based Security mechanism without storing objects in the Hierarchy.CFG_REFRESH Procedure
, CFG_GET Function
and CFG_UPDATE Procedure
. methods.GETXDB_TABLESPACE Function
and MOVEXDB_TABLESPACE Procedure
enable movement of schemas to a specified tablespace, and support the default SYSAUX
tablespace introductionThis function checks access privileges granted to the current user by specified ACL document by the OWNER
of the resource. Returns positive integer if all privileges are granted.
DBMS_XDB.ACLCHECKPRIVILEGES( acl_path IN VARCHAR2, owner IN VARCHAR2, privs IN xmltype) RETURN PLS_INTEGER;
Parameter | Description |
---|---|
|
Absolute path in the Hierarchy for ACL document. |
|
Resource owner name; the pseudo user "DAV:owner" is replaced by this user during ACL privilege resolution. |
|
An |
This function retrieves the session's configuration information as an XMLType
instance.
DBMS_XDB.CFG_GET RETURN SYS.XMLType;
This procedure refreshes the session's configuration information to the latest configuration.
DBMS_XDB.CFG_REFRESH;
This procedure updates the configuration information and commits the change.
DBMS_XDB.CFG_UPDATE( xdbconfig IN SYS.XMLTYPE);
Parameter | Description |
---|---|
|
The new configuration data. |
This function adds the given ACE to the given resource's ACL.
DBMS_XDB.CHANGEPRIVILEGES( res_path IN VARCHAR2, ace IN xmltype) RETURN PLS_INTEGER;
It returns a positive integer if the ACL was successfully modified.
If no ACE with the same principal and the same operation (grant
/deny
) already exists in the ACL, the new ACE is added at the end of the ACL.
This function checks access privileges granted to the current user on the specified resource.
DBMS_XDB.CHECKPRIVILEGES( res_path IN VARCHAR2, privs IN xmltype) RETURN PLS_INTEGER;
Parameter | Description |
---|---|
|
Absolute path in the Hierarchy for resource. |
|
An |
Returns positive integer if all requested privileges granted.
This function creates a new folder resource in the hierarchy.
DBMS_XDB.CREATEFOLDER( path IN VARCHAR2) RETURN BOOLEAN;
Parameter | Description |
---|---|
|
Path name for the new folder. |
Returns TRUE
if operation successful; FALSE
, otherwise.Returns TRUE
if operation successful; FALSE
, otherwise.
The given path name's parent folder must already exist in the hierarchy: if '/folder1/folder2'
is passed as the path parameter, then '/folder1'
must already exist.
This function creates a virtual path to the resource based on object ID.
DBMS_XDB.CREATEOIDPATH( oid IN RAW) RETURN VARCHAR2;
Parameter | Description |
---|---|
|
Object ID of the resource. |
The functions create a new resource. The description of the overload options precede each version of the syntax
Creates a new resource with the given string as its contents:
DBMS_XDB.CREATERESOURCE( path IN VARCHAR2, data IN VARCHAR2) RETURN BOOLEAN;
Creates a new resource with the given XMLType
data as its contents:
DBMS_XDB.CREATERESOURCE( path IN VARCHAR2, data IN SYS.XMLTYPE) RETURN BOOLEAN;
Given a REF
to an existing XMLType
row, creates a resource whose contents point to that row. That row should not already exist inside another resource:
DBMS_XDB.CREATERESOURCE( path IN VARCHAR2, datarow IN REF SYS.XMLTYPE) RETURN BOOLEAN;
Creates a resource with the given BLOB
as its contents, and specifies character set of the source BLOB
:
DBMS_XDB.CREATERESOURCE( path IN VARCHAR2, data IN BLOB, csid IN NUMBER :=0) RETURN BOOLEAN;
Creates a resource with the given BFILE
as its contents, and specifies character set of the source BFILE
:
DBMS_XDB.CREATERESOURCE( path IN VARCHAR2, data IN BFILE, csid IN NUMBER :=0) RETURN BOOLEAN;
Creates a resource with the given CLOB
as its contents:
DBMS_XDB.CREATERESOURCE( path IN VARCHAR2, data IN CLOB) RETURN BOOLEAN;
Parameter | Description |
---|---|
|
Path name of the resource to create. The path name's parent folder must already exist in the hierarchy. In other words, if |
|
The new resource's contents. The data will be parsed to check if it contains a schema-based XML document, and the contents will be stored as schema-based in the schema's default table. Otherwise, it will be saved as binary data. |
|
|
|
Character set id of the document. Must be a valid Oracle id; otherwise returns an error. If a zero CSID is specified then the data is defaulted to the database character set. Otherwise, the encoding of the data is determined as follows:
|
Returns TRUE
if operation successful; FALSE
, otherwise.
This procedure deletes a resource from the hierarchy.
DBMS_XDB.DELETERESOURCE( path IN VARCHAR2, delete_option IN PLS_INTEGER);
Parameter | Description |
---|---|
|
Path name of the resource to delete. |
|
The option that controls how a a resource is deleted; defined in Table 108-1: |
This function indicates if a resource is in the hierarchy. Matches resource by a string that represents its absolute path.
DBMS_XDB.EXISTSRESOURCE( abspath IN VARCHAR2) RETURN BOOLEAN;
Parameter | Description |
---|---|
|
Path name of the resource whose ACL document is required. |
Returns TRUE
if the resource is found.
This procedure retrieves ACL document that protects resource given its path name.
DBMS_XDB.GETACLDOCUMENT( abspath IN VARCHAR2) RETURN sys.xmltype;
Parameter | Description |
---|---|
|
Path name of the resource whose ACL document is required. |
Returns the XMLType
for ACL document.
Given a path to a resource, this procedure returns that resource's lock token for the current user.
DBMS_XDB.GETLOCKTOKEN( path IN VARCHAR2, locktoken OUT VARCHAR2);
Parameter | Description |
---|---|
|
Path name to the resource. |
|
Logged-in user's lock token for the resource. |
The user must have READPROPERTIES
privilege on the resource.
This function gets all privileges granted to the current user on the given resource.
DBMS_XDB.GETPRIVILEGES( res_path IN VARCHAR2) RETURN sys.xmltype;
Parameter | Description |
---|---|
|
Absolute path in the hierarchy of the resource. |
Returns an XMLType
instance of <privilege>
element, which contains the list of all leaf privileges granted on this resource to the current user.
Returns the object ID of the resource from its absolute path.
DBMS_XDB.GETRESOID( abspath IN VARCHAR2) RETURN RAW;
Parameter | Description |
---|---|
|
Absolute path of the resource. |
Returns NULL
if the resource is not present.
This function returns the current tablespace of the XDB (user).
DBMS_XDB.GETXDB_TABLESPACE RETURN VARCHAR2;
This procedure creates a link to an existing resource.
DBMS_XDB.LINK( srcpath IN VARCHAR2, linkfolder IN VARCHAR2, linkname IN VARCHAR2);
Parameter | Description |
---|---|
|
Path name of the resource to which a link is made |
|
Folder in which the new link is placed. |
|
Name of the new link. |
Given a path to a resource, this function gets a WebDAV-style lock on that resource.
DBMS_XDB.LOCKRESOURCE( path IN VARCHAR2, depthzero IN BOOLEAN, shared IN boolean) RETURN BOOLEAN;
Returns TRUE
if successful.
The user must have UPDATE
privileges on the resource.
This procedure moves the XDB (user) to the specified tablespace.
DBMS_XDB.MOVEXDB_TABLESPACE( new_tablespace IN VARCHAR2);
Parameter | Description |
---|---|
|
Name of the tablespace where the XDB will be moved. |
This operation waits for all concurrent XDB sessions to exit.
This procedure rebuilds the hierarchical index after import or export operations. This is necessary because data cannot be exported from index tables.
DBMS_XDB.REBUILDHIERARCHICALINDEX;
This procedure renames the XDB resource.
DBMS_XDB.RENAMERESOURCE( srcpath IN VARCHAR2, destfolder IN CARCHAR2, newname IN VARCHAR2);
Sets the ACL on the given resource to be the ACL specified by path.
DBMS_XDB.SETACL( res_path IN VARCHAR2, acl_path IN VARCHAR2);
Parameter | Description |
---|---|
|
Absolute path in the Hierarchy for resource. |
|
Absolute path in the Hierarchy for ACL. |
The user must have <write-acl>
privileges on the resource.
This function unlocks the resource given a lock token and a path to the resource.
DBMS_XDB.UNLOCKRESOURCE( path IN VARCHAR2, deltoken IN VARCHAR2) RETURN BOOLEAN;
Parameter | Description |
---|---|
|
Path name to the resource. |
|
Lock token to be removed. |
Returns TRUE
if operation successful.
The user must have UPDATE
privileges on the resource.