An Error occured During Master key Decryption

Gnana Balaji Kanagaraj 41 Reputation points
2023-01-13T21:05:37.6+00:00

Dear All,

We were trying to create Database Master key for one of the User database, but its getting failed with below error.

"An Error occured During Master key Decryption"

We are not sure above Server Master Key Password also. Any help would be appreciated.

SQL Server | Other
{count} votes

Accepted answer
  1. Matthew Bechtol 491 Reputation points
    2023-01-13T21:45:36.9266667+00:00

    Try too Regenerate the service master key by using the Transact-SQL statement

    ALTER SERVICE MASTER KEY FORCE REGENERATE

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Seeya Xi-MSFT 16,586 Reputation points
    2023-01-19T03:06:46.2933333+00:00

    Hi Gnana Balaji Kanagaraj,

    The FORCE option causes the key regeneration process to continue even if the process cannot retrieve the current master key, or cannot decrypt all the private keys that are encrypted with it. Use FORCE only if regeneration fails and you cannot restore the service master key by using the RESTORE SERVICE MASTER KEY statement.

    The service master key is the root of the SQL Server encryption hierarchy. The service master key directly or indirectly protects all other keys and secrets in the tree. If a dependent key cannot be decrypted during a forced regeneration, the data the key secures will be lost.

    Please refer to this document: https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-service-master-key-transact-sql?view=sql-server-ver16

    Best regards,

    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.