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

PROUTIL PARTITIONMANAGE TRUNCATE qualifier

Partition management option to truncate a table partition.

Syntax

proutil db-name -C partitionmanage truncate table table-name
  { partition table-partition-name | composite initial }
[ 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.
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 delete 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 LOB’s associated with the table data of the partition, and the partition aligned indexes.
During the execution of PARTITIONMANAGE TRUNCATE, the only allowed access is by 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 successfully complete, 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.