参考https://www.cnblogs.com/xwgli/p/4522502.html
SELECT DB_NAME(database_id) AS DatabaseName, * FROM sys.dm_database_encryption_keys;
GO
USE master;
CREATE MASTER KEY ENCRYPTION BY PASSWORD = '$$$$';
USE master;
CREATE CERTIFICATE BackupCert WITH SUBJECT = '备份证书';
USE master;
BACKUP CERTIFICATE BackupCert TO FILE = 'c:\data\dbbak\bj_yun\BackupCert.cer'
WITH PRIVATE KEY ( FILE = 'c:\data\dbbak\bj_yun\BackupCert.pkey', ENCRYPTION BY PASSWORD = '$$$$' );
--还原证书
CREATE CERTIFICATE BackupCert FROM FILE = 'c:\temp\BackupCert.cer'
WITH PRIVATE KEY ( FILE = 'c:\temp\BackupCert.pkey', DECRYPTION BY PASSWORD = '$$$$');
@@#
还原时,无法解开备份集
进行密钥及证书导入后重新还原,文件被解开,可以列出备份集中的数据库名,正常还原