Επεξεργασία

Κοινή χρήση μέσω


Analysis Services Scripts Project in SQL Server Management Studio

Applies to: SQL Server Analysis Services Azure Analysis Services Fabric/Power BI Premium

In SQL Server Analysis Services, you can create an Analysis Server Scripts project in SQL Server Management Studio to group related scripts together for development, management, and source control purposes. If no solution is currently loaded in SQL Server Management Studio, creating a new Analysis Server Scripts project automatically creates a new solution. Otherwise, the new Analysis Server Scripts project can be added to the existing solution or created in a new solution.

You use the following basic steps to create an Analysis Server Scripts project in SQL Server Management Studio:

  1. On the File menu, point to New, and then click Project.

    Select Analysis Server Scripts project template and then specify a name and location for the new project.

  2. Right-click Connections to create a new connection in the Connections folder of the Analysis Server Scripts project in Solution Explorer.

    This folder contains connection strings to SQL Server Analysis Services instances, against which the scripts contained by the Analysis Server Scripts project can be executed. You can have multiple connections in an Analysis Server Scripts project, and you can choose a connection against which to run a script contained by the project at the time of execution.

  3. Right-click Queries to create Multidimensional Expressions (MDX), Data Mining Extensions (DMX), and XML for Analysis (XMLA) scripts in the Scripts folder of the Analysis Server Scripts project in Solution Explorer.

  4. Right-click on the project, point to Add, and then select Existing Item to add miscellaneous files, such as text files that contain notes on the project, in the Miscellaneous folder of the Analysis Server Scripts project in Solution Explorer. These files are ignored by SQL Server Management Studio.

File Types

A SQL Server Management Studio solution can contain several file types, depending on what projects you included in the solution and what items you included in each project for that solution. For more information about file types for solutions in SQL Server Management Studio, see Files That Manage Solutions and Projects. Typically, the files for each project in a SQL Server Management Studio solution are stored in the solution folder, in a separate folder for each project.

The project folder for an Analysis Server Scripts project can contain the file types listed in the following table.

File type Description
Analysis Server Scripts project definition file (.ssmsasproj) Contains metadata about the folders shown in Solution Explorer, as well as information that indicates which folders should display files included in the project.

The project definition file also contains the metadata for SQL Server Analysis Services connections contained in the project, as well as metadata that associates connections with script files included in the project.
DMX script file (.dmx) Contains a DMX script included in the project.
MDX script file (.mdx) Contains an MDX script included in the project.
XMLA script file (.xmla) Contains an XMLA script included in the project.

Analysis Services Templates

When adding new MDX, DMX, or XMLA scripts to an Analysis Server Scripts project, you have the option of using Template Explorer to locate SQL Server Analysis Services templates, which are a collection of predefined scripts or statements that demonstrate how to perform a specified action. Template Explorer is available on the View menu and includes templates for SQL Server, SQL Server Analysis Services, and SQL Server Compact. For more information, see Use Analysis Services Templates in SQL Server Management Studio.

See Also

Creating Multidimensional Models Using SQL Server Data Tools (SSDT)
Multidimensional Expressions (MDX) Reference
Data Mining Extensions (DMX) Reference
Analysis Services Scripting Language (ASSL for XMLA)
Analysis Services Scripting Language (ASSL for XMLA)