ALLBASE/SQL Reference Manual (36216-90216)

408 Chapter10
SQL Statements A - D
DROP TEMPSPACE
DROP TEMPSPACE
The DROP TEMPSPACE statement removes the definition of a temporary storage space
(TempSpace) from the system catalog.
Scope
ISQL or Application Programs
SQL Syntax
DROP TEMPSPACE
TempSpaceName
Parameters
TempSpaceName
is the name of the TempSpace to be dropped.
Description
If a TempSpace is dropped while temporary files currently exist under the path name it
specifies, those files remain until the sort using them completes. However, no further
temporary files are created in that TempSpace.
If a TempSpace is being used by another user when the DROP TEMPSPACE statement is
issued, then the DROP statement is blocked until the TempSpace usage is finished.
Authorization
You must have DBA authority to use this statement.
Example
TempSpace temporary files are created in the /sort/PurchDB directory when SQL
statements require sorting.
CREATE TEMPSPACE ThisTempSpace WITH MAXFILEPAGES = 360,
LOCATION = '/sort/PurchDB'
DROP TEMPSPACE ThisTempSpace
TempSpace temporary files are no longer available in the /sort/PurchDB, directory but can
be allocated under /tmp as needed.