Publishing with .dbproj turns off transparent data encryption

77 Views Asked by At

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.

1

There are 1 best solutions below

0
On

After lots of trial and error, I found that deselecting the checkbox Deploy database properties stopped the publish script from including the junk about turning off encryption. Then it was a matter of finding which db property was causing this.

enter image description here

I saw my dbproj target platform was set to Microsoft Azure SQL Database not Microsoft 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 to Miscellaneous tab and check Encryption enabled. Voila, you're done. Make sure you have Deploy database properties re-enabled in your publish settings.

enter image description here

enter image description here