2017-09-14 10 views
0

나는이 간단한 선택을 수행하기 위해 노력하고 이제 2016 년수없는

SQL Server에서 항상 암호화 기능을 사용하여 암호화 된 datetime 열이있는 테이블이 있습니다 : SSMS에서

Msg 33299, Level 16, State 2, Line 5
Encryption scheme mismatch for columns/variables 'dt_order'. The encryption scheme for the columns/variables is (encryption_type = 'DETERMINISTIC', encryption_algorithm_name = 'AEAD_AES_256_CBC_HMAC_SHA_256', column_encryption_key_name = 'myColHML', column_encryption_key_database_name = 'TESTING') and the expression near line '1' expects it to be (encryption_type = 'PLAINTEXT') (or weaker).

나는 연결 옵션도 난 "열 암호화 설정은 = 사용"이미 설정 한 :

select max(dt_order) 
from orders 
where customer = 123; 

이 오류로 실행하고 쿼리 옵션 설정 "항상 암호화 할 수 있도록 매개 변수 활성화"

어떤 생각?

답변

0

데이터가 클라이언트 측의 키를 사용하여 암호화되므로 SQL Server는 최대 값을 계산할 수 없습니다. 이것은 SQL Server에 키가 없기 때문입니다. Always Encrypted의 주요 가치 제안은 SQL Server 관리자의 데이터를 보호한다는 것입니다. 현재 암호화 된 열에서 가능한 유일한 연산은 항등식입니다. 공식 문서에서

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. However, but may also allow unauthorized users to guess information about encrypted values by examining patterns in the encrypted column, especially if there is a small set of possible encrypted values, such as True/False, or North/South/East/West region. Deterministic encryption must use a column collation with a binary2 sort order for character columns.

Randomized encryption uses a method that encrypts data in a less predictable manner. Randomized encryption is more secure, but prevents searching, grouping, indexing, and joining on encrypted columns.