PROUTIL TRUNCATE AREA qualifier

If database is offline, deletes all data from the tables ind indexes in the specified storage area. If database is online, truncates the area if it is empty.

Syntax

proutil db-name -C truncate area area-name
               [-userid username[-password passwd ] ]

Parameters

db-name
Specifies the database that contains the application data storage areas that you want to truncate.
area-name
Specifies the name of the storage area you want to truncate. When the database is offline, and you specify the area name, PROUTIL truncates the area even if it contains storage objects. When the database is offline, and no area name is specified, PROUTIL truncates all areas not containing objects. When the database is online, the area name is required, and PROUTIL truncates the area if it is empty.
-userid username
Identifies a user privileged to access protected audit data when executing this utility.
-password passwd
Password for the privileged user.

PROUTIL TRUNCATE AREA works by resetting the high-water mark in the storage area back to the beginning of the storage area. This high-water mark reset frees all of the space in the storage area for reuse. Any tables and indexes in the storage areas are initialized to the state they were in before they contained any rows or index entries. If the database is offline, PROUTIL truncates the before image (BI) file before resetting the high-water mark.

Notes

  • Truncation is an important step in the process of removing application data storage areas and extents from a database, as described in Return data storage space to the operating system. However, because the PROSTRCT REMOVEONLINE utility truncates and removes data storage areas, and reduces the high-water mark, running PROUTIL TRUNCATE AREA is an optional step in the process.
  • Deleting the contents of storage areas with this feature also allows for rapid dumping and loading. Use PROUTIL TRUNCATE AREA after dumping data, but before initiating the load.
  • TRUNCATE AREA requires additional security when auditing is enabled for your database. Depending on how user identification is established for your database, you may need to specify the -userid and -password parameters to run this utility. For more information on auditing and utility security, see Auditing impact on database utilities.
  • To remove all types of storage areas, the database must be offline and after-imaging must be disabled. To truncate only data storage areas, you may run PROUTIL TRUNCATE AREA while the database is running.
  • Truncating data storage areas in a running database does not require truncating the BI file or disabling after-imaging. You can truncate Type I and Type II storage areas while the database is running. Online data storage area truncation works with PUBLIC and non-PUBLIC tables, and supports encryption, multi-tenant database, table partitioning, and change data capture. In a replication environment, you can only run PROUTIL TRUNCATE AREA online against the source database, and the change replicates to the target.
    Note: The storage area must be empty of all objects in order to run PROUTIL TRUNCATE AREA online.
  • If the storage area does not contain any storage objects, then the command simply resets the high-water mark. If the storage area contains tables and or indexes, the database must be offline. In this case, PROUTIL lists object names. and you must confirm to truncate the storage area.
  • Indexes in other storage areas that are on tables in the storage area being truncated are marked as inactive.
  • Empty index root blocks for indexes in the area being truncated are recreated.
  • PROUTIL TRUNCATE AREA recreates any template records in the new area.
  • See OpenEdge Structure Remove utility for an example of PROUTIL TRUNCATE AREA.