Delen via


Alter Element (XMLA)

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

Syntax

<Command>
   <Alter Scope="enum" AllowCreate="boolean" ObjectExpansion="enum">
      <Object>...</Object>
      <ObjectDefinition>...</ObjectDefinition>
   </Alter>
</Command>

Element Characteristics

Characteristic

Description

Data type and length

None

Default value

None

Cardinality

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

Element Relationships

Relationship

Element

Parent elements

Command

Child elements

Object, ObjectDefinition

Attributes

Attribute

Description

AllowCreate

(Optional Boolean attribute) Indicates whether objects defined in the Alter command should be created if they do not already exist.

If set to true, the objects defined in the ObjectDefinition element are created on the Analysis Services instance if they do not already exist. In other words, the Alter command is treated as a Create command if the objects do not already exist on the instance.

If this attribute is omitted or set to false, an error occurs if the objects do not already exist.

ObjectExpansion

(Optional Enum attribute) Defines the extent of alteration to be performed by the Execute method.

If set to ObjectProperties, the ObjectDefinition element should contain only the complete definition of the major object to be altered, including subordinate minor objects. Subordinate major objects of the object to be altered remain unchanged.

NoteNote
When using the ObjectProperties setting with the ClrAssembly data type, the Data element of the associated ClrAssemblyFile data types does not need to be specified. If not specified, the ClrAssembly uses existing files.

If set to ExpandFull, the ObjectDefinition element should contain not just the definition of the object to be altered, but also the definitions of all major objects which are descendants of the object to be altered.

NoteNote
The ExpandFull setting cannot be used with the Server element.

Scope

(Optional Enum attribute) Defines the duration of objects defined in the ObjectDefinition element.

If set to Session, the objects defined in the ObjectDefinition element exist only for the duration of the XMLA session.

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

If this attribute is omitted, the objects defined in the ObjectDefinition element are persisted on the Analysis Services instance.

Remarks

Each Alter command changes the definition of one major object under the parent object specified by the ParentObject element.

See Also

Concepts