Error 4716

Severity

16

Message text

Cannot truncate table '%.*s' because it is partitioned.

Explanation

By default, Adaptive Server stores a heap table’s data in one doubly linked chain of database pages. Adaptive Server inserts all new rows into the last page of the chain. A transaction holds an exclusive lock on the last page while inserting new rows, which can block other, concurrent transactions from being inserted into the table.

The partition clause of the alter table command allows you to partition user tables that do not have a clustered index. Partitioning creates additional page chains on the table, each with its own last page. This reduces page contention for concurrent inserts, and can also reduce I/O contention if the table is distributed over multiple physical devices.

Error 4716 is raised when you try to truncate a table that is partitioned.

Action

If you want to truncate the table, use the unpartition clause of the alter table command to concatenate all partitions:

1> alter table <table_name> unpartition
2> go

Then truncate the table.

Additional information

Refer to the Reference Manual: Commands for information about the alter table command.

Versions in which this error is raised

Versions earlier than 15.0