Last active
December 16, 2015 08:09
-
-
Save sbjustin/5404228 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
database_id as 'Database ID', name as 'Database Name', | |
CASE encryption_state | |
WHEN 0 THEN 'No database encryption key present, no encryption' | |
WHEN 1 THEN 'Unencrypted' | |
WHEN 2 THEN 'Encryption in progress' | |
WHEN 3 THEN 'Encrypted' | |
WHEN 4 THEN 'Key change in progress' | |
WHEN 5 THEN 'Decryption in progress' | |
WHEN 6 THEN 'Protection change in progress' | |
END as Status | |
from | |
sys.dm_database_encryption_keys e | |
join | |
sys.sysdatabases d | |
on | |
e.database_id = d.dbid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment