XSR_REMOVE stored procedure

The XSR_REMOVE procedure is used to remove all components of an XML schema. After the XML schema is removed, you can reuse the name of the removed XML schema when you register a new XML schema.

Environment for XSR_REMOVE

XSR_REMOVE runs in a WLM-established stored procedures address space.

Recommendation: Use WLM environment DSNWLM_XML for running XSR_REMOVE. The startup procedure for this environment, DSNWLMX, can be configured during installation, using installation panel DSNTIPRJ, XML schema processing routines.

Authorization required for XSR_REMOVE

The user ID of the caller of the procedure must have the EXECUTE privilege on the XSR_REMOVE stored procedure.

XSR_REMOVE syntax diagram

The following syntax diagram shows the CALL statement for invoking XSR_REMOVE.

Read syntax diagramSkip visual syntax diagram CALL SYSPROC . XSR_REMOVE ( rschemaNULL , name )
rschema
An input parameter of type VARCHAR (128) that specifies the SQL schema part of the qualified name that identifies the XML schema in the XSR. If a non-null value is specified, it must be SYSXSR. If rschema is a null value, the default SQL schema SYSXSR is used.
name
An input parameter of type VARCHAR(128) that specifies the name of the XML schema. The complete qualified name for the XML schema is rschema.name, and it should be unique among all objects in the XSR. If a null value is specified, a unique value is generated and stored within the XSR. Rules for valid characters and delimiters that apply to any SQL identifier also apply to name.

XSR_REMOVE notes

If you run XSR_REMOVE against an XML schema that is part of an XML type modifier for a table column, an error occurs.

Example of XSR_REMOVE

The following example calls the XSR_REMOVE stored procedure:
   CALL SYSPROC.XSR_REMOVE(
     'SYSXSR',
     'POschema')

In this example, XSR_REMOVE folds the name POschema to uppercase, so the name of the XML schema that is removed is POSCHEMA. If you do not want XSR_REMOVE to fold POschema to uppercase, you need to delimit the name with double quotation marks ("), as in the following example.

   CALL SYSPROC.XSR_REMOVE(
     'SYSXSR',
     '"POschema"')