Personal tools
You are here: Home DB2 How To's Which are the containers from one tablespace ?
Navigation
Log in


Forgot your password?
 
Document Actions

Which are the containers from one tablespace ?

How to know which containers are associated with one specific tablespace.


All tablespaces are associated with one or more containers. You have to simple ways to find which containers are associated with a specific tablespace, the two ways are described below:


1 - Using db2pd


Before you execute the db2pd for one specific database, you need to connect  on the database.

db2 connect to sample

sample is the database name

db2pd -d sample -tablespaces tbs 4

The number 4 above, is the tablespaceid.

db2pd output
Database Partition 0 -- Database SAMPLE -- Active -- Up 0 days 00:17:24

Tablespace 4:
Address    Type Content AS  AR  PageSize   ExtentSize Auto Prefetch   BufID      BufIDDisk  State      TotPages   UsablePgs  UsedPgs    PndFreePgs FreePgs    InitSize    IncSize     IIP MaxSize     LastResize                 LRF HWMMinRecTime NQuiescers FSC NumCntrs   MaxStripe  Name
0x025D9E90 DMS  Any     No  No  4096       32         Yes  32         1          1          0x00000000 1000       960    96         0          864        0           0           No  0           None                       No  96    0          0          On  1          0          DMS_TS

Containers:
Address    ContainNum Type    TotalPages UseablePgs StripeSet  Container
0x025DA490 0          File    1000       960        0          c:\sample\dms\dms1.dat

As you see, you can get a lot of information about a specific tablespace, such as:

PageSize - ExtentSize - Prefetch
TotPages - UsablePgs - UsedPgs

At the last part of the output, you can find the containers and them informations associated with that tablespace.

Continer: c:\sample\dms\dms1.dat



2 - Using db2 list tablespaces


Before you execute the db2pd for one specific database, you need to connect  on the database.

db2 connect to sample

sample is the database name

db2 list tablespace containers for 4 show detail
The number 4 above, is the tablespaceid.

db2 list applications output
   Tablespace Containers for Tablespace 4

 Container ID                       = 0
 Name                                 = c:\sample\dms\dms1.dat
 Type                                  = File
 Total pages                        = 1000
 Useable pages                    = 960
 Accessible                           = Yes

Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls