The DBMS_XDB_CONFIG
package provides an interface for configuring Oracle XML DB and its repository.
See Also:
Oracle XML DB Developer's GuideThis chapter contains the following topics:
Overview
Security Model
Constants
PL/SQL package DBMS_XDB_CONFIG
is the Oracle XML DB resource application program interface (API) for PL/SQL for DBAs to configure their system. This API provides functions and procedures to access and manage Oracle XML DB Repository resources using PL/SQL. It includes methods for managing resource security and Oracle XML DB configuration.
Oracle XML DB Repository is modeled on XML, and provides a database file system for any data. The repository maps path names (or URLs) onto database objects of XMLType and provides management facilities for these objects.
PL/SQL package DBMS_XDB_CONFIG is an API that you can use to manage all of the following:
Oracle XML DB resources
Oracle XML DB security based on access control lists (ACLs). An ACL is a list of access control entries (ACEs) that determines which principals (users and roles) have access to which resources.
Oracle XML DB configuration
Owned by XDB
, the DBMS_XDB_CONFIG
package must be created by SYS
or XDB
. The EXECUTE
privilege is granted to PUBLIC
. Subprograms in this package are executed using the privileges of the current user.
The DBMS_XDB_CONFIG
package uses the constants shown in Table 183-1, "DBMS_XDB_CONFIG Constants".
Table 183-1 DBMS_XDB_CONFIG Constants
Constant | Type | Value | Description |
---|---|---|---|
|
|
1 |
Defining listener for first HTTP port |
|
|
2 |
Defining listener for second HTTP port |
|
|
1 |
Defining listener for HTTP protocol |
|
|
2 |
Defining listener for HTTPS protocol |
Table 183-2 DBMS_XDB_CONFIG Package Subprograms
Subprogram | Description |
---|---|
Adds to |
|
Adds a mime mapping to XDB configuration |
|
Adds a schema location mapping to the XDB configuration |
|
Adds a servlet to XDB configuration |
|
Adds a servlet mapping to XDB configuration |
|
Adds a security role |
|
Adds adds the following XML extension to the XDB configuration under |
|
Retrieves the session's configuration information as an |
|
Refreshes the session's configuration information to the latest configuration |
|
Updates the configuration information and commits the change. |
|
Deletes from |
|
Deletes the mime mapping for a specified extension from the XDB configuration |
|
Deletes the schema location mapping for a specified schema URL from the XDB configuration |
|
Deletes a servlet from the XDB configuration |
|
Deletes the servlet mapping for a specified servlet name from the XDB configuration |
|
Deletes the specified role from a servlet in the XDB configuration |
|
Deletes the specified XML extension from the XDB configuration |
|
Enables enables digest authentication |
|
Gets the value of the current FTP port |
|
Gets the value of the current HTTP port |
|
Gets the realm name |
|
Gets the value of the current HTTPS port |
|
Gets the parameters of a listener end point corresponding to the XML DB HTTP server |
|
Sets the FTP port to a new value |
|
Sets the HTTP port to a new value |
|
Sets the realm to a new value |
|
Sets the HTTPS port to a new value |
|
Sets the parameters of a listener end point corresponding to the XML DB HTTP server |
|
Restricts all listener end points of the XML DB HTTP server to listen either only on the localhost interface (when |
|
Obtains the port numbers used by other pluggable databases in the same consolidation database |
This procedure adds to XDB$CONFIG
a mapping of the URL pattern to an expiration date. This will control the Expire headers for URLs matching the pattern.
Table 183-3 ADDHTTPEXPIREMAPPING Procedure Parameters
Parameter | Description |
---|---|
|
URL pattern (only * accepted as wildcards) |
|
Expiration directive, follows the base [plus] (num type)* -- base: now | modification -- type: year|years|month|months|week|weeks|day|days| minute|minutess|second|seconds |
This procedure adds the following mime mapping to XDB configuration:
<mime-mapping> <extension>extension</extension> <mime-type>mimetype</mime-type> </mime-mapping>
This procedure adds the following schema location mapping to the XDB configuration:
<schemaLocation-mapping> <namespace>namespace</namespace> <element>element</element> <schemaURL>schemaURL</schemaURL> </schemaLocation-mapping>
DBMS_XDB_CONFIG.ADDSCHEMALOCMAPPING( namespace IN VARCHAR2, element IN VARCHAR2, schemaURL IN VARCHAR2);
This procedure adds the following servlet to XDB configuration:
<servlet> <servlet-name>name</servlet-name> <servlet-language>language</servlet-language> <display-name>dispname</display-name> <description>descript</description> <servlet-class>class</servlet-class> <servlet-schema>schema</servlet-schema> </servlet>
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);
Table 183-6 ADDSERVLET Procedure Parameters
Parameter | Description |
---|---|
|
Servlet name |
|
Must be one of "C", "Java", "PL/SQL" |
|
Display name |
|
Icon |
|
Description |
|
The |
|
The |
|
The |
|
Schema |
This procedure adds the following servlet mapping to XDB configuration:
<servlet-mapping> <servlet-pattern>pattern</servlet-pattern> <servlet-name>name</servlet-name></servlet-mapping>
This procedure adds the following security role REF
to a specified servlet in XDB configuration:
<security-role-ref> <role-name>rolename</role-name> <role-link>rolelink</role-link> <description>descript</description> </security-role-ref>
DBMS_XDB_CONFIG.ADDSERVLETSECROLE( servname IN VARCHAR2, rolename IN VARCHAR2, rolelink IN VARCHAR2, descript IN VARCHAR2 := NULL);
This procedure adds the following XML extension to the XDB configuration under <xml-extensions>
:
<extension>extension</extension>
This function retrieves the session's configuration information as an XMLType
instance.
This procedure refreshes the session's configuration information to the latest configuration.
This procedure deletes from XDB$CONFIG
all mappings of the URL pattern to an expiration date.
This procedure deletes the mime mapping for a specified extension from the XDB configuration.
This procedure deletes the schema location mapping for a specified schema URL from the XDB configuration.
This procedure deletes the servlet mapping for a specified servlet name from the XDB configuration.
This procedure deletes the specified role from a servlet in the XDB configuration.
This procedure deletes the specified XML extension from the XDB configuration.
This procedure enables digest authentication. It will list digest as the first authentication mechanism to be used by the XML DB HTTP server.
This function gets the realm name. Definition of a realm is referenced in IETF's RFC2617.
This procedure 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_CONFIG.GETLISTENERENDPOINT ( endpoint IN NUMBER, host OUT VARCHAR2, port OUT NUMBER, protocol OUT NUMBER);
Table 183-18 GETLISTENERENDPOINT Procedure Parameters
Parameter | Description |
---|---|
|
End point to be retrieved. Its value can be |
|
Interface on which the listener end point listens |
|
Port on which the listener end point listens |
|
Transport protocol accepted by the listener end point |
This procedure 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);
Table 183-23 SETLISTENERENDPOINT Procedure Parameters
Parameter | Description |
---|---|
|
End point to be set. Its value can be |
|
Interface on which the listener end point is to listen. Its value can be ' |
|
Port on which the listener end point is to listen |
|
Transport protocol that the listener end point is to accept. Its value can be |