Export (0) Print
Expand All

How to: Script Analysis Services Objects

There are several object types in Microsoft SQL Server 2005 Analysis Services (SSAS) that can be managed by using scripts. This list of objects includes the elements of an Analysis Services database. Specifically, this list of objects includes data sources, data source views, cubes, dimensions, mining structures, and roles.

To create, alter or delete objects using Scripts in Analysis Services, you can use SQL Server Management Studio and you should be conversant with XML for Analysis (XMLA). However, SQL Server Management Studio has a feature that automatically creates the XMLA script required to create objects like cubes. This automation feature helps you reduce the learning curve for XMLA.

ms174794.note(en-US,SQL.90).gifNote:
For more information about how to use XMLA, see Using XML for Analysis in Analysis Services (XMLA).

ms174794.note(en-US,SQL.90).gifImportant:
When scripting the Role Object, you need to be aware that security permissions are contained by the objects they secure rather than with the security role with which they are associated.

  1. In SQL Server Management Studio, connect to an instance of Analysis Services.

  2. Locate the object for which you want to create a script that either creates, alters, or deletes objects.

  3. Right-click the object, point to Script Cube as, point to CREATE To, ALTER To, or Delete To, and then click one of the following options: New Query Editor Window to open the query editor window, File to save the XMLA script to a file, or Clipboard to save the XMLA script to the Clipboard.

    ms174794.note(en-US,SQL.90).gifNote:
    Typically, you would select File if you want to create multiple different versions of the file.

Community Additions

ADD
Show:
© 2014 Microsoft