Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Create Element (XMLA)

Contains Analysis Services Scripting Language (ASSL) elements used by the Execute method to create objects on a Microsoft SQL Server Analysis Services instance.


          

<Command>
   <Create Scope="enum" AllowOverwrite="boolean">
      <ParentObject>...</ParentObject>
      <ObjectDefinition>...</ObjectDefinition>
   </Create>
</Command>
        

Characteristic

Description

Data type and length

None

Default value

None

Cardinality

0-n: Optional element that can occur more than once.

Relationship

Element

Parent elements

Command

Child elements

ObjectDefinition, ParentObject

Attribute

Description

AllowOverwrite

Optional Boolean attribute. If set to True, the objects defined in the ObjectDefinition element can overwrite existing objects on the Analysis Services instance. If this attribute is omitted or set to False, the presence of an existing object generates an error.

Scope

Optional Enum attribute. Defines the duration of objects defined in the ObjectDefinition element. If this attribute is omitted, the objects defined in the ObjectDefinition element are persisted on the Analysis Services instance. The following values are available:

  • Session

    The objects defined in the ObjectDefinition element exist only for the duration of the XML for Analysis (XMLA) session.

    Note Note

    When using the Session setting, the ObjectDefinition element can only contain Dimension, Cube, or MiningModel ASSL elements.

Each Create operation creates one major object under a parent given by the ParentObject element. If the parent object is omitted, it is assumed to be the destination Analysis Services instance. This generates an error if the parent of a major object is not the destination instance.

The following example creates an empty database named Test Database on an Analysis Services instance.


          
            <Create xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
   <ObjectDefinition>
      <Database xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <Name>Test Database</Name>
         <Description>A test database.</Description>
      </Database>
   </ObjectDefinition>
</Create>
        
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.