RSS

Assymetric Encryption – Moving an encrypted database to another server

19 Jul
Step 1: Create Master Key - Only if one doesn't already exist in the 
destination.
Note: One Master Key per Instance
USE master;
GO
CREATE MASTER KEY ENCRYPTION BY PASSWORD = '*rt@40(FL&dasl1';
GO
Step 2: Restore/Recreate the certificate used to encrypt the database that 
needs to be moved.
-- Recreate the server certificate by using the original server certificate 
    backup file. 
-- The password must be the same as the password that was used when the backup
    was created.

CREATE CERTIFICATE TestSQLServerCert 
FROM FILE = 'TestSQLServerCert'
WITH PRIVATE KEY 
(
    FILE = 'SQLPrivateKeyFile',
    DECRYPTION BY PASSWORD = '*rt@40(FL&dasl1'
);
GO

Step 3:
Create the database on the destination server using the mdf file or restore 
from a backup.

From 
http://technet.microsoft.com/en-us/library/ff773063.aspx
 
Leave a comment

Posted by on July 19, 2013 in SQL Server

 

Leave a comment