Release Devops pipeline failing for Azure Synapse Dedicated SQL Pool DB

Sadique Arrvi 1 Reputation point

Hello All,

Use case: I have build .dacpac file using VS build and .dacpac is ready as an artifact using below CI pipeline
- job: 'Builddacpac'
displayName: 'Build SQL Pool dacpac'

  - task: VSBuild@1  
    displayName: 'Builds the dacpac'  
      solution: Create dacpac from ADS test.sqlproj  
      configuration: $(BuildConfiguration)  

  - task: PublishBuildArtifacts@1  
    displayName: 'Publishes dacpac as an artifact'  
    # Publishes the dacpac as part of an artifact within Azure DevOps  
      PathtoPublish: 'bin\$(BuildConfiguration)'  
      ArtifactName: SQLPool  
      publishLocation: 'Container'  

Issue: I am trying to deploy the dacpac on the Synapse Dedicated SQL Pool database.
Database is already created and its accessible via SSMS without any issue.
But while doing a release with the same credentials its not working.
Note: I am using admin creds which has access to everything.
Below is release pipeline

- job: 'DeployDedicated'
displayName: 'Deploy to dedicated SQL Pool'

  - task: DownloadBuildArtifacts@0  
      buildType: 'current'  
      downloadType: 'single'  
      artifactName: 'SQLPool'  
      downloadPath: '$(System.ArtifactsDirectory)'  

  - task: SqlAzureDacpacDeployment@1  
    displayName: 'Deploy DACPAC to dedicated SQL Pool'  
      azureSubscription: '$(EntSub)'  
      AuthenticationType: 'server'  
      DatabaseName: 'DedicatedPool'  
      SqlUsername: '$(SynapseUser)'  
      SqlPassword: '$(Synapsepw)'  
      deployType: 'DacpacTask'  
      DeploymentAction: 'Publish'  
      DacpacFile: '$(System.ArtifactsDirectory)\SQLPool\Create dacpac from ADS test.dacpac'  
      AdditionalArguments: '/p:TreatVerificationErrorsAsWarnings=True'  


Error which I am getting:
2022-11-22T10:34:42.6693441Z ##[error]*** Could not deploy package.
2022-11-22T10:34:42.6799643Z ##[error]Unable to connect to target server '********'. Please verify the connection information such as the server name, login credentials, and firewall rules for the target server.
2022-11-22T10:34:42.6936044Z ##[error]Login failed for user '$(SynapseUser)'.
2022-11-22T10:34:42.7607142Z ##[error]The Azure SQL DACPAC task failed. SqlPackage.exe exited with code 1.Check out how to troubleshoot failures at
2022-11-22T10:34:42.8535623Z ##[section]Finishing: Azure SQL DacpacTask

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,668 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sadique Arrvi 1 Reputation point

    I had created env variabled and linked with Azure key vault but didnt linked that key vault with the release pipeline. Linking the key vault variable with release pipeline resolved the issue