You use DROP SPACE to delete a user space.
The SPACE view of the INFORMATION_SCHEMA provides you with information on which user spaces have been defined (see chapter "Information schemas").
The current authorization identifier must own the space.
DROP SPACE
space { CASCADE | RESTRICT } [FORCED]
space
name of the user space
You can qualify the name of the space with a database name.
CASCADE
The space space is deleted even if it is not empty. The base tables and indexes located in the space are also deleted. This is also the case for the views, routines, and integrity constraints which refer directly or indirectly to these base tables and indexes.
RESTRICT
The space space is deleted only if it is empty. All the space’s base tables and indexes must be deleted beforehand.
FORCED
The space space is deleted even if it cannot be opened for update processing, e.g. because its BS2000 file does no longer exist. The space is then deleted logically in SESAM/SQL, i.e. removed from the database’s metadata. When CASCADE is also specified, FORCED also applies for spaces which are affected by the deletion of the tables and indexes.
FORCED not specified
The space space is deleted only if it can be opened for update processing.
The space file is overwritten with binary zeros if the DESTROY clause was specified when the space was created or updated and SESAM/SQL can access the space’s BS2000 file.
DROP SPACE and transactions
A DROP SPACE statement cannot be followed by a CREATE SPACE statement within the same transaction.
See also
CREATE SPACE, ALTER SPACE