• 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

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

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

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

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me