Oracle DBMS_XDB_CONFIG
Version 12.1.0.2

General Information
Library Note Morgan's Library Page Footer
The Library is currently in the process of being upgraded from Oracle Database Version 12.1.0.1 to 12.1.0.2. 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.

Interested in Oracle GoldenGate? Check out the IGGOUG,
Purpose Provides an interface for configuring Oracle XML DB and via its repository table xdb.xdb$config
AUTHID CURRENT_USER
Constants
Name Data Type Value
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
ON_DENY_NEXT_CUSTOM NUMBER 1
ON_DENY_BASIC CONSTANT NUMBER 2
Dependencies
DBMS_ASSERT DBMS_XDB_LIB XDB$ROOT_INFO_V
DBMS_STANDARD DBMS_XMLDOM XDB_REALM_VIEW
DBMS_XDB DUAL XMLTYPE
Documented Yes
Exceptions
Error Code Reason
ORA-30952 Illegal configuration of HTTP/HTTPS in xdbconfig.xml
First Available Not known
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/dbmsxdbc.sql
Subprograms
 
ADDAUTHENTICATIONMAPPING
Adds a mapping from the authentication method name to a URL pattern (in xdb.xdb$config) dbms_xdb_config.addAuthenticationMapping(
addAuthenticationMapping(pattern IN VARCHAR2,
name        IN VARCHAR2,
user_prefix IN VARCHAR2 := NULL,
on_deny     IN NUMBER   := NULL);
PRAGMA SUPPLEMENTAL_LOG_DATA(addAuthenticationMapping,
UNSUPPORTED_WITH_COMMIT);
TBD
 
ADDAUTHENTICATIONMETHOD
Adds to xdb.xdb$config a custom authentication method entry dbms_xdb_config.addAuthenticationMethod(
name             IN VARCHAR2,
description      IN VARCHAR2,
implement_schema IN VARCHAR2,
implement_method IN VARCHAR2,
language         IN VARCHAR2 := 'PL/SQL');
PRAGMA SUPPLEMENTAL_LOG_DATA(addAuthenticationMethod,
UNSUPPORTED_WITH_COMMIT);
CREATE OR REPLACE FUNCTION authfunc(uname IN VARCHAR2) RETURN BOOLEAN
AUTHID DEFINER AS
BEGIN
  RETURN TRUE;
END authfunc;
/

exec dbms_xdb_config.addAuthenticationMethod('UWXDBAuth', 'Functionality Test', 'SYS', 'AUTHFUNC');

SELECT *
FROM xdb.xdb$config;

-- review the XML in SQL*Plus for the <custom-authentication-list> section
 
ADDDEFAULTTYPEMAPPINGS
Undocumented dbms_xdb_config.addDefaultTypeMappings(version IN VARCHAR2 := 'pre-11.2');
exec dbms_xdb_config.addDefaultTypeMappings;
 
ADDHTTPEXPIREMAPPING
Adds to xdb.xdb$config a mapping of the URL pattern to an expiration date. This will control the Expire headers for URLs matching the pattern dbms_xdb_config.addHTTPExpireMapping(
pattern IN VARCHAR2,
expire  IN VARCHAR2);
exec dbms_xdb_config.addHTTPExpireMapping ('/public/test1/*', 'now plus 4 weeks');
exec dbms_xdb_config.addHTTPExpireMapping('/public/test2/*', 'modification plus 1 day 30 seconds');

SELECT * FROM xdb.xdb$config;

-- find the following section in the output:
 <expire xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">
  <expire-mapping xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">
    <expire-pattern>/public/test1/*</expire-pattern>
    <expire-default>now plus 4 weeks</expire-default>
  </expire-mapping>
  <expire-mapping xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">
    <expire-pattern>/public/test2/*</expire-pattern>
    <expire-default>modification plus 1 day 30 seconds</expire-default>
  </expire-mapping>
</expire>

exec dbms_xdb_config.deleteHttpExpireMapping('*');
 
ADDMIMEMAPPING
Adds a mime mapping to the XDB configuration dbms_xdb_config.addMimeMapping(
extension IN VARCHAR2,
mimetype  IN VARCHAR2);
exec xdb.dbms_xdb_config.addMimeMapping('avi', 'video/x-msvideo');

SELECT * FROM xdb.xdb$config;

-- find the following section in the output:
 <mime-mapping>
  <extension>avi</extension>
  <mime-type>video/x-msvideo</mime-type>
</mime-mapping>

exec xdb.dbms_xdb_config.deleteMimeMapping('avi');
 
ADDSCHEMALOCMAPPING
Adds a schema location mapping to the XDB configuration dbms_xdb_config.addSchemaLocMapping(
namespace IN VARCHAR2,
element   IN VARCHAR2,
schemaURL IN VARCHAR2);
TBD
 
ADDSERVLET
Adds a servelet to the XDB configuration dbms_xdb_config.addServlet(
name     IN VARCHAR2,
language IN VARCHAR2,
dispname IN VARCHAR2,
icon     IN VARCHAR2 := NULL,
descript IN VARCHAR2 := NULL,
class    IN VARCHAR2 := NULL,
jspfile  IN VARCHAR2 := NULL,
plsql    IN VARCHAR2 := NULL,
schema   IN VARCHAR2 := NULL);
TBD
 
ADDSERVLETMAPPING
Adds a servelet mapping to the XDB configuration dbms_xdb_config.addSerletMapping(
pattern IN VARCHAR2,
name    IN VARCHAR2);
TBD
 
ADDSERVLETSECROLE
adds the following security role REF to a specified servlet in XDB configuration dbms_xdb_config.addServletSecRole(servname IN VARCHAR2,
rolename IN VARCHAR2,
rolelink IN VARCHAR2,
descript IN VARCHAR2 := NULL);
TBD
 
ADDTRUSTMAPPING
Undocumented dbms_xdb_config.addTrustMapping(
pattern     IN VARCHAR2,
auth_name   IN VARCHAR2,
trust_name  IN VARCHAR2,
user_prefix IN VARCHAR2 := NULL);
PRAGMA SUPPLEMENTAL_LOG_DATA(addTrustMapping,
UNSUPPORTED_WITH_COMMIT);
TBD
 
ADDTRUSTSCHEME
Undocumented dbms_xdb_config.addTrustScheme(name IN VARCHAR2,
description            IN VARCHAR2,
session_user           IN VARCHAR2,
parsing_schema         IN VARCHAR2,
system_level           IN BOOLEAN := TRUE,
require_parsing_schema IN BOOLEAN := TRUE,
allow_registration     IN BOOLEAN := TRUE);
PRAGMA SUPPLEMENTAL_LOG_DATA(addTrustScheme,
UNSUPPORTED_WITH_COMMIT);
TBD
 
ADDXMLEXTENSION
Adds the appropriate XML extension to the XDB configuration dbms_xdb_config.addXMLExtension (extension IN VARCHAR2);
exec dbms_xdb_config.addXMLExtension('rels');

SELECT * FROM xdb.xdb$config;

-- find the following section in the output:
<xml-extensions xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">
  <extension xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">rels</extension>
</xml-extensions>

exec dbms_xdb_config.deleteXMLExtension('rels');
 
CONFIG_CFG_GET
Returns the xdb configuration dbms_xdb_config.cfg_get RETURN sys.xmltype;
SELECT dbms_xdb_config.cfg_get
FROM dual;
 
CONFIG_CFG_REFRESH
Refreshes the session configuration with the latest configuration dbms_xdb_config.cfg_refresh;
exec dbms_xdb_config.cfg_refresh;
 
CONFIG_CFG_UPDATE
Updates the xdb configuration with the input xmltype document dbms_xdb_config.cfg_update(xdbconfig IN sys.XMLType);
TBD
 
DELETEAUTHENTICATIONMAPPING
Deletes a mapping from the authentication method name to a URL pattern (from xdb$onfig) dbms_xdb_config.deleteAuthenticationMapping(
pattern IN VARCHAR2,
name    IN VARCHAR2);
PRAGMA SUPPLEMENTAL_LOG_DATA(deleteAuthenticationMapping,
UNSUPPORTED_WITH_COMMIT);
TBD
 
DELETEAUTHENTICATIONMETHOD
Deletes from xdb.xdb$config a custom authentication method entry dbms_xdb_config.deleteAuthenticationMethod(name IN VARCHAR2);
PRAGMA SUPPLEMENTAL_LOG_DATA(deleteAuthenticationMethod,
UNSUPPORTED_WITH_COMMIT);
exec dbms_xdb_config.deleteAuthenticationMethod('ZZYZX');

-- Note that this does not raise an exception even when the name provided does not exist.
 
DELETEDEFAULTTYPEMAPPINGS
Deletes the default type mappings from xdbconfig dbms_xdb_config.deleteDefaultTypeMappings;
exec deleteDefaultTypeMappings;
 
DELETEHTTPEXPIREMAPPING
Deletes from xdb.xdb$config all mappings of the URL pattern to an expiration date dbms_xdb_config.deleteHTTPExpireMapping(pattern IN VARCHAR2);
See addHTTPExpireMapping Demo Above
 
DELETEMIMEMAPPING
Deletes a mime mapping from xdb.xdb$config dbms_xdb_config.deleteMimeMapping(extension IN VARCHAR2);
See addMimeMapping Demo Above
 
DELETESCHEMALOCMAPPING
Delete a schema location mapping dbms_xdb_config.dleteSchemaLocMapping(schemaURL IN VARCHAR2);
TBD
 
DELETESERVLET
Delete a servlet dbms_xdb_config.deleteServlet(name IN VARCHAR2);
TBD
 
DELETESERVLETSECROLE
Delete a security role ref from a servlet dbms_xdb_config.deleteServletSecRole(
servname IN VARCHAR2,
rolename IN VARCHAR2);
TBD
 
DELETESERVLETMAPPING
Delete a servlet mapping dbms_xdb_config.deleteServletMapping(name IN VARCHAR2);
TBD
 
DELETETRUSTMAPPING
Undocumented dbms_xdb_config.deleteTrustMapping(
pattern IN VARCHAR2,
name    IN VARCHAR2);
PRAGMA SUPPLEMENTAL_LOG_DATA(deleteTrustMapping,
UNSUPPORTED_WITH_COMMIT);
TBD
 
DELETETRUSTSCHEME
Undocumented dbms_xdb_config.deleteTrustScheme(
name         IN VARCHAR2,
system_level IN BOOLEAN := TRUE);
PRAGMA SUPPLEMENTAL_LOG_DATA(deleteTrustScheme,
UNSUPPORTED_WITH_COMMIT);
TBD
 
DELETEXMLEXTENSION
Deletes an XML extension dbms_xdb_config.deleteXMLExtention(extension IN VARCHAR2);
See addXMLExtension Demo Above
 
ENABLECUSTOMAUTHENTICATION
Undocumented dbms_xdb_config.enableCustomAuthentication;
PRAGMA SUPPLEMENTAL_LOG_DATA(enableCustomAuthentication,
UNSUPPORTED_WITH_COMMIT);
exec dbms_xdb_config.enableCustomAuthentication;
 
ENABLECUSTOMTRUST
Undocumented dbms_xdb_config.enableCustomTrust;
PRAGMA SUPPLEMENTAL_LOG_DATA(enableCustomTrust,
UNSUPPORTED_WITH_COMMIT);
exec dbms_xdb_config.enableCustomTrust;
 
ENABLEDIGESTAUTHENTICATION
Enables enables digest authentication dbms_xdb_config.enableDigestAuthentication;
PRAGMA SUPPLEMENTAL_LOG_DATA(enableDigestAuthentication,
UNSUPPORTED_WITH_COMMIT);
exec dbms_xdb_config.enableDigestAuthentication;
 
GETFTPPORT
Returns the current value of FTP port dbms_xdb_config.getFTPPort RETURN NUMBER;
exec dbms_xdb_config.setFTPPort(20);

SELECT dbms_xdb_config.getFTPPort
FROM dual;
 
GETHTTPPORT
gets the current value of HTTP port dbms_xdb_config.getHTTPPort RETURN NUMBER;
exec dbms_xdb_config.setHTTPPort(80);

SELECT dbms_xdb_config.getHTTPPort
FROM dual;
 
GETHTTPREQUESTHEADER
For custom authentication if called during an HTTP request serviced by XDB, returns the values of the passed header. Returns NULL if none is present in the request, or for AUTHENTICATION, for security reasons. dbms_xdb_config.getHTTPRequestHeader(header_name IN VARCHAR2)
RETURN VARCHAR2;
TBD
 
GETHTTPSPORT
Returns the current value of HTTPs port dbms_xdb_config.getHTTPsPort RETURN NUMBER;
SELECT getHTTPsPort
FROM dual;
 
GETLISTENERENDPOINT
Returns 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_config.getListenerEndPoint(
endpoint IN  NUMBER,
host     OUT VARCHAR2,
port     OUT NUMBER,
protocol OUT NUMBER);
exec dbms_xdb_config.setListenerEndPoint(dbms_xdb_config.xdb_endpoint_http2, 'Perrito4', 5500, dbms_xdb_config.xdb_protocol_tcp);

DECLARE
 hval VARCHAR2(30);
 pval NUMBER;
 lval NUMBER;
BEGIN
  dbms_xdb_config.getListenerEndPoint(dbms_xdb_config.xdb_endpoint_http2, hval, pval, lval);
  dbms_output.put_line('Host: ' || hval);
  dbms_output.put_line('Port: ' || TO_CHAR(pval));
  dbms_output.put_line('Protocol: ' || TO_CHAR(lval));
END;
/
 
SETDEFAULTTYPEMAPPINGS
Sets the value of default-type-mappings in xdbconfig dbms_xdb_config.setDefaultTypeMappings(setDefaultTypeMappings(version IN VARCHAR2);
-- valid values are "pre-11.2" or "post-11.2"
exec dbms_xdb_config.setDefaultTypeMappings('post-11.2');
 
SETFTPPORT
Sets the FTP port to new value dbms_xdb_config.setFTPPort(new_port IN NUMBER);
See getFTPPort Demo Above
 
SETDYNAMICGROUPSTORE
Undocumented dbms_xdb_config.setDynamicGroupStore(
is_dynamic IN BOOLEAN := TRUE);
PRAGMA SUPPLEMENTAL_LOG_DATA(setDynamicGroupStore,
UNSUPPORTED_WITH_COMMIT);
exec dbms_xdb_config.setDynamicGroupStore;
 
SETHTTPCONFIGREALM
Undocumented dbms_xdb_config.setHTTPConfigRealm(setHttpConfigRealm(realm IN VARCHAR2);
TBD
 
SETHTTPPORT
Sets the HTTP port to new value dbms_xdb_config.setHTTPPort(new_port IN NUMBER);
See getHTTPPort Demo Above
 
SETHTTPSPORT
Sets the HTTPs port to new value dbms_xdb_config.setHTTPsPort(new_port IN NUMBER);
exec setHTTPsPort(???);
 
SETLISTENERLOCALACCESS
restricts all listener end points of the XML DB HTTP server to listen only on the localhost interface (when l_access is TRUE) or allows all listener end points of the XML DB HTTP server to listen on both localhost and non-localhost interfaces (when l_access is FALSE). dbms_xdb_config.setListenerLocalAccess(l_access IN BOOLEAN);
exec dbms_xdb_config.setListenerLocalAccess(TRUE);
 
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_config.setListenerEndPoint(
endpoint IN NUMBER,
host     IN VARCHAR2,
port     IN NUMBER,
protocol IN NUMBER);
See getListenerEndPoint Demo Above
 
USEDPORT
Return the protocol port numbers of all pdbs dbms_xdb_config.usedport RETURN sys.XMLType;
SELECT dbms_xdb_config.usedport
FROM dual;

Related Topics
DBMS_XDBREPOS
DBMS_XDB
DBMS_XDBREPOS
DBMS_XDBUTIL_INT
DBMS_XDB_ADMIN
DBMS_XDB_CONSTANTS
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