Removes one or more databases, including archive databases, from the SAP ASE server.
drop database database_name [, database_name] ...
drop database publishing
drop database col_db, key_db
When dropping an archive database, all the rows for that database are deleted from the sysaltusages table in the scratch database. This requires log space in the scratch database.
Removing a database deletes the database and all its objects, frees its storage allocation, and erases its entries from the sysdatabases and sysusages system tables in the master database.
drop database clears the suspect page entries pertaining to the dropped database from master..sysattributes.
Use alter table to decrypt the columns, or modify the columns for encryption using a different key.
Drop the table or database containing the encrypted columns.
See also sp_changedbowner, sp_helpdb, sp_renamedb, sp_spaceused in Reference Manual: Procedures.
ANSI SQL – Compliance level: Transact-SQL extension.
The permission checks for drop database differ based on your granular permissions settings.
Setting | Description |
---|---|
Enabled | With granular permissions enabled, you must be the database owner or have the own database privilege on the database. To drop sybsecurity, you must be the database owner or have the manage auditing privilege. |
Disabled | With granular permissions disabled, you must be the database owner, a user with sa_role, or for sybsecurity, a user with sso_role. |
Values in event and extrainfo columns of sysaudits are:
Information | Values |
---|---|
Event | 26 |
Audit option | drop |
Command or access audited | drop database |
Information in extrainfo |
|