0% found this document useful (0 votes)
97 views2 pages

Avoid Tablespace Full Condition With Automatic Storage - DBA To DBA

DB2 v9 introduced automatic storage tablespaces that allocate space automatically as needed to avoid tablespaces running out of space. With automatic storage, DBAs no longer need to monitor and extend tablespaces. To use automatic storage, create a database using multiple storage paths and create tablespaces without specifying container paths - DB2 will automatically distribute containers across storage paths. Restores of databases with automatic storage no longer require redirected restores.

Uploaded by

aamir_malik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views2 pages

Avoid Tablespace Full Condition With Automatic Storage - DBA To DBA

DB2 v9 introduced automatic storage tablespaces that allocate space automatically as needed to avoid tablespaces running out of space. With automatic storage, DBAs no longer need to monitor and extend tablespaces. To use automatic storage, create a database using multiple storage paths and create tablespaces without specifying container paths - DB2 will automatically distribute containers across storage paths. Restores of databases with automatic storage no longer require redirected restores.

Uploaded by

aamir_malik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

3/18/2020 Avoid Tablespace Full condition with Automatic Storage — DBA to DBA

Avoid Tablespace Full condition with Automatic Storage


DB2 v9 for LUW introduces a new kind of Tablespaces - Managed by Automatic Storage.

'Till DB2 v8.2, one of the most time expensive tasks for a DB2 DBA was monitoring and extending Tablespaces. Pretty often, the most important tablespace of
your database ran out of space on a Sunday and you got calls while you were sleeping.

DB2 v9 introduced a new kind of tablespaces/databases called Automatic Storage. With this new feature, DB2 is able to provide the best from the 2 other
types of tablespaces:

- space is allocated as needed automatically (the good point from SMS tablespaces);

- performance is the same as a DMS tablespace, since the containers are files or block devices (old raw devices containers)

I´ve been working with DB2 v9 for a couple of months and in my opinion the best thing from this kind of tablespace is that we no longer need to
monitor/extend tablespaces. We just need to keep an eye on disks/file systems usage.

Step by step to use Automatic Storage tablespaces:

1) Create the database: in v9, database is enabled to use Automatic Storage by default. The point here is that you´re able to create the database in more the
one path (disk or file system). It will give you performance benefits since DB2 will be able to read/write physical disks in parallel.

db2 create database sample on /db2/data1,/db2/data2,...

This statement will create the database control files on /db2/data1, but all tablespaces will be spread over the both file systems specified.

You´re also able to add 'storage paths' to an existing database, altough your previous tablespaces will not use the new paths automatically.

db2 alter database sample add storage on /db2/data3

All tablespaces created from this point on will have containers created on all 3 file systems.

2) Create the tablespaces: once you have a database enabled to use Automatic Storage, you no longer need to specify the container paths of your
tablespaces. DB2 will automatically create the containers on the paths used by the database. So the CREATE TABLESPACE statement is pretty simple:

db2 create tablespace my_tbspace pagesize 8k managed by automatic


storage bufferpool bp8k

www.dbatodba.com/db2/db2-udb-v9/avoid-tablespace-full-condition-with-automatic-storage/ 1/2
3/18/2020 Avoid Tablespace Full condition with Automatic Storage — DBA to DBA

Tip: the statement above will create small containers that will grow as needed. To reduce the impact of frequently extend the tablespace, you can specify the
grow rate of this tablespace. You can do that by setting up the INCREASESIZE parameter of the tablespace:

db2 alter tablespace my_tbspce increasesize 30 percent

or

db2 alter tablespace my_tbspce increasesize 500 M

Another great feature of Automatic Storage is that you no longer need to do REDIRECTED RESTORES. Yes, that´s true. Databases with AUTOMATIC
STORAGE can be restored over diferent paths without those boring REDIRECT RESTORES and SET CONTAINERS PATHS. But this is subject to another
post.

See you.

www.dbatodba.com/db2/db2-udb-v9/avoid-tablespace-full-condition-with-automatic-storage/ 2/2

You might also like