3.1.4.41 MetadataDelete

The MetadataDelete operation deletes metadata objects from an MDS repository. The request's Metadata element identifies objects to be deleted. One or more objects can be specified within a single request. The objects that are specified can be of the same or multiple object types. Objects are located by GUIDs only; names are ignored.

This operation issues individual Delete operations for each item. The failure or inability to delete one item does not affect the attempt to delete or the successful deletion of other items that are explicitly included in the request. Multiple calls for individual items can be implemented if alternative error-handling is required.

Deletions of some metadata components are cascading and automatically delete their child components. This occurs in cases in which the components are fully dependent on the deleted component and therefore have no further usefulness without the deleted component.

The following events occur during a model Delete operation:

  • All related metadata subcomponents (such as entities, attributes, hierarchies, and versions) are deleted.

  • Associated business rules are deleted.

  • Associated model and hierarchy member security permissions are deleted.

The following events occur during an entity Delete operation:

  • The related metadata sub-components (such as attributes, attribute groups, and explicit hierarchies) are deleted.

  • Associated business rules are deleted.

  • Associated model and hierarchy member security permissions (such as model security permissions assigned at the entity component or below) are deleted.

An error occurs when an attempt is made to delete a component when one or more of the following conditions are true:

  • An entity, attribute, or explicit hierarchy is deleted when used by a derived hierarchy.

  • An attribute is deleted when a related business rule exists.

  • An explicit hierarchy is deleted when a business rule references parents within the hierarchy.

  • A version flag that is assigned to a version is deleted.

The following is the WSDL definition of the MetadataDelete operation.

Applies to MDS 2008R2

     <wsdl:operation name="MetadataDelete">
       <wsdl:input wsaw:Action="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09/IService/MetadataDelete" name="MetadataDeleteRequest" message="tns:MetadataDeleteRequest" />
       <wsdl:output wsaw:Action="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09/IService/MetadataDeleteResponse" name="MetadataDeleteResponse" message="tns:MetadataDeleteResponse" />
    </wsdl:operation>

Applies to MDS 2012

     <wsdl:operation name="MetadataDelete">
       <wsdl:input wsaw:Action="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09/IService/MetadataDelete" name="MetadataDeleteRequest" message="tns:MetadataDeleteRequest"/>
       <wsdl:output wsaw:Action="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09/IService/MetadataDeleteResponse" name="MetadataDeleteResponse" message="tns:MetadataDeleteResponse"/>
       <wsdl:fault wsaw:Action="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09/IService/MetadataDeleteSkuNotSupportedMessageFault" name="SkuNotSupportedMessageFault" message="tns:IService_MetadataDelete_SkuNotSupportedMessageFault_FaultMessage"/>
       <wsdl:fault wsaw:Action="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09/IService/MetadataDeleteEditionExpiredMessageFault" name="EditionExpiredMessageFault" message="tns:IService_MetadataDelete_EditionExpiredMessageFault_FaultMessage"/>
    </wsdl:operation>