March 01, 2010

Resolving “Please create a master key in the database or open a master key in the session before performing this operation” error




While creating a backup or using the back up of an encrypted database, you may encounter the error - “Please create a master key in the database or open a master key in the session before performing this operation”

You can resolve this error by using:

OPEN MASTER KEY DECRYPTION BY PASSWORD = ‘thepassword'
ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY

You can even backup the master key and then restore it to avoid this error. Here are some additional links to help you resolve this error:

Master Key Closed After Database Copy

Question on restoring encrypted databases on different servers

Getting: The key is not encrypted using the specified decryptor after DB restore


Did you like this post?
kick it on DotNetKicks.com
subscribe via rss subscribe via e-mail
print this post follow me on twitter


About The Author

Suprotim Agarwal, ASP.NET Architecture MVP works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls.

Follow him on twitter @suprotimagarwal

 
  Feedback:

comments

0 Responses to "Resolving “Please create a master key in the database or open a master key in the session before performing this operation” error"
 

Copyright © 2009-2014 All Rights Reserved for SQLServerCurry.com by Suprotim Agarwal | Terms and Conditions