ERR-11036 ( 69686) The data file is in use.#
Overview#
This document explains the cause of the ERR-11036 ( 69686) The data file is in use. error that occurs when deleting a data file from a disk tablespace and how to resolve it.
Version#
All versions of Altibase
Symptoms#
The following error occurs when deleting a data file using the ALTER TABLESPACE ... DROP DATAFILE statement.
iSQL> ALTER TABLESPACE SYS_TBS_DISK_DATA DROP DATAFILE 'system001.dbf';
[ERR-11036 : The data file is in use.]
Cause#
This error occurs when the DROP DATAFILE statement is executed on a data file that has been used to store data at least once.
Even if all data has been deleted and the entire data file is currently FREE, the data file cannot be deleted if it has a usage history.
Only data files that have never been used can be deleted using the DROP DATAFILE statement.
Resolution#
A data file that has been used cannot be deleted.
If you need to change the data file configuration, such as reducing the number of data files in a tablespace, recreate the tablespace in the following order:
- Back up the object creation scripts for the objects in the tablespace and export the data.
- Drop and recreate the tablespace.
- Recreate the objects and import the data.