Try OpenEdge Now
skip to main content
Database Administration
Reference : PROUTIL Utility : PROUTIL TRUNCATE AREA qualifier
 

PROUTIL TRUNCATE AREA qualifier

Deletes all data from the tables and indexes in the specified storage area.

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 you specify the area name, PROUTIL truncates the area even if it contains storage objects. If no area name is specified, PROUTIL truncates all areas not containing objects.
-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 hi-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. Before resetting the hi-water mark, the before image (BI) file is truncated.

Notes

*Use of this qualifier is an important step in removing application data storage areas and extents from a database.
*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 use this command, the database must be offline and after-imaging must be disabled.
*If the storage area does not contain any storage objects, then the command simply resets the hi-water mark. If the storage area does contain tables and or indexes, their names are listed 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 Maintaining Database Structure for an example of PROUTIL TRUNCATE AREA.