3.1.4.3.2.1.1.28 Batch

The Batch command contains multiple commands that are executed in a single request.

   <xsd:complexType name="Batch">
     <xsd:sequence>
       <xsd:element name="Parallel" minOccurs="0" maxOccurs="unbounded" >
         <xsd:complexType>
           <xsd:sequence>
             <xsd:element name="Process" type="Process" minOccurs="0"
                          maxOccurs="unbounded" />
           </xsd:sequence>
           <xsd:attribute name="MaxParallel" type="xsd:int"  default="0" />
         </xsd:complexType>
       </xsd:element>
       <xsd:element name="Bindings" minOccurs="0" type="OutOfLineBinding" />
       <xsd:element name="DataSource" minOccurs="0" type="DataSource" />
       <xsd:element name="DataSourceView" type="DataSourceView"
                   minOccurs="0" />
       <xsd:element name="ErrorConfiguration" type="ErrorConfiguration"
                   minOccurs="0" />
       <xsd:element name="Create" type="Create" minOccurs="0"
                    maxOccurs="unbounded" />
       <xsd:element name="Alter" type="Alter" minOccurs="0"
                    maxOccurs="unbounded" />
       <xsd:element name="Delete" type="Delete" minOccurs="0"
                    maxOccurs="unbounded" />
       <xsd:element name="Process" type="Process" minOccurs="0"
                   maxOccurs="unbounded" />
       <xsd:element name="MergePartitions" type="MergePartitions"
                   minOccurs="0" maxOccurs="unbounded" />
       <xsd:element name="DesignAggregations" type="DesignAggregations"
                   minOccurs="0" maxOccurs="unbounded" />
       <xsd:element name="NotifyTableChange" type="NotifyTableChange"
                   minOccurs="0" maxOccurs="unbounded" />
       <xsd:element name="Insert" minOccurs="0" type="Insert"
                   maxOccurs="unbounded" />
       <xsd:element name="Update" minOccurs="0" type="Update"
                   maxOccurs="unbounded" />
       <xsd:element name="Drop" minOccurs="0" type="Drop"
                   maxOccurs="unbounded" />
       <xsd:element name="UpdateCells" minOccurs="0" type="UpdateCells"
                   maxOccurs="unbounded" />
       <xsd:element name="Backup" minOccurs="0" type="Backup"
                   maxOccurs="unbounded" />
       <xsd:element name="Restore" minOccurs="0" type="Restore"
                   maxOccurs="unbounded" />
       <xsd:element name="Synchronize" minOccurs="0" type="Synchronize"
                   maxOccurs="unbounded" />
       <xsd:element name="Cancel" minOccurs="0" type="Cancel"
                   maxOccurs="unbounded" />
       <xsd:element name="BeginTransaction" minOccurs="0" type="BeginTransaction"
                   maxOccurs="unbounded" />
       <xsd:element name="CommitTransaction" minOccurs="0" type="CommitTransaction" 
                   maxOccurs="unbounded" />
       <xsd:element name="RollbackTransaction" minOccurs="0" type="RollbackTransaction" 
                   maxOccurs="unbounded" />
       <xsd:element name="ClearCache" minOccurs="0" type="ClearCache"
                   maxOccurs="unbounded" />
       <xsd:element name="Subscribe" minOccurs="0" type="Subscribe"
                   maxOccurs="unbounded" />
       <xsd:element name="Unsubscribe" minOccurs="0" type="Unsubscribe"
                   maxOccurs="unbounded" />
       <xsd:element name="Detach" minOccurs="0" type="Detach"
                   maxOccurs="unbounded" />
       <xsd:element name="Attach" minOccurs="0" type="Attach"
                   maxOccurs="unbounded" />
       <xsd:element name="Lock" minOccurs="0" type="Lock"
                   maxOccurs="unbounded" />
       <xsd:element name="Unlock" minOccurs="0" type="Unlock"
                   maxOccurs="unbounded" />
       <xsd:element name="ImageLoad" minOccurs="0" type="ImageLoad"
                   maxOccurs="unbounded" />
       <xsd:element name="ImageSave" minOccurs="0" type="ImageSave"
                   maxOccurs="unbounded" />
       <xsd:element name="CloneDatabase" minOccurs="0" type="CloneDatabase"
                   maxOccurs="unbounded" />
       <xsd:element name="SetAuthContext" minOccurs="0" type="SetAuthContext"
                   maxOccurs="unbounded" />
       <xsd:element name="Discover" minOccurs="0" type="Discover"
                   maxOccurs="unbounded" />
     </xsd:sequence>
     <xsd:attribute name="Transaction" type="xsd:boolean" />
     <xsd:attribute name="ProcessAffectedObjects" type="xsd:boolean" />
   </xsd:complexType>

The following table shows the XML elements for the Batch command.

Element

Default value

Description

Parallel

Empty

A Parallel element can contain an unbounded number of Process commands. The Process commands are executed in parallel, up to the limit in the MaxParallel XML attribute to this element.

Bindings

Empty

A collection of objects of type OutOfLineBinding. These bindings replace the bindings that might have been specified for the objects at their creation time.

DataSource

Empty

A DataSource that, if specified, replaces a DataSource that might have been specified for the objects at their creation time.

DataSourceView

Empty

A DataSourceView that, if specified, replaces a DataSourceView that might have been specified for the objects at their creation time.

ErrorConfiguration

Empty

An ErrorConfiguration object that designates the error configuration to be used for processing.

In addition to the elements described in the table, the Batch command can contain any number of each of the commands that are defined as available to the Command element (section 3.1.4.3.2.1.1), except the Batch command itself.<372>

Other restrictions MAY<373> apply to the commands within Batch.

The following table shows the XML attributes for the Batch command.

Element

Default value

Description

Transaction

True

A Boolean that, when true, indicates that all commands in the batch are executed in a single transaction; otherwise false.

ProcessAffectedObjects

False

A Boolean that, when true, indicates that affected objects are also to be processed; otherwise false.

The return result type for the Batch command is xmla-e:emptyresult.<374>