Find database name with corresponding certificate name in sql server 2008

  • Is there any way or t-sql to find database name with corresponding certificate name in sql server 2008? I am referring with respect to TDE mechanism.

    Thanks.

  • sqldba4u (2/10/2012)


    Is there any way or t-sql to find database name with corresponding certificate name in sql server 2008? I am referring with respect to TDE mechanism.

    Thanks.

    Here you go

    USE [YourDB]

    selectdb_name(dek.database_id) AS ProtectedDB

    , dek.create_date

    , c.name

    , c.certificate_id

    , c.pvt_key_encryption_type_desc

    , c.pvt_key_last_backup_date

    , c.issuer_name

    , c.subject

    , c.start_date

    , c.expiry_date

    from sys.dm_database_encryption_keys dek

    inner join master.sys.certificates c on dek.encryptor_thumbprint = c.thumbprint

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Thanks, the query was useful.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply