Need system query for retrieving list of encrypted columns in a database

  • I need a system query that retrieves a list of encrypted columns in a database.

    Does anyone have such a query?

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • Here is something I just came up with:

    --Return list of encrypted columns in current db

    select

    OBJECT_NAME(c.[object_id])

    ,c.[name] as columnName

    from

    sys.columns c

    join

    sys.types t

    on

    c.system_type_id = t.system_type_id

    where

    t.name = 'varbinary';

    How does it look? Am I missing something?

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

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

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