sql - Error when restoring encrypted database -
i use following create certificate database encryption.
use master --create certificate create certificate cert4tde subject = 'certificate tde'; go --back certificate backup certificate cert4tde file = 'e:\asd\cert4tde.crt' private key ( file = 'e:\asd\privatekeyofcert4tde.pvk' , encryption password = 'p@ssword2' ); go use [test5] go create database encryption key algorithm = aes_256 --supported encryption algorithms aes 128-bit, 192‑bit, or 256‑bit keys or 3 key triple des encryption server certificate cert4tde go alter database [test5] set encryption on;
go
after backuping t5 database , remove certificate sql, try importing certificate file
create certificate cert4tde file = 'e:\asd\cert4tde.crt' private key (file = 'e:\asd\privatekeyofcert4tde.pvk', encryption password = 'p@ssword2', decryption password = 'p@ssword2')
i expect after importing certificate, can restore test5 database, throws error : the certificate has private key protected user defined password . doing wrong?
Comments
Post a Comment