Sql-server – sqlpackage.exe ignoring BlockOnPossibleDataLoss

data-tier-applicationsql serversql-server-2012ssdtvisual studio 2012

I have a dacpac that has set the BlockOnPossibleDataLoss set to false, however the deployment is blocked when I run it with sqlpackage.exe, telling me "The column [a] is being dropped, data loss could occur."

However when I use the exact same deployment profile and publish from Visual Studio 2012 it goes through.

Best Answer

Have you tried executing sqlpackage.exe with /p:BlockOnPossibleDataLoss=false in the command line?

I just used SQLPackage.exe to create a .dacpac file of my test database, then I pubished it with the /p:BlockOnPossibleDataLoss=false option, and it overwrote my database.