SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL 2005 Encryption/Decryption


SQL 2005 Encryption/Decryption

Author
Message
Richard Busse
Richard Busse
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 56
Hi,

I have encryption/decryption set up on database A with a database master key, certificate and symmetric key. I am copying encrypted data from database A to database B. My goal is to decrypt the data on database B but I am having problems decrypting data on database B which was initially encyrpted on database A. Both databases are on same server.

Here is what I did:

On database A--> backup database master key
On database A--> backup certificate
On database B--> restore database master key from backup (above)
On database B--> restore certificate from backup(above)
On database B--> create a symmetric key based on certificate

Then I try to run the standard decrypting functions on database B against the data copied over from database A and I just get NULL's? However, data which I encrypt on database B can be decrypted on database B successfully. I just can't use database B to decrypt data which was initially encrypted on database A? How can I use database B to decrypt data which was initially encrypted on database A?

Any ideas are greatly appreciated?

Thanks!
Rick
SQLRNNR
SQLRNNR
SSC-Dedicated
SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)SSC-Dedicated (32K reputation)

Group: General Forum Members
Points: 32276 Visits: 18552
Can you provide the scripts that you used to restore the key and certificate? Obfuscate the actual names and passwords.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search