DB2 Version 9.7 for Linux, UNIX, and Windows

Automatic storage table spaces

With automatic storage table spaces, storage is managed automatically. The database manager creates and extends containers as needed up the limits imposed by the storage paths associated with the database.

If a database is enabled for automatic storage, any table spaces that you create will also be managed as automatic storage table spaces unless you specify otherwise. With automatic storage table spaces, you are not required to provide container definitions; the database manager looks after creating and extending containers to make use of the storage allocated to the database. If you add storage to the database, new containers will be created automatically when the existing containers reach their maximum capacity. If you want to make use of the newly-added storage immediately, you can rebalance the table space, reallocating the data across the new, expanded set of containers and stripe sets. Or, if you are less concerned about I/O parallelism, and just want to add capacity to your table space, you can forego rebalancing; in this case, as new storage is required, new stripe sets will be created.

Automatic storage table spaces can be created in an automatic storage database using the CREATE TABLESPACE command. By default, new tables spaces in a database where automatic storage is enabled are automatic storage table spaces, so the MANAGED BY AUTOMATIC STORAGE clause is optional. You can also specify options when creating the automatic storage table space, such as its initial size, the amount that the table space will be increased when the table space is full, and the maximum size that the table space can grow to. Following are some examples of statements that create automatic storage table spaces:

CREATE TABLESPACE TS1
CREATE TABLESPACE TS2 MANAGED BY AUTOMATIC STORAGE
CREATE TEMPORARY TABLESPACE TEMPTS
CREATE USER TEMPORARY TABLESPACE USRTMP MANAGED BY AUTOMATIC STORAGE
CREATE LARGE TABLESPACE LONGTS
CREATE TABLESPACE TS3 INITIALSIZE 8K INCREASESIZE 20 PERCENT MANAGED BY AUTOMATIC STORAGE
CREATE TABLESPACE TS4 MAXSIZE 2G   
Each of these examples assumes that the database for which these table spaces are being created is an automatic storage database. When you create a table space in a database that is not enabled for automatic storage, you cannot use the MANAGED BY AUTOMATIC STORAGE clause; you must either: