Dropping encryption keys

To drop an encryption key, use:

 drop encryption key [[database.][owner].]keyname

For example, this drops an encryption key named cc_key:

drop encryption key cust.dbo.cc_key

Key owners can drop their own keys. The system security officer can drop any key. A key can be dropped only if there are no encrypted columns in any database that use the key.

When executing drop encryption key, Adaptive Server does not check for encrypted columns in databases that are suspect, archived, offline, not recovered, or currently being loaded. In any of these cases, the command issues a warning message that names the unavailable database, but does not fail. When the database is brought online, any tables with columns that were encrypted with the dropped key are unusable. To restore the key, the system administrator must load a dump of the dropped key’s database that precedes when the key was dropped.

The system security officer can use sp_encryption to identify all the columns encrypted with a given key.