DB2 Version 9.7 for Linux, UNIX, and Windows

Disabling of annotated XML schema decomposition

Annotated XML schema decomposition can be made inoperative by DB2® under certain conditions or explicitly disabled by a user.

Conditions that make decomposition inoperative

Schema-based decomposition is automatically made inoperative if any of the following conditions are satisfied, for annotated schemas that have been previously registered and enabled for decomposition. (Note that an XML schema that is made inoperative for decomposition can still be used for validation performed outside of the context of decomposition, such as with the XMLVALIDATE SQL/XML function.) The corrective action needed to re-enable decomposition is listed for each condition.
Table 1. Conditions that make decomposition inoperative and corresponding corrective action
Condition Action to re-enable decomposition
Table referenced in annotation is dropped Remove the reference to the dropped table from the schema document, re-register the entire annotated schema, and enable the schema for decomposition
Column referenced in annotation has its data type changed to a type that is compatible with the XML schema type Re-enable the schema for decomposition by executing the ALTER XSROBJECT SQL statement with the ENABLE DECOMPOSITION option
Column referenced in annotation has its data type changed to a type that is incompatible with the XML schema type Adjust the annotations as required, re-register the entire annotated schema, and enable the schema for decomposition
Document that belongs to the annotated schema changes Re-register all of the documents that form that schema and enable the schema for decomposition
For more information, refer to the task documentation on registering annotated schemas and enabling decomposition.

Explicit disabling

You can explicitly disable schema-based decomposition by executing either of the following SQL statements, specifying the XSR object that corresponds to the annotated schema you want to disable:
  • ALTER XSROBJECT with the DISABLE DECOMPOSITION option
    Note: An XML schema that is disabled for decomposition can still be used for validation.
  • DROP with the XSROBJECT option
Note: Which option to choose depends on what the XML schema is needed for. If the schema is needed for validation, then it should be disabled for decomposition, rather than dropped. If the schema is used only for decomposition, and you do not expect to use it again for decomposition, then you can drop the XSR object.