Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove Always Encrypted from a column in SQL Server 2016

How can I remove the encryption property from a column in SQL Server 2016?

I've enabled this feature using the Always Encrypted wizard in SQL Server Management Studio 2016, but I would like to remove the encryption from some columns I've added before.

I wonder if the following 2 things are possible (and if so how?):

  1. Really undo the encryption using the certificate used for the encryption.
  2. Remove the encryption and leave the encrypted data in the cells.
like image 241
Bas de Raad Avatar asked May 09 '17 19:05

Bas de Raad


People also ask

Which operations are allowed on always encrypted column?

Always Encrypted supports two types of encryption: randomized encryption and deterministic encryption. Deterministic encryption always generates the same encrypted value for any given plain text value. Using deterministic encryption allows point lookups, equality joins, grouping and indexing on encrypted columns.


1 Answers

The answer for question 1) is to run the Always Encrypted wizard again and select "Plaintext" as Encryption Type.

Side note: I had to remove a default value constraint on a bit column to make the wizard complete without errors.

like image 111
Bas de Raad Avatar answered Nov 03 '22 01:11

Bas de Raad