In several cases, Database Administrators may need to move data storage areas while a database is running. For example, DBAs can move extents away from slow storage, create extents on new storage, move objects to the new area, and then remove the old area. For operations in the cloud, removing storage areas while the database is running can reduce space requirements for customers without making them wait for a scheduled maintenance window.

To return space to the operating system:
  1. Truncate table data in an area of interest to move tables and indexes to a new area and give storage space back to the storage area, using this syntax:
     proutil db-name -C tablemove [owner-name.]table-name table-area [index-area]
         [lob-area][ truncate ] 

    For more details, see Truncate tables and PROUTIL TABLEMOVE qualifier.

  2. Confirm that no objects remain in the data storage area, which is a prerequisite for area removal. Use PROSTRCT LIST to update the structure description file and display the file information, including storage area type, storage area name, records per block, extent pathname, and extent type, either fixed or variable (a size of 0 indicates a variable-length extent), with this syntax:
     prostrct list db-name [ structure-description-file ]

    For details, see PROSTRCT LIST qualifier.

  3. Remove the extents and data storage area, and reduce the high-water mark using PROSTRCT REMOVEONLINE. Use the following syntax:
     prostrct removeonline db-name extent-token area-name [-allextents] [-silent]

    See PROSTRCT REMOVEONLINE qualifier and OpenEdge Structure Remove Online utility.

The following example removes all extents from a sports2023 database with after-imaging disabled:

prostrct removeonline sports2023 -d sportsarea1 -allExtents
Deleted _AreaExtent record for extent /OpenEdge/WRK/prostrct/db1_22.d3. 
Deleted _AreaExtent record for extent /OpenEdge/WRK/prostrct/db1_22.d2. 
Deleted _AreaExtent record for extent /OpenEdge/WRK/prostrct/db1_22.d1. (20691)
Deleted _Area record for area newtbl area. (20692)
/OpenEdge/WRK/prostrct/db1_22.d3 successfully removed. (6968)
/OpenEdge/WRK/prostrct/db1_22.d2 successfully removed. (6968)
/OpenEdge/WRK/prostrct/db1_22.d1 successfully removed. (6968)