Oracle DBMS_XDB
Version 12.1.0.1

General Information
Library Note Morgan's Library Page Footer
The Library is currently in the process of being upgraded from Oracle Database Version 11.2.0.3 to 12.1.0.1. Demos are being upgraded to reflect the new Container paradigm as well as EBR (Edition Based Redefinition) and may contain references to CDBs, PDBs, and other objects you may not be familiar with such as CDB_OBJECTS_AE: Welcome to 12c.
Purpose The DBMS_XDB package supports the following features:
  • Resource Management subprograms which complement Resource Views
  • The Access Control List (ACL)-based Security Mechanism
  • Configuration Session Management
  • Creation of the XDB username
The DBMS_XDB package subprograms and constants are deprecated with Oracle Database 12c. While all features continue to be supported for backward compatibility, Oracle recommends that you use the alternative procedures provided in each case as identified below.
AUTHID CURRENT_USER
Constants
Name Data Type Value
DELETE Configurations
DELETE_RESOURCE NUMBER 1
DELETE_RECURSIVE NUMBER 2
DELETE_FORCE NUMBER 3
DELETE_RECURSIVE_FORCE NUMBER 4
     
DELETE_RES_METADATA_CASCADE NUMBER 1
DELETE_RES_METADATA_NOCASCADE NUMBER 2
Constant number for 1st argument of setListenerEndPoint
XDB_ENDPOINT_HTTP NUMBER 1
XDB_ENDPOINT_HTTP2 NUMBER 2
Constant number for 4th argument of setListenerEndPoint
XDB_PROTOCOL_TCP NUMBER 1
XDB_PROTOCOL_TCPS NUMBER 2
Miscellaneous
DEFAULT_LOCK_TIMEOUT PLS_INTEGER (60 * 60)
     
LINK_TYPE_HARD NUMBER 1
LINK_TYPE_WEAK NUMBER 2
LINK_TYPE_SYMBOLIC NUMBER 3
     
ON_DENY_NEXT_CUSTOM NUMBER 1
ON_DENY_BASIC NUMBER 2
Dependencies
DBMS_ASSERT DBMS_XDBUTIL_INT DBMS_XMLDOM
DBMS_CUBE_EXP DBMS_XDBZ DUAL
DBMS_EPG DBMS_XDB_CONFIG GET_XDB_TABLESPACE
DBMS_LOB DBMS_XDB_LIB LOCKTOKENLISTTYPE
DBMS_XDBRESOURCE DBMS_XDB_REPOS XMLTYPE
DBMS_XDBT    
Documented Yes
First Available Not Known
Security Model Owned by XDB with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/dbmsxdb.sql
Subprograms
ACLCHECKPRIVILEGES DELETERESOURCE  
ADDHTTPEXPIREMAPPING DELETESCHEMALOCMAPPING HASBLOBCONTENT
ADDMIMEMAPPING DELETESERVLET HASCHARCONTENT
ADDRESOURCE DELETESERVLETMAPPING HASXMLCONTENT
ADDSCHEMALOCMAPPING DELETESERVLETSECROLE HASXMLREFERENCE
ADDSERVLET DELETEXMLEXTENSION ISFOLDER
ADDSERVLETMAPPING EXISTSRESOURCE LINK
ADDSERVLETSECROLE GETACLDOCUMENT LOCKDISCOVERY
ADDTOLOCKTOKENLIST GETCONTENTBLOB LOCKRESOURCE
ADDXMLEXTENSION GETCONTENTCLOB PROCESSLINKS
APPENDRESOURCEMETADATA GETCONTENTVARCHAR2 PURGERESOURCEMETADATA
CFG_GET GETCONTENTXMLREF REFRESHCONTENTSIZE
CFG_REFRESH GETCONTENTXMLTYPE REFRESHLOCK
CFG_UPDATE GETFTPPORT RENAMERESOURCE
CHANGEOWNER GETHTTPPORT SETACL
CHANGEPRIVILEGES GETHTTPREQUESTHEADER SETFTPPORT
CHECKPRIVILEGES GETLISTENERENDPOINT SETHTTPPORT
CREATEFOLDER GETLOCKTOKEN SETLISTENERENDPOINT
CREATEOIDPATH GETLOCKTOKENLIST SETLISTENERLOCALACCESS
CREATERESOURCE GETPRIVILEGES TOUCHRESOURCE
DELETEFROMLOCKTOKENLIST GETRESOID UNLOCKRESOURCE
DELETEHTTPEXPIREMAPPING GETRESOURCE UPDATERESOURCEMETADATA
DELETEMIMEMAPPING GETXDB_TABLESPACE  
 
ACLCHECKPRIVILEGES
Checks the access privileges granted by specified ACL document dbms_xdb.ACLCheckPrivileges(
acl_path IN VARCHAR2,
owner    IN VARCHAR2,
privs    IN XMLTYPE)
RETURN PLS_INTEGER;
TBD
 
GETFTPPORT
Returns the FTP Port dbms_xdb.getFTPPort RETURN NUMBER;
SELECT dbms_xdb.getFTPPort
FROM dual;

GETFTPPORT
----------
         0

exec dbms_xdb.setFTPPort(20);

SELECT dbms_xdb.getFTPPort
FROM dual;

GETFTPPORT
----------
        20
 
GETHTTPPORT
Returns the HTMLDB Port dbms_xdb.getHTTPPort;
SELECT dbms_xdb.getHTTPPort
FROM DUAL;

GETHTTPPORT
-----------
       8080
 
GETHTTPREQUESTHEADER
Returns the values of the passed header if called during an HTTP request dbms_xdb.getHTTPRequestHeader(header_name IN VARCHAR2) RETURN VARCHAR2;
set serveroutput on

DECLARE
 rqhdr VARCHAR2(100);
BEGIN
  rqhdr := dbms_xdb.getHTTPRequestHeader('UWHeader');
  dbms_output.put_line(rqhdr);
END;
/
 
GETLISTENERENDPOINT
Retrieves the parameters of a listener end point corresponding to the XML DB HTTP server. The parameters of both HTTP
and HTTP2 end points can be retrieved by invoking this procedure.
dbms_xdb.getListenerEndPoint(
endpoint IN  NUMBER,
host     OUT VARCHAR2,
port     OUT NUMBER,
protocol OUT NUMBER);
TBD
 
SETFTPPORT
Set the FTP Port dbms_xdb.setFTPPort(newport IN NUMBER);
See getFTPPort Demo Above
 
SETHTTPPORT
Sets the HTMLDB Port dbms_xdb.setHTTPPort(newport IN NUMBER);
exec dbms_xdb.setHTTPPort(8081);
 
SETLISTENERENDPOINT
Sets the parameters of a listener end point corresponding to the XML DB HTTP server. Both HTTP and HTTP2 end points can be set by invoking this procedure. dbms_xdb.setListenerEndPoint(
endpoint IN NUMBER,
host     IN VARCHAR2,
port     IN NUMBER,
protocol IN NUMBER);
TBD
 
SETLISTENERLOCALACCESS
Restricts listener end points of the XML DB HTTP server to listen only on the localhost interface if TRUE or to all listener end points if FALSE dbms_xdb.setListenerLocalAccess(l_access IN BOOLEAN);
exec dbms_xdb.setListenerLocalAccess(TRUE);

Related Topics
DBMS_EPG
DBMS_XDB_ADMIN
DBMS_XDBREPOS
Packages

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2014 Daniel A. Morgan All Rights Reserved