Unable to publish DACPAC to Azure SQL Database using sqlpackage.exe

前端 未结 2 1334
孤城傲影
孤城傲影 2021-01-23 14:57

When trying to apply a DACPAC to an Azure SQL Database I\'m getting the following from sqlpackage.exe:

*** An error occurred during deployment plan genera

相关标签:
2条回答
  • 2021-01-23 15:33

    It seems you may need to update Microsoft SQL Server Data-Tier Application Framework on your computer. Please download the latest version here. After installation, you will find it on the following path C:\Program Files (x86)\Microsoft SQL Server\130\DAC\bin\SqlPackage.exe” and updates independently of SSDT / SSMS.

    SSMS has its own version of SqlPackage. SSDT has its own version also, which you may find at C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130.

    0 讨论(0)
  • 2021-01-23 15:39

    Azure SQL is a PaaS Service which means it receives update transparently and relatively often with a new compatibility level.

    Azure SQL is now 150.
    When you create a new database it will be configured using the latest version. However, your machine, your deployment agents might not have the latest tooling deployed.
    When the tooling does not match the compatibility level of your database, the deployment will fail.

    If you are deploying using VSTS Hosted Agent you are not in control, and it will always lag a little behind. In that case, the easiest fix is to reduce your database Compatibility level.
    This is quite easy as you just need to run an SQL Statement on the database as follow:

    ALTER DATABASE database_name
    SET COMPATIBILITY_LEVEL =  130;
    
    0 讨论(0)
提交回复
热议问题