How to check the usage of the DB2 table space from the command line interface

book

Article ID: 155826

calendar_today

Updated On:

Products

Security Information Manager

Issue/Introduction

You want to check the usage of the DB2 table space from the command line interface

Resolution

You may connect to the DB2 database to check the table space usage.

1. Login to the SSIM appliance using PuTTY or comparable SSH-client application.
2. Login as user "db2admin".
3. run "db2 connect to sesa"
4. run "db2 list tablespaces show detail"

It will show the details of each table similar to following:

------------------------------------------------------------

          Tablespaces for Current Database

 Tablespace ID                        = 0
 Name                                 = SYSCATSPACE
 Type                                 = System managed space
 Contents                             = Any data
 State                                = 0x0000
   Detailed explanation:
     Normal
 Total pages                          = 10627
 Useable pages                        = 10627
 Used pages                           = 10627
 Free pages                           = Not applicable
 High water mark (pages)              = Not applicable
 Page size (bytes)                    = 4096
 Extent size (pages)                  = 4
 Prefetch size (pages)                = 32
 Number of containers                 = 1

 Tablespace ID                        = 1
 Name                                 = TEMPSPACE1
 Type                                 = System managed space
 Contents                             = System Temporary data
 State                                = 0x0000
   Detailed explanation:
     Normal
 Total pages                          = 1
 Useable pages                        = 1
 Used pages                           = 1
 Free pages                           = Not applicable
 High water mark (pages)              = Not applicable
 Page size (bytes)                    = 4096
 Extent size (pages)                  = 4
 Prefetch size (pages)                = 32
 Number of containers                 = 1

~~~

 Tablespace ID                        = 13
 Name                                 = SIMA8KEVT
 Type                                 = Database managed space
 Contents                             = Any data
 State                                = 0x0000
   Detailed explanation:
     Normal
 Total pages                          = 8001374
 Useable pages                        = 8001336
 Used pages                           = 10440
 Free pages                           = 7990896
 High water mark (pages)              = 4314120
 Page size (bytes)                    = 8192
 Extent size (pages)                  = 24
 Prefetch size (pages)                = 192
 Number of containers                 = 1
 Minimum recovery time                = 2011-12-08-03.57.23.000000

 Tablespace ID                        = 14
 Name                                 = SIMA16KOTHR
 Type                                 = Database managed space
 Contents                             = Any data
 State                                = 0x0000
   Detailed explanation:
     Normal
 Total pages                          = 1199852
 Useable pages                        = 1199832
 Used pages                           = 636
 Free pages                           = 1199196
 High water mark (pages)              = 2532
 Page size (bytes)                    = 16384
 Extent size (pages)                  = 12
 Prefetch size (pages)                = 192
 Number of containers                 = 1
 Minimum recovery time                = 2011-12-08-03.57.23.000000

 Tablespace ID                        = 15
 Name                                 = T06_0000001_I
 Type                                 = Database managed space
 Contents                             = Any data
 State                                = 0x0000
   Detailed explanation:
     Normal
 Total pages                          = 1144
 Useable pages                        = 1140
 Used pages                           = 452
 Free pages                           = 688
 High water mark (pages)              = 452
 Page size (bytes)                    = 32768
 Extent size (pages)                  = 4
 Prefetch size (pages)                = 4
 Number of containers                 = 1

-------------------------------------------------------

The incident table space is tablespace 13.

You can divide used pages by total pages to check the used percentage.