November 3, 2010 at 4:05 pm
I have an SQL 2005 Develoment system with one table.
The table contains an encrypted column of data that was created using a master key, a certificate and a Symmetric key.
I have moved the table to a 2005 Sql Express database on a different server.
What do I need in order to read the encrypted data?
=========================
This SP works on the Dev server.
ALTER proc [dbo].[uspGetCryptedSSN]
@InString varchar(50),
@OutString varchar(50) OUTPUT
AS
SET NOCOUNT ON
Open Symmetric key TestTableKey
Decryption By Certificate EncryptTestCert
select @OutString = (Select dbo.ufngetpc(@InString))
Close Symmetric key TestTableKey
============================
Do I need to copy the certificate and/or master key and/or Symmetric Key from the original server to the new server?
If so which files need to be copied and where are they?
I will continue to search the archives and BOL on this.
Thanks in advance.
"When in danger or in doubt. Run in circles, scream and shout!" TANSTAAFL
"Robert A. Heinlein"
November 3, 2010 at 4:15 pm
DougGifford (11/3/2010)
I have an SQL 2005 Develoment system with one table.The table contains an encrypted column of data that was created using a master key, a certificate and a Symmetric key.
I have moved the table to a 2005 Sql Express database on a different server.
What do I need in order to read the encrypted data?
Do I need to copy the certificate and/or master key and/or Symmetric Key from the original server to the new server?
Yes, you will need to restore all of these keys.
If so which files need to be copied and where are they?
I will continue to search the archives and BOL on this.
Thanks in advance.
Not trying to harp on you - but if anyone is thinking about using encryption at all, please thoroughly test what all will be involved to restore the database on a new server. Document this, so that you are ready to go when that aging server you put the database on finally does die. It's really not a matter of "if", but "when" you move to a different sql instance.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 3, 2010 at 4:20 pm
Thank you Wayne.
I am in the process of setting up and testing what you suggest.
My first step is to regenerate the keys so I can read the encrypted data.
Where might you suggest I find a "How to regenerate encryption keys on a new server?" explaination?
"When in danger or in doubt. Run in circles, scream and shout!" TANSTAAFL
"Robert A. Heinlein"
November 5, 2010 at 11:39 am
This link helped solve my problem!
http://www.eggheadcafe.com/software/aspnet/30238935/master-key-issue.aspx
"When in danger or in doubt. Run in circles, scream and shout!" TANSTAAFL
"Robert A. Heinlein"
July 21, 2017 at 4:48 pm
DougGifford - Friday, November 5, 2010 11:39 AMThis link helped solve my problem!http://www.eggheadcafe.com/software/aspnet/30238935/master-key-issue.aspx
This is what I hate about links... that link is now dead and so is, what appears to be, the correct answer. 🙁
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply