IBM Support

How to determine whether or not a table space is using automatic storage.

Question & Answer


Question

A table space uses automatic storage in an automatic storage enabled database if the MANAGED BY AUTOMATIC STORAGE clause was specified when the table space was created .

Answer

To determine whether a table space is using automatic storage, use one of the following methods:

  • Using tablespace snapshot:
 $ db2 get snapshot for tablespaces on sample


The element "Using automatic storage" will indicate whether a table space is using automatic storage. For example:

Using automatic storage                  = Yes

  • Using the following snapshot table function:
db2 "select TBSP_NAME,TBSP_ID,TBSP_USING_AUTO_STORAGE from table(snap_get_tbsp('sample',-1)) as tbsp"

TBSP_USING_AUTO_STORAGE is 1 if automatic storage is enabled or 0 if it is not enabled.
  • Alternatively, for Version 8.1 FixPak 10 (also known as Version 8.2 FixPak 3) or later, you can also use the db2pd -tablespaces command:
    Note: In the following output, the "AS" column shows whether or not the tablespace is using automatic storage.

 $ db2pd -db sample -tablespaces

Tablespace Autoresize Statistics:
Address    Id AS  AR  InitSize  IncSize IIP MaxSize LastResize LRF
0x05267580 0  Yes Yes 33554432  -1      No  None    None       No
0x05267D50 1  Yes No  0          0      No  0       None       No
0x0526C510 2  Yes Yes 33554432  -1      No  None    None       No
0x0526CCE0 3  Yes Yes 33554432  -1      No  None    None       No
0x05C73EE0 4  Yes Yes 33554432  -1      No  None    None       No
0x05C98360 5  Yes No  0          0      No  0       None       No
  • Use the db2ckbkp - T command. A tablespace is enabled for automatic storage if the bit AND value of "flags" and "0x1000" is not zero. For example,
  db2ckbkp -T <backup_image>

The above command output has the following snippet:

  USERSPACE1
  flags:  3122


  0x3122 AND
  0x1000 =
  ----------
  0x1000


This tablespace is enabled for automatic storage because 0x3122 AND 0x1000 is not zero.

Related Information

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Database Objects\/Config - Tablespaces","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.7;9.5;9.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21251622