我想进行列级加密。例如:
--Create Master Key
USE EncryptTest
GO
CREATE MASTER KEY ENCRYPTION
BY PASSWORD = 'Test'
GO
--Create Server Cert
USE EncryptTest
GO
CREATE CERTIFICATE EncryptTestCert
WITH SUBJECT = 'Test'
GO
/* Create Symmetric Key */
USE EncryptTest
GO
CREATE SYMMETRIC KEY TestTableKey
WITH ALGORITHM = TRIPLE_DES ENCRYPTION
BY CERTIFICATE EncryptTestCert
GO
/* Encrypt the Column.*/
USE EncryptTest
GO
OPEN SYMMETRIC KEY TestTableKey DECRYPTION
BY CERTIFICATE EncryptTestCert
UPDATE TestTable
SET EncryptSecondCol = ENCRYPTBYKEY(KEY_GUID('TestTableKey'),SecondCol)
GO
--View encrypted
USE EncryptTest
GO
SELECT *
FROM TestTable
GO
我的问题是,如何备份证书或密钥?作为DBA的场景(当然不是我)意外地删除了证书/密钥,使数据库安全,但没用。我提出了这个问题,因为我看到更多的实际问题,有人用手指沾满安全感,然后是实际的安全漏洞。
答案 0 :(得分:1)
您是否遵循Microsoft TechNet上有关备份证书的文章?