Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL 2005 Encryption/Decryption Expand / Collapse
Author
Message
Posted Friday, April 23, 2010 8:39 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 19, 2014 12:52 PM
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
Post #909536
Posted Wednesday, April 28, 2010 11:49 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 12:56 PM
Points: 17,708, Visits: 15,571
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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #912245
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse