mysqldeploymentazure-sql-databasesqlpackage

Azure SQL DacPac deployment failing when trying to drop a column even though /p:BlockOnPossibleDataLoss=False is set for SqlPackage.exe


Though I am using flag BlockOnPossibleDataLoss=False in my Azure SQL Dacpac Deployment pipeline, it is ignoring the flag producing the following errors, Can someone suggest what I am missing-

*** Could not deploy package.
Error SQL72015: The column [Demo].[Demo_ORGS].[CompanyCD] is being dropped, data loss could occur.

I am using these 3 flags as of now, Still facing the same error-

/p:BlockOnPossibleDataLoss=False /p:AllowDropBlockingAssemblies=True /p:TreatVerificationErrorsAsWarnings=True


Solution

  • BlockOnPossibleDataLoss = False can fail during deployment plan execution if data is present on the target that cannot be converted to the new column type.

    For more information refer to this link.

    You can visit to this github link, where other users have shared some solutions which might help you.