|
1 |
| -SELECT |
2 |
| - DB_NAME(database_id) AS DatabaseName, |
| 1 | +SELECT |
| 2 | + DB_NAME(database_id) AS DatabaseName, |
3 | 3 | encryption_state,
|
4 |
| - encryption_state_desc = CASE encryption_state |
5 |
| - WHEN '0' THEN 'No database encryption key present, no encryption' |
6 |
| - WHEN '1' THEN 'Unencrypted' |
7 |
| - WHEN '2' THEN 'Encryption in progress' |
8 |
| - WHEN '3' THEN 'Encrypted' |
9 |
| - WHEN '4' THEN 'Key change in progress' |
10 |
| - WHEN '5' THEN 'Decryption in progress' |
11 |
| - WHEN '6' THEN 'Protection change in progress (The certificate or asymmetric key that is encrypting the database encryption key is being changed.)' |
12 |
| - ELSE 'No Status' |
13 |
| - END, |
| 4 | + encryption_state_desc = |
| 5 | + CASE encryption_state |
| 6 | + WHEN '0' THEN 'No database encryption key present, no encryption' |
| 7 | + WHEN '1' THEN 'Unencrypted' |
| 8 | + WHEN '2' THEN 'Encryption in progress' |
| 9 | + WHEN '3' THEN 'Encrypted' |
| 10 | + WHEN '4' THEN 'Key change in progress' |
| 11 | + WHEN '5' THEN 'Decryption in progress' |
| 12 | + WHEN '6' THEN 'Protection change in progress (The certificate or asymmetric key that' |
| 13 | + + ' is encrypting the database encryption key is being changed.)' |
| 14 | + ELSE 'No Status' END, |
14 | 15 | percent_complete,
|
15 |
| - encryptor_thumbprint, |
16 |
| - encryptor_type |
17 |
| -FROM sys.dm_database_encryption_keys |
| 16 | + certificate_name = (SELECT name |
| 17 | + FROM master.sys.certificates AS c |
| 18 | + WHERE c.thumbprint = a.encryptor_thumbprint), |
| 19 | + encryptor_thumbprint, |
| 20 | + encryptor_type |
| 21 | +FROM sys.dm_database_encryption_keys a |
0 commit comments