??????????????????????
????1??????????????? ????汾???У???????治?????
????2???????????????????????????鱸??
????3??????????????????????? ???????????????????????????????????????????????????????? ??????????????????????????????????????????鵼?????????
??????????????
????1???????????????????????????????????????
????--?????????
????use master
????CREATE MASTER KEY ENCRYPTION BY PASSWORD ='?????'
????go
????2????????????? ??????
--???????
CREATE CERTIFICATE Cret_test
with SUBJECT = 'Certificate test'
GO
--???????????
BACKUP CERTIFICATE Cret_test
TO FILE=N'D:Cret_test.cer'
WITH PRIVATE KEY
(
FILE =N'D:Cret_test.pvk'??
ENCRYPTION BY PASSWORD='??'
)
GO
????3???????????????
--?????????
USE jiami
GO
CREATE DATABASE ENCRYPTION KEY
WITH ALGORITHM = AES_256
ENCRYPTION BY SERVER CERTIFICATE Cret_test
GO
--???????
ALTER DATABASE jiami
SET ENCRYPTION ON
GO
?????????????????????????
????1????????????????
?????????ú????????????
????USE master
????GO
????CREATE MASTER KEY ENCRYPTION BY PASSWORD = '?????'
????2?????????????
USE master
GO
CREATE CERTIFICATE Cret_test
FROM FILE=N'd:Cret_test.cer'
WITH PRIVATE KEY
(
FILE=N'd:Cret_test.pvk'??
DECRYPTION BY PASSWORD=N'??‘
)
GO