Partition management option to truncate a table partition.

Syntax

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 ]

Parameters

db-name
Specifies the database where you are performing partition management.
table table-name
Specifies the table for the PARTITIONMANAGE TRUNCATE operation.
partition table-partition-name
Specifies the partition instance being truncated.
composite initial
Specifies that the PARTITIONMANAGE TRUNCATE operation is to be performed into the composite initial partition of the table.
tablearea table-area-name
Optionally specifies the name of the storage area for the table. It must be a Type II area. If the name contains spaces, you must enclose it in quotation marks.
indexarea index-area-name
Optionally specifies the name of the storage area for the indexes. It must be a Type II area. If the name contains spaces, you must enclose it in quotation marks.
lobarea lob-area-name
Optionally specifies the name of the storage area for the large objects (LOBs). It must be a Type II area. If the name contains spaces, you must enclose it in quotation marks.
deallocate
Specifies that the partition is in the deallocated state when the truncate operation completes.
recs numrecs
When decallocate is specified, recs governs the number of key entries to be deleted from global indexes in one transaction. If not specified, numrecs defaults to 100.

PARTITIONMANAGE TRUNCATE is used to free the storage space of a partition. You can use PARTITIONMANAGE TRUNCATE to reclaim space when data associated with a partition is no longer valid or needed. The storage space reclaimed is from the table data of the partition, any LOBs associated with the table data of the partition, and the partition aligned indexes.

During the execution of PARTITIONMANAGE TRUNCATE, access is allowed only to no-lock readers, which may see no data returned as the truncate executes and the partition becomes deallocated.

Schema definitions for a truncated partition still exist, and are marked as storage space not allocated. New queries against a truncated partition that is also deallocated partition fail.

Notes

  • PARTITIONMANAGE TRUNCATE runs against databases that are both online and offline.
  • Multiple instances of PARTITIONMANAGE TRUNCATE can run simultaneously provided they operate on different partitions.
  • If you use OpenEdge Replication, partition changes are replicated to your replication target database.
  • If execution of PARTITIONMANAGE TRUNCATE does not complete successfully, re-executing the command completes the truncate from the last committed transaction.
  • If db-name is a UTF-8 database, you must specify -cpinternal UTF-8 on the command line. If not specified, an error message is generated and PARTITIONMANAGE TRUNCATE exits.