Drop database

To prevent accidental loss of keys, drop database fails if the database contains keys currently used to encrypt columns in other databases. Before dropping the database containing the encryption keys, first remove the encryption on the columns using alter table, then drop the table or database containing the encrypted columns.

In the following example, key_db is the database where the encryption key resides and col_db is the database containing the encrypted columns:

drop database key_db, col_db

Adaptive Server raises an error and fails to drop key_db. The drop of col_db succeeds. To drop both databases, drop col_db first:

drop database col_db, key_db