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
- SQL Server Analysis Services instance (on‑premises or Azure Analysis Services)
- SQL Server Data Tools (SSDT) or Visual Studio 2022 with the Analysis Services extension installed
- Appropriate permissions on the target server (admin or deployment role)
- PowerShell 5.1+ (optional for scripting)
- Azure DevOps or GitHub Actions (optional for CI/CD)
Deploying using SSDT / Visual Studio
- Open your tabular project in Visual Studio.
- In Solution Explorer, right‑click the project and select Properties. Set the Target Server Version and Deployment Server URL.
- Choose Build → Deploy or press Ctrl+Shift+B.
- 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.
| Task | Description |
|---|---|
| Visual Studio Build | Build the .bim file and generate a .asdatabase file. |
| Azure PowerShell | Run a PowerShell script that calls Invoke-ASCmd against Azure Analysis Services. |
| Publish Artifact | Store the built model for later stages. |
Best Practices
- Use separate development, test, and production servers.
- Automate deployments to reduce human error.
- Validate the model after deployment with
DISCOVER_XML_METADATAor DBMDL scripts. - Maintain version control of the .bim file and deployment scripts.
Troubleshooting
If deployment fails, consider the following steps:
- Check the Output window for detailed error messages.
- Verify that the account has the Process or Admin role on the target server.
- Ensure the target server version matches the project’s Target Server Version.
- Look at the SSAS log files located at
%ProgramFiles%\Microsoft SQL Server\MSAS13.MSSQLSERVER\OLAP\Log\.