The database master key is the root of the encryption hierarchy within a single database. It is a symmetric key that is stored in its database and that can be used to protect certificates and asymmetric keys. The database master key itself is protected with one or more passwords and additionally with the service master key.
The CREATE MASTER KEY statement can be used to create the database master key for the current database. The statement requires a password to be specified. That password has to comply with the local password policies.
After the key is created with this statement, it is protected by the specified password. However, it is also automatically protected by the service master key. You cannot change this behavior, but you can alter the key after it was created to drop the encryption by the service master key.
To check if the database master key exists, you can use the sys.symmetric_keys catalog view like this:
On my machine, this statement produces the following output:
The database master key is at the root of the encryption hierarchy within a single SQL Server database and can provide protection for asymmetric keys and certificates. The database master key itself is protected by the service master key.
This article is part of the Encryption Hierarchy series. Check out The SQL Server Encryption Hierarchy for an overview of the hierarchy and a list of all posts that are part of the series.
You must be logged in to post a comment.
Pingback: How to Back Up the Database Mater Key - sqlity.net