Error when deploying updates from dacpac to azure sql database

Guoxiong 8,126 Reputation points
2021-10-21T22:17:33.713+00:00

I have a database, let's call XYZ on my local SQL Server Developer 2019 edition. I wanted to deploy it to the Azure SQL Database. I used the wizard "Deploy Database to Microsoft Azure SQL Database" on SSMS and it worked. And then I made some changes in my local database and used the wizard "Extract data-tier application" on SSMS to generate the XYZ.dacpac file. I tried to use the following command SqlPackage.exe to deploy the DACPAC to my Azure SQL Database:

SqlPackage.exe /SourceFile:"DIRECTORY_PATH\XYZ.dacpac" /Action:Publish /TargetServerName:"azure_sql_server_name" /TargetDatabaseName:"XYZ" /TargetUser:"sql_admin_user" /TargetPassword:"sql_admin_user_passwrord"

but I got the error:

An error occurred during deployment plan generation. Deployment cannot continue.
A project which specifies SQL Server 2019 or Azure SQL Database Managed Instance as the target platform cannot be published to Microsoft Azure SQL Database v12.

Anyone knows how to fix it? Thanks in advance!

Azure SQL Database
0 comments No comments
{count} votes

Accepted answer
  1. Anurag Sharma 17,571 Reputation points
    2021-10-22T07:21:39.6+00:00

    Hi @Guoxiong , welcome to Microsoft Q&A forum.

    Please try adding /p:AllowIncompatiblePlatform=true at the end and run the command again as below:

    SqlPackage.exe /SourceFile:"DIRECTORY_PATH\XYZ.dacpac" /Action:Publish /TargetServerName:"azure_sql_server_name" /TargetDatabaseName:"XYZ" /TargetUser:"sql_admin_user" /TargetPassword:"sql_admin_user_passwrord" /p:AllowIncompatiblePlatform=true  
    

    You might see the same message as a warning, you can ignore it.

    Please let us know if you see any issue and we can discuss further.

    ----------

    Please don't forgot to click on accept it as answer button 142807-image.png wherever the information provided helps you. This can be beneficial to other community members as well.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful