Link to home
Start Free TrialLog in
Avatar of glo-dba
glo-dba

asked on

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
Avatar of DBAduck - Ben Miller
DBAduck - Ben Miller
Flag of United States of America image

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.
ASKER CERTIFIED SOLUTION
Avatar of DBAduck - Ben Miller
DBAduck - Ben Miller
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of glo-dba
glo-dba

ASKER

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