same encryption in two databases

  • Hello, i'm trying to use the same encrypted data in different servers.

    Right now i just want to use two different databases in the same server, but i just can't seem to make it work.

    I imported one table from one database to the other (they have different structures)

    The script attached is the one that i'm using, and i'm getting an error when trying to open the symmetric key.

    Can anyone tell me what i'm doing wrong?

    Thanks.


    La paz sea contigo,

    Gabriel Bribiesca

  • Gabriel,

    When trying to encrypt/decrypt data across two databases, you need to take care in how you are creating your symmetric keys. When you create the symmetric keys on each of the databases, make sure you specify the same values for the ALGORITHM, KEY_SOURCE, and IDENTITY_VALUE clauses of the CREATE SYMMETRIC KEY command.

    I've attached a link that provides more details that I found very helpful in implementing this same functionality.

    http://blogs.msdn.com/lcris/archive/2006/07/06/658364.aspx

    Hope this helps,

    Larry

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply