April 29, 2016 at 11:00 am
Trying to do an if exists, but i'm not sure which table to check to see a database encryption key flag. Does anyone know?
so I want to check if the db encryption key exists or not, than
CREATE DATABASE ENCRYPTION KEY
WITH ALGORITHM = AES_256
ENCRYPTION BY SERVER CERTIFICATE TDECert
Please help.
So i basically want to do this:
if not exists (select 1 from WhereIsThisFreagingDBEncryptionKey_Table?)
BEGIN
CREATE DATABASE ENCRYPTION KEY
WITH ALGORITHM = AES_256
ENCRYPTION BY SERVER CERTIFICATE TDECert
END
April 29, 2016 at 11:41 am
Think this is what you are looking for..
sys.dm_database_encryption_keys
April 30, 2016 at 7:01 am
Great, thank you! that was it.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply