Changing Table Space Assignments

 

The following form is displayed when table space assignments have changed.

 

Existing Vs. New Table Space Settings

Existing DB2 Table Spaces Settings:

Current DB2 settings for Table, Index, and Long table spaces are shown on the left. The blank Index and Long entries indicate that the Table tablespace is used by indexes and lobs as well as tables.

 

Newly Assigned Table Space Settings:

The newly assigned table spaces will contain the data from affected tables after the current operation completes. The new table spaces must be large enough to hold all existing data from existing table or an error is issued.

Default Table Tablespace

The default Table tablespace is determined using a complicated algorithm based on a table's page size. When more than one regular table space has been defined, DB2 will choose the table space with the smallest page size over which the authorization ID of the statement has USE privileges. Scriptoria always assumes that the default table space is SYSCATSPACE. If multiple regular table spaces are defined and DB2 chooses a tablespace other than SYSCATSPACE, the chosen table space must be manually assigned or the form shown above will be displayed when in Prototyping mode.

 

You can determine which table space DB2 has assigned to an existing table by using the DB2 Viewer's System Catalog page.  To do so, double-click on the SYSCAT.TABLES view from the list and scroll or search for the desired TABSCHEMA and TABNAME. The TBSPACE value for the given table shows the table space DB2 has chosen for the table. Use this value to manually assign the Table tablespace for the given table.