Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Decrypt issue


Decrypt issue

Author
Message
ALZDBA
ALZDBA
SSCertifiable
SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)

Group: General Forum Members
Points: 6976 Visits: 8839
As Steve said : the password doen't need to be the same;

The backup password is used to encrypt the backup itself. Nothing else.

Johan


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere w00t

- How to post Performance Problems
- How to post data/code to get the best help


- How to prevent a sore throat after hours of presenting ppt ?


"press F1 for solution", "press shift+F1 for urgent solution" :-D


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me Alien but most of the time this is me Hehe
newbieuser
newbieuser
Old Hand
Old Hand (381 reputation)Old Hand (381 reputation)Old Hand (381 reputation)Old Hand (381 reputation)Old Hand (381 reputation)Old Hand (381 reputation)Old Hand (381 reputation)Old Hand (381 reputation)

Group: General Forum Members
Points: 381 Visits: 915
Thank you
newbieuser
newbieuser
Old Hand
Old Hand (381 reputation)Old Hand (381 reputation)Old Hand (381 reputation)Old Hand (381 reputation)Old Hand (381 reputation)Old Hand (381 reputation)Old Hand (381 reputation)Old Hand (381 reputation)

Group: General Forum Members
Points: 381 Visits: 915
I've the same issue still going on.. At this stage, we just want to provide our clients with what they will need to do when the master key gets corrupted.. So for testing this, I'm restored our database(UMP) to test. I took a backup of the master key from the UMP database.

use UMP
BACKUP MASTER KEY TO FILE = 'd:\ump\umpkey'
ENCRYPTION BY PASSWORD = '123'

Now, on the test database the decryption works perfect. I tried below to corrupt the master key:

OPEN MASTER KEY DECRYPTION BY PASSWORD = '239kc5i4gt6j81mn3k';

ALTER MASTER KEY
REGENERATE WITH ENCRYPTION BY PASSWORD = 'tst';

Now tried to decrypt the existing records, since the master key is altered- I expect the decryption not to work. But it decrypts successfully. Is there any other way to test our situation? We just want to test if the backup and restore of the master key will work incase of lost master key or corrupt master key so we can provide the steps to the client.

Thanks again for your help.
ALZDBA
ALZDBA
SSCertifiable
SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)

Group: General Forum Members
Points: 6976 Visits: 8839
psangeetha (5/14/2009)
I've the same issue still going on.. At this stage, we just want to provide our clients with what they will need to do when the master key gets corrupted.. So for testing this, I'm restored our database(UMP) to test. I took a backup of the master key from the UMP database.

use UMP
BACKUP MASTER KEY TO FILE = 'd:\ump\umpkey'
ENCRYPTION BY PASSWORD = '123'

Now, on the test database the decryption works perfect. I tried below to corrupt the master key:

OPEN MASTER KEY DECRYPTION BY PASSWORD = '239kc5i4gt6j81mn3k';

ALTER MASTER KEY
REGENERATE WITH ENCRYPTION BY PASSWORD = 'tst';

Now tried to decrypt the existing records, since the master key is altered- I expect the decryption not to work. But it decrypts successfully. Is there any other way to test our situation? We just want to test if the backup and restore of the master key will work incase of lost master key or corrupt master key so we can provide the steps to the client.

Thanks again for your help.


The key you provided with "Open master key" was the correct key !
When it regenerates the encryption with the new password you provide, it actually rewrites all stuff that is encrypted !

That's why it is still working.

What you could try on your TEST system is to restore another master key. Doing that should actually corrupt the existing encrypted data !

I did NOT try this myself !!!

Play it safe....Start with a full backup !!!

Johan


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere w00t

- How to post Performance Problems
- How to post data/code to get the best help


- How to prevent a sore throat after hours of presenting ppt ?


"press F1 for solution", "press shift+F1 for urgent solution" :-D


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me Alien but most of the time this is me Hehe
worut
worut
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 4
Try this:

USE master
GO
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'pass'
GO
ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY
GO

And later rest of the restoration procedure.
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