Currently, DB2 UDB does not offer an interface to link a database page in a table or index to a particular container's offset. However, the vxstorage_stats command or the Veritas Storage Foundation for DB2 Graphical User Interface can be used to display the I/O topology. No special setup is needed to view the topology.
To locate a table in a tablespace
Connect to the database PROD as the instance owner.
$db2 connect to PROD Database Connection Information
Database server = DB2/SUN64 7.2.5 SQL authorization ID = INST1 Local database alias = PROD
Enter the following query to display all the tablespaces in the table TABLE01. In this example, TBSPACE is the primary tablespace for all the table data, INDEX_TBSPACE contains the index (if any), and LONG_TBSPACE is the tablespace to store LONG column.
$db2 "select tbspace, index_tbspace, long_tbspace from \ syscat.tables where tabname='TABLE01'"
TBSPACE INDEX_TBSPACE LONG_TBSPACE ------------------ ------------------ ------------------ USER1 - - 1 record(s) selected.
After locating the tablespace name, enter the following command to find the container path name:
$db2 list tablespaces
... Tablespace ID = 3 Name = USER1 Type = Database managed space Contents = Any data State = 0x0000 Detailed explanation: Normal ...
The output indicates the Tablespace ID is 3 and the container path name is USER1:
$db2 list tablespace containers for 3
Tablespace Containers for Tablespace 3 Container ID = 0 Name = /data/system01.dbf Type = Disk
Tablespace USER1 contains only one container:
/data/system01.dbf