Restrictions for pending data definition changes
When data definition statements specify pending data definition changes, immediate changes cannot be issued in the same statement. Certain immediate and pending changes are also restricted in subsequent data definition statements until the REORG utility is run to materialize the pending data definition changes.
When pending data definition changes are restricted
ALTER TABLESPACE, ALTER TABLE and ALTER INDEX statements that result in pending definition changes are subject to the following restrictions:
- Options that cause pending changes cannot be specified with options that take effect immediately.
- Options that cause pending changes cannot be specified for the Db2 catalog, other system objects, or objects in a work file database.
- The DROP PENDING CHANGES clause of the ALTER TABLESPACE statement cannot be specified for a catalog table space.
- If the table space, or any table it contains is in an incomplete state, you cannot specify options that cause pending changes.
- For ALTER INDEX, options that cause pending changes cannot be specified if the definition of the table space or table on which the index is defined is not complete.
Restrictions for objects with existing pending data definition changes
The following table lists data definition changes that are restricted until any pending data definition changes are materialized for specific types of objects. Db2 issue SQLCODE -20385 for statements that cannot be processed because of pending data definition changes.
| Scope of change | Pending data definition changes | Restricted immediate definition changes for a table space, the table it contains, or indexes on the table | Restricted pending definition changes for a table space, the table it contains, or indexes on the table |
|---|---|---|---|
| Table space | ALTER TABLESPACE with any of the following options:
|
|
None![]() |
| Table space (continued) | Only ALTER TABLESPACE with MOVE TABLE option |
|
|
Table space (continued)![]() |
![]() Only ALTER TABLESPACE with MAXPARTITIONS option for UTS conversion![]() ![]() |
![]() |
ALTER TABLE with ALTER PARTITIONING TO PARTITION BY RANGE![]() |
Table space (continued)![]() |
![]() Only ALTER TABLESPACE with SEGSIZE for UTS conversion![]() ![]() |
![]() |
ALTER TABLE with ALTER PARTITIONING TO PARTITION BY GROWTH![]() |
Table space (continued)![]() |
![]() Only ALTER TABLESPACE with PAGENUM option![]() ![]() |
![]() |
ALTER TABLE with ALTER PARTITIONING TO PARTITION BY GROWTH ![]() |
| Table | ALTER TABLE statements with any of the following options:
|
(List continues in the next row...) |
None ![]() |
| Table (continued) | (See previous row) |
|
(See previous row) |
FL 500 Table (continued)![]() |
Only ALTER TABLE with ALTER PARTITIONING TO PARTITION BY RANGE![]() |
![]() |
![]() ALTER TABLE with ADD PARTITION, ALTER PARTITION, ALTER PARTITIONING TO PARTITION BY GROWTH ![]() ![]() |
FL 507 Table (continued)![]() |
Only ALTER TABLE with ADD PARTITION![]() |
![]() |
ALTER TABLE with ALTER PARTITIONING TO PARTITION BY GROWTH clause![]() |
FL 507 Table (continued)![]() |
Only ALTER TABLE with ALTER PARTITION![]() |
![]() |
ALTER TABLE with ALTER PARTITONING TO PARTITION BY GROWTH clause![]() |
| Column | ALTER TABLE statements with any of the following options:
|
All restricted operations when the scope of change is table, plus the following operations:
|
None |
| Partition | ALTER TABLE statements with any of the following options:
|
All restrictions that apply when the scope of change is table, plus ALTER TABLE ADD PARTITION to insert a partition if the last logical partition has pending definition changes to alter the limit key value | ALTER TABLE ALTER PARTITION if table has pending definition changes due to insertion of a partition |
| Index | ALTER INDEX statements with any of the following options:
|
|
None![]() |
Restrictions for recovery to before pending definition changes
In some cases, recovery to a point-in-time before the materialization of a pending definition change is not supported at all, and various restrictions apply when it is supported. For more information, see "Restrictions for point-in-time recoveries" in Point-in-time recovery.
If you do recover to a point-in-time before the materialization of most pending definition changes, many operations become restricted for the object until you run the REORG utility. The restrictions do not apply if the pending definition change is an ALTER TABLE statement with the ALTER PARTITION or ALTER COLUMN options. For more information about these restrictions and how to resolve them, see Recovering to a point in time before pending definition changes were materialized.
None