DB2 Version 9.7 for Linux, UNIX, and Windows

Attributes of detached data partitions

When you detach a data partition from a partitioned table using the DETACH PARTITION clause of the ALTER TABLE statement, it becomes a stand-alone, nonpartitioned target table. Many attributes of the new target table are inherited from the source table. Any attributes not inherited from the source table are set as if the user executing the DETACH operation is creating the target table.

The target table after DETACH will inherit all the partitioned indexes defined on the source table. These indexes includes both system-generated indexes or user-defined indexes. The index object is not physically moved during the detach operation. The index partition metadata of the datapartition being detached is removed from the SYSINDEXPARTITIONS catalog. New entries are added in SYSINDEXES for the new table. The index identifier (IID) for any given partitioned index from the source table will be the IID for the index on the target table (the IID will remain unique with respect to the table, and unchanged during the detach).

The index name for the surviving indexes on the new table are system-generated with the form: SQLyymmddhhmmssxxx. Path indexes, region indexes, and MDC block indexes are made part of the SYSIBM schema. All other indexes are made part of the schema of the new table. System-generated indexes like those to enforce unique and primary key constraints are made part of the schema of the new table because the indexes are carried over to the new table. Constraints on the source table will not be inherited by the target table after DETACH.

You can use the RENAME statement to rename the indexes not in the SYSIBM schema at another time.

You can use the ALTER TABLE ... ADD CONSTRAINT statement on the new table following the completion of the detach operation to enforce the same constraints on the new table as on the source table.

The table space location specified by the table-level INDEX IN clause on the source table is not inherited by the new target table. Rather, the table space location specified by the partition-level INDEX IN clause, or the default index table space for the new table, continues as the index table space location for the new table.

Attributes inherited by the target table

Attributes inherited by the target table include:

Note: Partitioned hierarchical or temporary tables, range-clustered tables, and partitioned views are not supported.

Attributes not inherited from the source table

Attributes not inherited from the source table include: