小编Bar*_*SIH的帖子

查询以列出数据库的加密证书

使用什么证书来加密实例上的每个数据库。

我可以使用以下方法获取数据,但如何编写查询

USE master
GO

-- this provides the list of certificates
SELECT * FROM sys.certificates


-- this provides the list of databases (encryption_state = 3) is encrypted
SELECT * FROM sys.dm_database_encryption_keys
 WHERE encryption_state = 3;
Run Code Online (Sandbox Code Playgroud)

我注意到 sys.certifcates.thumbprint 和 sys.dm_database_encryption_keys.encryptor_thumbprint 列包含相同的数据。

security sql-server encryption transparent-data-encryption

19
推荐指数
2
解决办法
6万
查看次数