简体   繁体   English

如何将透明数据导出到sql server中的加密数据库

[英]how to export transparent data to encrypted database in sql server

I want to move/copy transparent data from a database to another database having same tables structure but encrypted.我想将透明数据从一个数据库移动/复制到另一个具有相同表结构但加密的数据库。 How can i do this job?我怎样才能做这份工作?

In short简而言之

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

Here are a few references worth checking out: SQLServerCentral article , Transparent Data Encryption , SQL Server Security Statements , stackoverflow article以下是一些值得一看的参考资料: SQLServerCentral 文章透明数据加密SQL Server 安全声明stackoverflow 文章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM