Using the drop database Command

Use drop database to remove a database from SAP ASE.

drop database deletes the database and all the objects in it, as well as:
  • Freeing the storage space allocated for the database

  • Deleting references to the database from the system tables in the master database

Only the database owner can drop a database. You must be in the master database to drop a database. You cannot drop a database that is open for reading or writing by a user.

The syntax is:

drop database database_name [, database_name]... 
You can drop more than one database in a single statement; for example:
drop database newpubs, newdb

You must drop all databases from a database device before you can drop the database device itself. The command to drop a device is sp_dropdevice.

After you drop a database, dump the master database to ensure recovery in case master is damaged.