Automatically adjust the table space size of the DB2 database (1)

Source: Internet
Author: User

System-managed space SMS) and database-managed space DMS) are two types of basic tablespaces In the DB2 database. This article describes how to adjust the tablespace size for your reference.

The container associated with the SMS tablespace is the file system directory, and the files in these directories will grow as the objects in the tablespace grow. Files are added to the file system limit on one of the containers or the tablespace size limit on the database.

DMS tablespaces consist of file containers or original device containers. Their sizes are set when the containers are specified to the tablespaces. When all spaces in the container are used, the tablespace is considered to be full. However, unlike SMS, you can use the alter tablespace statement to add or expand the container, allowing more storage space to be provided to the TABLESPACE. DMS tablespace is also known as "auto-resize. When the space in the DMS tablespace that can be automatically adjusted is consumed, the DB2 database system may expand one or more file containers. The SMS tablespace has a function similar to automatic growth, but the term "automatic resizing" is used exclusively for DMS.

Enable and disable automatic resizing AUTORESIZE)

By default, the automatic size adjustment function is not enabled for the DMS tablespace. The following statement creates a DMS tablespace that does not enable the auto-resize function:

Create tablespace DMS1 MANAGED BY DATABASE
USING (FILE '/db2files/DMS1 '10 M) to enable the automatic resizing function, specify the autoresize yes clause as part of the create tablespace statement:

Create tablespace DMS1 MANAGED BY DATABASE
USING (FILE '/db2files/DMS1 '10 M) autoresize yes after the DMS tablespace has been created, you can also use the AUTORESIZE clause on the alter tablespace statement to enable or disable the automatic resizing function:

Alter tablespace DMS1 AUTORESIZE YES
Alter tablespace DMS1 autoresize no has two other attributes: MAXSIZE and INCREASESIZE.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.