DROP DBSPACE statement

Use this statement to remove a dbspace from the database.

Syntax
DROP DBSPACE dbspace-name
Remarks

You must drop all tables in the dbspace before dropping the dbspace. You cannot use the DROP DBSPACE statement to drop the pre-defined dbspaces system, temporary, temp, translog, or translogmirror. See Pre-defined dbspaces.

Use the IF EXISTS clause if you do not want an error returned when the DROP DBSPACE statement attempts to remove a database object that does not exist.

DROP DBSPACE is prevented whenever the statement affects an object that is currently being used by another connection.

Permissions

You must own the object, or have DBA authority, and be the only connection to the database.

Side effects

Automatic commit. Clears the Results tab in the Results pane in Interactive SQL.

See also
Standards and compatibility
  • SQL/2003   Core feature.

Example

Drop MyDBSpace from the database. If the dbspace does not exist, an error is returned.

DROP DBSPACE MyDBSpace;