Question

Is there a way to tell when a database is completely encrypted when using SQL 2008 TDE? I.e.,

ALTER DATABASE mydb SET ENCRYPTION ON

The only way I can think of is to keep trying to detach mydb. It won't detach until all pages are encrypted. However, I'd like to have a cleaner way that does not involve detaching?

Thanks.

Était-ce utile?

La solution

Looks like this information can be found in sys.dm_database_encryption_keys.

encryption_state = 3 indicates the database and logs are encrypted. encryption_state = 2 means Encryption in progress in which case you might want to also look at the percent_complete column.

Autres conseils

old, but I'll just place it over here. pay attention on "percent_complete"

SELECT DB_NAME(database_id) DbName, encryption_state EncryptState, percent_complete, key_algorithm KeyAlgorithm, key_length KeyLength, encryptor_type EncryptType FROM sys.dm_database_encryption_keys;

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top