DB2 Version 9.7 for Linux, UNIX, and Windows

UPDATE XMLSCHEMA command

Updates one XML schema with another in the XML schema repository (XSR).

Authorization

One of the following:
  • dbadm
  • SELECT privilege on the catalog views SYSCAT.XSROBJECTS and SYSCAT.XSROBJECTCOMPONENTS and one of the following sets of privileges:
    • ALTERIN privilege on the XML schema to be updated and DROPIN privilege on the new XML schema, if the DROP NEW SCHEMA option is specified.
    • OWNER of the XML schema specified by xmlschema1.

Required connection

Database

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-UPDATE XMLSCHEMA--xmlschema1--WITH--xmlschema2--------------->

>--+-----------------+-----------------------------------------><
   '-DROP NEW SCHEMA-'   

Command parameters

UPDATE XMLSCHEMA xmlschema1
Specifies the SQL identifier for the original XML schema to be updated.
WITH xmlschema2
Specifies the SQL identifier for the new XML schema that will be used to update the original XML schema.
DROP NEW SCHEMA
Indicates that the new XML schema should be dropped after it is used to update the original XML schema.

Example

UPDATE XMLSCHEMA JOHNDOE.OLDPROD
WITH JOHNDOE.NEWPROD
DROP NEW SCHEMA

The contents of the XML schema JOHNDOE.OLDPROD is updated with the contents of JOHNDOE.NEWPROD, and the XML schema JOHNDOE.NEWPROD is dropped.

Usage notes