Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Within the first afternoon I found 2 of the 3 needed solutions, and the 3rd came to me over the weekend!..."

Geography

Where in the world do Tek-Tips members come from?
djj55 (Programmer)
25 Jul 12 10:15
Hello, SQL Server 2008R2
If I create the master key, certificate, and symmetric key on server A\instance A and have log shipping setup to server b\instance b, will the keys and certificates be created for the second instance? So that if I need to failover we do not need to change code.
Thanks

djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!

djj55 (Programmer)
5 Oct 12 15:10
To go along with this I also have the disaster failover problem. I can backup and restore the master key and the certificate, however, the symmetric key is where I am having a problem. If I use the IDENTITY_VALUE phrase I can recreate the key on the same session. If I do not use the IDENTITY_VALUE I cannot recreate the key. BOL say that the IDENTITY_VALUE should only be used for temporary keys.

I found MS suggests using reporting services to backup/restore the symmetric key but it did not work when I followed thier instructions.

So is there a way to backup or re-create the key without the IDENTITY_VALUE?

Here is my code

CODE

CREATE SYMMETRIC KEY My_Key_01 
    WITH ALGORITHM = AES_256, 
        KEY_SOURCE = 'abccd'
        ,IDENTITY_VALUE = 'phrase1' 
    ENCRYPTION BY CERTIFICATE MyCert01;
GO 

djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!

djj55 (Programmer)
8 Oct 12 14:28
Well I found an interesting article "Cloning" Symmetric Keys" by Michael Coles. This worked well.

What I have done is stored a backup of the master key, certificate, certificate encryption file. Also keep the Key_Source and Identity_Value phrases. These are not used at this time but are for disaster recovery.

Create a backup of the database.

Go to a different server, restore the database, in SSMS, go to the database, open the master key (password needed), execute the command:

CODE

ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY 
GO 
then open the symmectric key.

djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close