我想将透明数据从数据库移动/复制到具有相同表格结构但已加密的另一个数据库。我怎么能做这份工作?
答案 0 :(得分:0)
简而言之
OPEN SYMMETRIC KEY [*YourKeyName*]
DECRYPTION BY CERTIFICATE [*YourCertName*]
GO
DECLARE @Key_Guid AS UNIQUEIDENTIFIER
SET @Key_Guid = key_guid('*YourKeyName*')
IF( @Key_Guid is not null )
BEGIN
<*Perform your Insert here*>
END
CLOSE SYMMETRIC KEY *YourKeyName*
GO
以下是一些值得一试的参考资料: SQLServerCentral article,Transparent Data Encryption,SQL Server Security Statements,stackoverflow article