dbd_add_ex

exec dbd_add_ex 'schema.objectname'

This function immediately excludes an object from protection. Access to such objects is allowed without the OPEN KEY statement. You need to run the function in the context of the database. If the database is encrypted and locked, you need to unlock it first.

You can specify mask *. For example 'pub.*' means unlock all objects in pub schema, '*.*' means unlock all objects in the database.

Changes made by the function are saved permanently.

Example

  
use [mydatabase]
open symmetric key dbdx decryption by password='C00lPass!'
-- all objects in schema 'pub'
exec dbd_add_ex 'pub.*'
-- makes table Reports available to all with appropriate SQL permissions
exec dbd_add_ex 'dbo.Reports'

Remarks

To see the list of exceptions, run dbd_list_ex, to delete dbd_del_ex