Before an XML schema, DTD, or external entity can be used to process XML documents, it must be registered with the XML schema repository (XSR). Registration with the XSR creates an XSR object.
In order to register most XML schemas, the application heap size configuration parameter (applheapsz) needs to be increased. To register very complex XML schemas on a Windows 32-bit operating system, the agent stack size configuration parameter (agent_stack_sz) may also need to be increased. Please refer to the related links below on how to change either of these configuration parameters.
For DTDs and external entities, XSR object registration with the XML schema repository is a single step process.
In the description of these methods below, the following example of an XML schema made up of two XML schema documents is used: "PO.xsd" and "address.xsd", both stored locally in C:\TEMP. The user wants to register this schema under the SQL two-part name of "user1.POschema". The XML Schema has a properties file associated with it called schemaProp.xml. This properties file is also stored locally, in the same C:\TEMP directory. The two XML schema documents do not have properties associated with them. The user defines the URI by which this schema is externally known as "http://myPOschema/PO".
Any user with DBADM authority can register an XSR object. For all other users, the privileges are based on the SQL schema that is supplied during the registration process. If the SQL schema does not exist, then IMPLICIT_SCHEMA authority on the database is required to register the schema. If the SQL schema exists, then the user registering the schema needs CREATEIN privilege on the SQL schema.
For XML schemas, the user to initiate the XSR object registration process (through the XSR_REGISTER stored procedure, for example) must also be the user to specify additional XML schema documents (if applicable) and to complete the registration process.
The USAGE privilege for an XSR object is automatically granted to the creator of the XSR object.