Prash's Blog

Error 15581 – Please create a master key in the database or open the master key in the session before performing this operation June 19, 2015

Filed under: Uncategorized — prazjain @ 4:16 pm

SQLUNINTERRUPTED

Recently I was working with a client, when a unique issue was brought to my notice. As per the client, when they are tying to restore a TDE enabled database to another server, they cannot perform the restore using SSMS User interface. They were able to restore the database using T-SQL though.

Now this sounded a bit funny, but then the customer showed it to me. Since I did not have any answers at that time, I decided to try it out later and check and see if anything they are doing is wrong or not.

To begin with, I checked their scripts for enabling Transparent Database Encryption on the databases and also their backup scripts for the master key and certificates.

Sample code for the screen provided by the customer is provided below.

   1:USE master;

   2:GO

   3:

   4:CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'MyStrongPassword';

View original post 492 more words

Advertisements