How to manage DB2 tablespaces

Source: Internet
Author: User

There are two types of DB2 tablespaces. The following describes how to manage and classify DB2 tablespaces. If you are new to DB2 databases, take a look.

DB2 tablespaces are managed in two ways: System Management Space (System Management Space) and Database Management Space (DMS ). It can be divided into rule tablespace, long integer tablespace, system temporary tablespace, and user temporary tablespace. The long integer tablespace can only be DMS.

The table that contains user data in the Rule tablespace. The Default User DB2 tablespace name is USERSPACE1, and the index is also stored in the Rule tablespace. In addition, the system directory table is also stored in the Rule tablespace.

The default system directory tablespace is SYSCATSPACE.

Temporary tablespace is divided into temporary DB2 tablespace and user temporary tablespace. System temporary DB2 tablespace is used to store internal temporary data required in various data operation sorting, table reorganization, index creation, and table connection). Although you can create any number of system temporary tablespaces, however, we recommend that you create only one large and small page for most tables. The default temporary tablespace name is TEMPSPACE1. The user temporary tablespace is used to store the temporary data of the application ). The user's temporary tablespace is not created by default during database creation.

Each SMS container is a directory in the file space of the operating system. Each DMS container is a fixed, pre-allocated file, or physical device.

The management of SMS is relatively simple and is automatically managed by the operating system. The size of the space is automatically adjusted as the data volume changes.

DMS is managed by databases. The size of the space is determined during creation. When the space is insufficient, you must manually add or delete some data to release the space.

In most cases, DMS performs better than SMS.

Simple syntax for creating SMS tablespace using command line:
CREATE TABLESPACE ; Managed by system using (' ;')

Simple syntax for creating DMS tablespace using command line:
CREATE TABLESPACE ; Managed by database using (file' ;'

;)

DB2 database Permissions

Quick clearing of big data DB2 tables

Silent status of three DB2 tables

Troubleshooting of DB2 database detachment

How do you detach a DB2 database

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.