MASTER KEY ENCRYPTION - SQL Server 2008

Dear Experts,

I have a problem. We had a database promoted from dev to test via redirected restore.

The database has an encrypted column. As you can imagine, the key no longer works.

Is there a way to drop the key and recreate a new one?

Or

Do I have to drop the key, create a new key, then update the column with the values using the encrypt function?

Thanks!
Keith
glo-dbaAsked:
Who is Participating?
 
DBAduck - Ben MillerPrincipal ConsultantCommented:
OPEN MASTER KEY DECRYPTION BY PASSWORD = 'password that was used to create the key'

You would do this while in the database that has the master key.
0
 
DBAduck - Ben MillerPrincipal ConsultantCommented:
What you need to do is to open the Master Key with the password it was created with on the other system and then close the key again.  This will allow the new server to encrypt the master key with the Service Master Key and you will be good to go.  You should not drop the key.
0
 
DBAduck - Ben MillerPrincipal ConsultantCommented:
0
 
glo-dbaAuthor Commented:
Thanks I'll try that next time.. I was out of time and so I did drop and create a new key. I was lucky enough to have the column stored elsewhere and a column to join on so nothing was lost. Thanks for your response,

Keith
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.