DROP TABLESPACE

The DROP TABLESPACE statement removes a data set group within the database or an area for a DEDB. Dropping a TABLESPACE is an ALTER against the database resource.

Invocation

This statement can be submitted from a Java™ application program with an established connection to IMS through the IMS Universal JDBC drivers. It is an executable statement that cannot be dynamically prepared.

Syntax

Read syntax diagramSkip visual syntax diagramDROPTABLESPACEddnameIN database_name

Description

The following keyword parameters are defined for the DROP TABLESPACE statement:
TABLESPACE ddname
Identifies the 1 to 8- character alphanumeric tablespace ddname to drop. The ddname must identify a tablespace that exists in IMS.
IN database_name
Specifies the database from which the tablespace is to be removed from.

Usage notes

When a tablespace is dropped, a new one can be created within the same commit scope. Any pending changes to the definitions of the tablespace are also dropped. Whenever a tablespace is directly or indirectly dropped, all of the tables in that tablespace are moved into the next available tablespace. If the dropped tablespace is the last one, you will receive the -9000 error message.
A table space can be dropped from a database of the following access types:
  • DEDB
  • GSAM
  • HDAM
  • HIDAM
  • HISAM
  • HSAM
  • INDEX
  • SHISAM
  • SHSAM

Example

Assuming you have already created a table space with the following example (see CREATE TABLESPACE), and you now want to drop the table space:

DROP TABLESPACE hidam2 IN DHVNTZ02