Today, I worked on a service request that our customer using Always Encrypted is facing the following error message: SqlErrorNumber=33277,Class=16,ErrorCode=-2146232060,State=2,Errors=[{Class=16,Number=33277,State=2,Message=Encryption scheme mismatch for columns/variables 'ColumnName'. The encryption scheme for the columns/variables is (encryption_type = 'RANDOMIZED', encryption_algorithm_name = 'AEAD_AES_256_CBC_HMAC_SHA_256', column_encryption_key_name = 'CEK_Auto1', column_encryption_key_database_name = 'xxx') and the expression near line '1' expects it to be DETERMINISTIC, or PLAINTEXT.
Using Azure Data Studio -> SQL Server Profiler extension during the execution of the application we saw:
IF OBJECT_ID('[SalesLT].[TemporalTable]', 'U') IS NULL
BEGIN
select * into [SalesLT].[TemporalTable] from [SalesLT].[SalesOrderDetail] where 1 = 2
union select * from [SalesLT].[SalesOrderDetail]
END
Enjoy!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.