参考
@@@code
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 = ‘$$$$’);
@@#
还原时,无法解开备份集
进行密钥及证书导入后重新还原,文件被解开,可以列出备份集中的数据库名,正常还原