Decrypt issue - Msg 15581, Level 16, State 3, Line ...

  • The decryption is not working. This is a dev db (sql 2005), and it was restored from the production db backup. After restoring, we tried to run the stored procedure which contains the decryption logic.

    The procedure having the following code...

    open symmetric key enckey decryption by certificate DS_Encryptcert

    the above code through the following error

    Msg 15581, Level 16, State 3, Line1

    Please create a master key in the database or open the master key in the session before performing this operation.

    Pls can any help on this...

    Thanks in advance.

    Nithi

  • Hmmm, I've read about this problem before. I think the code you want is: -

    OPEN MASTER KEY DECRYPTION BY PASSWORD = 'password'

    ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY

    CLOSE MASTER KEY

    I've tried looking for the blog I read this on, but can't find it.


    Forever trying to learn
    My blog - http://www.cadavre.co.uk/
    For better, quicker answers on T-SQL questions, click on the following...http://www.sqlservercentral.com/articles/Best+Practices/61537/
    For better, quicker answers on SQL Server performance related questions, click on the following...http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply