SQL Server 2016 TDE 加密大文本专栏

SQL Server 2016 TDE Encryption on big text column

我们在文本大小较小的列上成功实施了 SQL TDE (SQL 2016),但在大列上会出错

Table结构

ID - value
1 - wanted to confirm her order for the install, adv that the activation date was set 
2 - Edward called to have his order processed. Order processed for 20M, leased modem and self install. Due date for the above to be renewed in end of the year
3 - was unable to transfer, no one answered, customer said that they have mpvs' number 
4- Placed order for modems

ALTER TABLE [TextValues]
add    value_encrypt varbinary(max)
go

UPDATE [TextValues]
SET value_encrypt=EncryptByKey (Key_GUID('SymKey_Encryption'), value)
FROM [TextValues];

"ERROR: "字符串或二进制数据将被截断。 声明已终止。

您的问题与 TDE 无关。 TDE 是一种低级存储加密选项,无需更改应用程序代码即可透明地加密静态数据(即数据库文件中的数据)。

ENCRYPTBYKEY T-SQL 函数以编程方式加密数据。这个函数 returns 一个 varbinary(8000) 结果。当加密值超过 8000 字节时,您将收到截断错误,因此不能用于加密大值。

如果您的目标是保护静态数据,TDE 是最容易实现的,因为不需要更改代码。可以使用 TLS encryption.

通过网络进一步保护数据