Technote (FAQ)
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
Rate this page:
Average rating
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.