|
|
The DROP DBEFILE statement removes the row describing a DBEFile from
the SYSTEM.DBEFile.
ISQL or Application Programs
DROP DBEFILE DBEFileName
- DBEFileName
is the name of the DBEFile to be dropped.
Before dropping a DBEFile previously associated with a DBEFileSet
via an ADD DBEFILE statement, you must use the
DROP INDEX and DROP TABLE statements to empty the
DBEFile, then use the REMOVE DBEFILE statement to remove the
DBEFile from the DBEFileSet.
Although information for the dropped DBEFile is removed from the
SYSTEM.DBEFile, the file is not removed until the transaction is
committed.
You must have DBA authority to use this statement.
CREATE DBEFILE ThisDBEFile WITH PAGES = 4,
NAME = 'ThisFile', TYPE = TABLE
CREATE DBEFILESET Miscellaneous
ADD DBEFILE ThisDBEFile TO DBEFILESET Miscellaneous
The DBEFile is used to store rows of a new table. When the table needs an
index, one is created.
CREATE DBEFILE ThatDBEFile WITH PAGES = 4,
NAME = 'ThatFile', TYPE = INDEX
ADD DBEFILE ThatDBEFile to DBEFILESET Miscellaneous
When the index is subsequently dropped, its file space can
be assigned to another DBEFileSet.
REMOVE DBEFILE ThatDBEFile FROM DBEFILESET Miscellaneous
ADD DBEFILE ThatDBEFile TO DBEFILESET SYSTEM
ALTER DBEFILE ThisDBEFile SET TYPE = MIXED
Now you can use this DBEFile to store an index later if you
need one. All rows are later deleted from the table, so you can
reclaim file space.
REMOVE DBEFILE ThisDBEFile FROM DBEFILESET Miscellaneous
DROP DBEFILE ThisDBEFile
The DBEFileSet definition can now be dropped.
DROP DBEFILESET Miscellaneous
|