XSR_REMOVE
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.
Authorization
The privileges held by the
authorization ID of the statement must include the following:
- The following system authorities:
- The system authority *EXECUTE on the service program associated with the procedure, and
- The system authority *EXECUTE on the SYSPROC library.
The privileges held by the authorization ID of the statement
must include at least one of the following:
- The following system authorities:
- The system authority *OBJOPR and *OBJEXIST on the object associated with the XSR object, and
- The system authority *EXECUTE on the library that contains the XSR object to be dropped, and
- The DELETE privilege on the XSROBJECTS, XSROBJECTCOMPONENTS, XSROBJECTHIERARCHIES, and XSRANNOTATIONINFO catalog tables, and
- The system authority *EXECUTE on library QSYS2.
- Database administrator authority
Syntax
Description
The schema is SYSPROC.
- rschema
- An input parameter of type VARCHAR(128) that specifies the SQL schema for the XML schema. It must be a valid SQL identifier. The SQL schema is one part of the qualified name used to identify this XML schema in the XSR. (The other part of the name is supplied by the name parameter). This parameter can have the NULL value which indicates that name is implicitly qualified based on the rules specified in Qualification of unqualified object names.
- name
- An input parameter of type VARCHAR(128) that specifies the name of the XML schema. It must be a valid SQL identifier. The complete name for the XML schema that is to be removed is rschema.name. The XML schema name must already exist as a result of calling the XSR_REGISTER stored procedure. This parameter cannot have the NULL value.
Example
The following example calls the XSR_REMOVE stored procedure:
CALL SYSPROC.XSR_REMOVE(
'MyLib',
'MySchema')