question

GuoxiongYuan-7218 avatar image
0 Votes"
GuoxiongYuan-7218 asked GuoxiongYuan-7218 commented

Error when deploying updates from dacpac to azure sql database

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AnuragSharma-MSFT avatar image
0 Votes"
AnuragSharma-MSFT answered GuoxiongYuan-7218 commented

Hi @GuoxiongYuan-7218, 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.



image.png (7.3 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.