sql 设置sql server透明加密(TDE),然后备份密钥和证书进行恢复,

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql 设置sql server透明加密(TDE),然后备份密钥和证书进行恢复,相关的知识,希望对你有一定的参考价值。

use master
create master key encryption by password = 'xxxxx';

select * from sys.symmetric_keys

create certificate myTestCert with subject = 'MyTestCertificate'

select * from sys.certificates

use dbTest2
create database encryption key
with algorithm = aes_256
encryption by server certificate [myTestCert]

alter database dbTest2 set encryption on


use master
go
create master key encryption by password = 'CatDog12'
go
create certificate SQL03_tde with subject = 'SQL_03 TDE'
go
use MyData
go
create database encryption key with algorithm = AES_128
encryption by server certificate SQL03_tde
go
alter database MyData set encryption on
go
use master 
go
backup certificate SQL03_tde
to file = 'C:\Backups\TDE\sql03cert'
with private key (file='C:\Backups\TDE\sql03CertKey', encryption by password='xxxx')

以上是关于sql 设置sql server透明加密(TDE),然后备份密钥和证书进行恢复,的主要内容,如果未能解决你的问题,请参考以下文章

SQL Server 2016 TDE:“DB_name”的数据库加密扫描已中止

透明数据加密 (TDE)常见问题解答

数据库安全之TDE列加密

SQL Server安全(9/11):透明数据加密(Transparent Data Encryption)

AlwaysOn 与 TDE 和停机时间

Oracle LiveLabs实验:DB Security - Transparent Data Encryption (TDE)