Microsoft Docs

SQL Server Analysis Services

Deploying Tabular Models

Deploying a tabular model moves it from a development environment to a server where it can be accessed by end‑users and applications. This guide covers the most common deployment methods for SQL Server Analysis Services (SSAS) Tabular.

Prerequisites

Deploying using SSDT / Visual Studio

  1. Open your tabular project in Visual Studio.
  2. In Solution Explorer, right‑click the project and select Properties. Set the Target Server Version and Deployment Server URL.
  3. Choose Build → Deploy or press Ctrl+Shift+B.
  4. Review the Output window for any errors.
# Example: Deploy from command line using msbuild
msbuild MyTabularModel.sqlproj /p:Configuration=Release /p:DeployOnBuild=true /p:TargetDatabase=MyTabularModel /p:TargetServerVersion=SQL2019 /p:TargetServerName="asServer\instance"

Deploying using PowerShell

PowerShell provides a scriptable way to automate deployment, especially for CI pipelines.

# Requires the SqlServer module
Import-Module SqlServer

$server   = "asServer\instance"
$database = "AdventureWorksTabular"
$projectPath = "C:\Projects\AdventureWorks\AdventureWorksTabular.bim"

Invoke-ASCmd -Server $server -Database $database -File $projectPath -Action Deploy

Deploying using Azure DevOps

Integrate the deployment into a release pipeline.

TaskDescription
Visual Studio BuildBuild the .bim file and generate a .asdatabase file.
Azure PowerShellRun a PowerShell script that calls Invoke-ASCmd against Azure Analysis Services.
Publish ArtifactStore the built model for later stages.

Best Practices

Troubleshooting

If deployment fails, consider the following steps:

  1. Check the Output window for detailed error messages.
  2. Verify that the account has the Process or Admin role on the target server.
  3. Ensure the target server version matches the project’s Target Server Version.
  4. Look at the SSAS log files located at %ProgramFiles%\Microsoft SQL Server\MSAS13.MSSQLSERVER\OLAP\Log\.