You can only remove a database extent if the extent is not in use. To remove a data storage area, the area needs to have no objects in it, so you can truncate it. While versions from 9.1B onwards delete the Data from the area during the truncate area process, the tables and indexes in this area will still have to be deleted (e.g. drop table) or moved out of the area with the tablemove command.
Remember that you cannot remove the Schema Area (area number 6) nor you can truncate it.
1. Make sure you have a valid backup of your database.
2. Then you need to truncate the area.
a) For Progress 9.0X and 9.1A:
proutil <dbname> -C truncate area areaname
This command will truncate all the empty storage areas.
Make sure you delete the objects from the storage area before you run this command.
b) For Progress 9.1B and later:
You can specify the area name. Any data in that area will be deleted (You will be asked for a confirmation before the deletion occurs).
proutil <dbname> -C truncate area <Area Name>
3. Truncate the BI file
proutil dbname -C truncate bi
4. Rebuild the primary indexes for the table(s) in the area that you just truncated.
5. Delete the table from the Data Administration tool.
6. Truncate the bi file again. (See step 3).
7. Now you can remove the extents of an area as desired.
prostrct remove dbname < d | ai | bi > <Area Name>
The command will remove the last empty extent of the specific area.
If «all» the extents get removed, the entire area automatically is removed.
If an extent(s) is removed, a message appears which indicates that The extent was removed successfully along with the named extent listed.
For example:
Mydb_7.d2 successfully removed. (6968)
If the step to truncate the area is skipped, the following error message occurs:
«The last extent of area (#) is in use (6961).