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


Forgot your password?
 
Document Actions

Which are the tables from one tablespace ?

Which are the tables from one tablespace ?

you can find which are the tables from one tablespace performing the command below:

db2 select tabname from syscat.tables where tbspace='<tablespace_name>'

Ex.:

db2 select tabname from syscat.tables where tbspace='USERSPACE1'

Output:

TABNAME

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

CL_SCHED

PROJECT

DEPARTMENT

EMPLOYEE

EMP_PHOTO

EMP_RESUME

PROJACT

EMPPROJACT

ACT

IN_TRAY

ORG

STAFF

SALES

ADEFUSR




Or you can find which are the tables from one tablespace using the db2pd tool:

db2pd -d sample -tcbstats tbspaceid=3

db2pd output
Database Partition 0 -- Database SAMPLE -- Active -- Up 0 days 06:44:41

TCB Table Stats:
Address    TbspaceID TableID TableName          SchemaNm Scans      ObjClass UDI        DataSize   IndexSize  PgReorgs  NoChgUpdts Reads                FscrUpdates          Inserts              Updates              Deletes              OvFlReads            OvFlCrtes  LfSize     LobSize
0x025DBCA0 3               HMON_ATM_INFO      SYSTOOLS 48         Perm     779        10         5          3 1221       0                    3                    0                    349                  0                    3862                 0          0          0
0x025D13A0 3               POLICY             SYSTOOLS 0          Perm     5          1          3          0      0          0                    0                    0                    0                    0                    0               0          0          64

The tableID 3 and 4 are associated with the tablespaceID 3.

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





Polls