drop database

To prevent accidental loss of keys, drop database fails if the database contains keys currently used to encrypt columns in other databases. To drop a database:

  1. Decrypt the columns or modify the columns for encryption by a different key using alter table

  2. Drop the table or database containing the encrypted columns

In this 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 does not drop key_db; however, col_db is dropped. To drop both databases, drop col_db first:

drop database col_db, key_db