Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Administration - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 6525

Moving database master key from sql server 2008 to 2014

$
0
0
When I moved my database to an existing sql server 2008, I ran this script on the old server :BACKUP MASTER KEY TO FILE = N'path_to_file'ENCRYPTION BY PASSWORD = N'oldPassword';and after transferring the database - on the new server :RESTORE MASTER KEYFROM FILE = 'path_to_file'DECRYPTION BY PASSWORD = 'oldPassword'ENCRYPTION BY PASSWORD = 'newpassword';and all worked well.Now I want to move this database from this SQL Server 2008 iteration to an existing 2014 iteration.The BACKUP of the Master Key on the 2008 database works fine of course, but after transferring the database the RESTORE on the 2014 database fails with the error : Msg 15329, Level 16, State 30, Line 2The current master key cannot be decrypted. If this is a database master key, you should attempt to open it in the session before performing this operation. The FORCE option can be used to ignore this error and continue the operation but the data encrypted by the old master key will be lost.Naturally I don't want to lose all the encrypted data, so what is the correct statement to run on a 2014 database?Doug

Viewing all articles
Browse latest Browse all 6525

Trending Articles