Implicit objects in partition-by-growth table spaces
ALTER and
BMC AMI Change Manager for Db2
support the automatic creation of a database or a table space.
The products also support the use of the <DEFLT> keyword as the database name or table space name, as shown in the following table.
Database name | Table space name | CREATE syntax | Notes |
|---|---|---|---|
<DEFLT> | <DEFLT> | CREATE TABLE tableName; | Db2 creates the table in an implicit database (named DSNnnnnn ) and an implicit table space. |
User-defined name DSNDB04 | <DEFLT> | CREATE TABLE tableName IN DATABASE databaseName; | Db2 creates the table in an explicit database and an implicit table space. |
<DEFLT> | User-defined name | ERROR | You cannot explicitly create a table space in an implicit database in ALTER and Change Manager. |
For reference, the guidelines in the following table apply when you work with implicit table spaces.
Situation | Db2 or product response |
|---|---|
You create a table that has a ROWID GENERATED BY DEFAULT column in an implicit table space. | Db2 automatically creates an enforcing index. |
You create a base table in an implicit table space. | Db2 automatically creates auxiliary objects to support the table’s large object (LOB) columns. |
You add a ROWID GENERATED BY DEFAULT column (or a LOB column) to a table that exists in an implicit table space within an implicit database and your changes result in a DROP TABLE and a CREATE TABLE statement. | The product re-creates the table space implicitly. |
You add a ROWID GENERATED BY DEFAULT column (or a LOB column) to a table that exists in an implicit table space within an explicit database (defined by the user or defined as DSNDB04). |
|
The table exists in an implicit table space, and you do not create an enforcing index for the primary key or unique constraints. | Db2 automatically creates the index for you. |
Related topic