1

I'm using TDE for SQL Server. Querying certificate:

select database_name = d.name,
dek.encryptor_type,
cert_name = c.name
from sys.dm_database_encryption_keys dek
left join sys.certificates c
on dek.encryptor_thumbprint = c.thumbprint
inner join sys.databases d
on dek.database_id = d.database_id;

Output:

database     encryptor        cert_name
tempdb      ASYMMETRIC KEY    NULL
TDE_Test    CERTIFICATE       TestZert3

Querying encryption status:

select db_name(database_id), encryption_state,   
percent_complete, key_algorithm, key_length
from sys.dm_database_encryption_keys

Output:

database  encrypt_state percent_complete key_algorithm
tempdb      3             0              AES 256 
TDE_Test    3             0               AES 256

Why is the complet_percent 0?

5

Why is the complect_percent 0?

Your database is already encrypted - encrypt_state = 3 -- Encrypted.

When the encryption is in progress, you will see the percent_complete value. When the database is encrypted, the percent_complete will be 0.

you can refer to my script for listing out the databases, encryption status along with other useful information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.