I noticed in the Azure Dashboard that something was turning off Transparent Data Encryption (TDE) on my database. I had turned it on through the Azure Portal. Realized that something in my dbproj publish process included:
SET ENCRYPTION OFF
There is no obvious option that would do such a thing in the publish screen.
After lots of trial and error, I found that deselecting the checkbox
Deploy database propertiesstopped the publish script from including the junk about turning off encryption. Then it was a matter of finding which db property was causing this.I saw my
dbprojtarget platform was set toMicrosoft Azure SQL DatabasenotMicrosoft Azure SQL Database V12. V12 is what has TDE, the old db does not.Once you go to the properties on your dbproj (right click proj > properties), go to project setttings, change to V12, then click on
Database Settings. Go toMiscellaneoustab and checkEncryption enabled. Voila, you're done. Make sure you haveDeploy database propertiesre-enabled in your publish settings.