After managing a partitioned database for a period of time, you may find that some partitions are no longer needed, for example, if the data in a partition has been archived or the data has been removed from the composite initial partition. You can use PARTITIONMANAGE TRUNCATE to reclaim the storage space of a partition, and optionally deallocate the partition.

The syntax for PARTITIONMANAGE TRUNCATE is as follows:

proutil db-name -C partitionmanage truncate table table-name 
    { partition table-partition-name | composite initial }
    [ tablearea table-area-name ] [ indexarea index-area-name ] [ lobarea lob-area-name]
    [ recs numrecs ] [ deallocate ]

PARTITIONMANAGE TRUNCATE removes any existing rows in the table partition, LOB data, and key entries in the local indexes associated with the partition. If you specify deallocate, the data partition and local indexes are changed to the deallocated state at the conclusion of truncating the partition.

The optional keywords tablearea, indexarea, and lobarea specify the storage areas for tables, indexes and LOBs of the truncating partition. These keywords only work for truncating, not allocating.
Note: If the storage area name contains spaces, you must enclose the name in quotation marks.

For example, suppose that a partition cust_id_llr_30 of table customer has data and LOBs currently located on storage area Cust Data Area 2, and indexes on Cust Index Area 2.

This command truncates partition cust_id_llr_30 and then moves
  • the partition data to the new storage area, LOB Table Data Area
  • its indexes to LOB Table Index Area
  • its LOBs to LOB Table LOB Area:
proutil tpdb_np -C partitionmanage truncate table customer partition cust_id_llr_30 
tablearea "LOB Table Data Area" indexarea "LOB Table Index Area" lobarea "LOB Table LOB Area"“LOB Table Data Area”
This command changes the storage area for the table but leaves the LOB and index storage unchanged:
proutil tpdb_np -C partitionmanage truncate table customer partition cust_id_llr_30 tablearea "LOB Table Data Area"

For complete details on PARTITIONMANAGE TRUNCATE, see the section, PROUTIL PARTITIONMANAGE TRUNCATE qualifier.