Avoid Tablespace Full Condition With Automatic Storage - DBA To DBA
Avoid Tablespace Full Condition With Automatic Storage - DBA To DBA
'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.
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.
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.
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:
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:
or
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