w****n 发帖数: 266 | 1 数据库里的email和SSN加密了,在SSRS里怎么解密,还原数据?
这个是我在shared dataset里的 SQL 语句, 出来的report里SSN还是显示Error
Use xxxx
GO
OPEN SYMMETRIC KEY Generickey DECRYPTION BY CERTIFICATE EncryptCert
GO
SELECT LName,
FName,
Convert(nvarchar(256),Convert(varbinary(256),DECRYPTBYKEY([SSN]))) as SSN
FROM table | w****n 发帖数: 266 | 2 解决了,提取 shared dataset的SQL语句改为:
OPEN SYMMETRIC KEY xxxKey DECRYPTION BY CERTIFICATE xxxCert;
SELECT CONVERT(VARCHAR(50),DECRYPTBYKEY(EncryptSSN)) AS DecryptSSN
FROM table |
|