How to resize A DB2 tablespace

Source: Internet
Author: User

DB2 tablespace resizing is a common operation in using DB2 databases. The following describes how to resize several DB2 tablespaces.

Scale up multiple containers

Db2 "alter tablespace tablespace-name EXTEND (ALL 1000000 )"

DB21034E The command was processed as an SQL statement because it was not avalid Command Line Processor command. During SQL processing it returned:

SQL1139N The total size of the table space is too big. SQLSTATE = 54047
 
Resize one of the containers

Db2 "alter tablespace tablespace-name EXTEND (FILE '/dir/filename' 3000000 )"

DB21034E The command was processed as an SQL statement because it was not avalid Command Line Processor command. During SQL processing it returned:

SQL1139N The total size of the table space is too big. SQLSTATE = 54047
 
Add container

Db2 "alter tablespace tablespace-name ADD (FILE '/dir/filename '500000 )"

DB21034E The command was processed as an SQL statement because it was not avalid Command Line Processor command. During SQL processing it returned:

SQL1139N The total size of the table space is too big. SQLSTATE = 54047
 
Check to see

LIST TABLESPACES SHOW DETAIL

...

Tablespace ID = 8

Name = tablespace-name

Type = Database managed space

Contents = Any data

State = 0x0000

Detailed explanation:

Normal

Total pages = 16388000

Useable pages = 16387840

Used pages = 16387840

Free pages = 0

High water mark (pages) = 16387840

Page size (bytes) = 4096

Extent size (pages) = 32

Prefetch size (pages) = 128

Number of containers = 4

Minimum recovery time = 2009-06-26-04.47.15.20.00

...
 

The preceding section describes how to scale up a DB2 tablespace.

Deep understanding of DB2 stored procedures

DB2 exception Processor type

DB2 connection Server Configuration

Learn about the DB2 lock types

Solution to db2 tablespace lock

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.