cancel
Showing results for 
Search instead for 
Did you mean: 

tablespace check in DB2

Former Member
0 Kudos

Hi ,

How to check the tablespace size of a Java system with Linux + DB2.

Thanks a ton

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try to understand the syscat.tbspace table in db2 to analyze tablespace sizes. Check the below link

http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.admin.doc/doc/r0...

you need to calculate tablespace size based on "pagesize for the table space * No. of pages alloted".

please see appendix-1 of the below link

http://www.ibm.com/developerworks/data/library/techarticle/dm-0404snow/index.html

Appendix 1: Table space information script.

Regards,

Sitarama.

Answers (3)

Answers (3)

Former Member
0 Kudos

We have to multiple used pages * page size . look the below example

C:\Documents and Settings\374727>db2 " list tablespaces show detail" | more

Tablespaces for Current Database

Tablespace ID = 0

Name = SYSCATSPACE

Type = Database managed space

Contents = All permanent data. Regular table space.

State = 0x0000

Detailed explanation:

Normal

Total pages = 24576

Useable pages = 24572

Used pages = 18856 -


Free pages = 5716

High water mark (pages) = 18856

Page size (bytes) = 4096----


Extent size (pages) = 4

Prefetch size (pages) = 4

Number of containers = 1

tablespace size = 18856 * 4096 bytes

Former Member
0 Kudos

HI,

Its a direct command.

db2 " list tablespaces show detail" | more

Tablespaces for Current Database

Tablespace ID = 0

Name = SYSCATSPACE

Type = Database managed space

Contents = All permanent data. Regular table space.

State = 0x0000

Detailed explanation:

Normal

Total pages = 24576

Useable pages = 24572

Used pages = 18856

Free pages = 5716

High water mark (pages) = 18856

Page size (bytes) = 4096----


Extent size (pages) = 4

Prefetch size (pages) = 4

Number of containers = 1

tablespace size = 18856 * 4096 bytes

I am taking an example, here from Balaji.

The Tablespace size iz 24576 X 4096 in bytes.

High water mark is not exactly the size of your tablespace, eventhough it can be told that effectively HWM X Page Size will be the size of your tablespace.

Former Member
0 Kudos

1.list tablespaces show detail

Former Member
0 Kudos

follow sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f03d5fb8-b619-2b10-c383-c6d56872829e point 7.4.2

Former Member
0 Kudos

the link is not opening up

Former Member
0 Kudos

sdn.sap.com/irj/sdn/db6 --> Administration -> Database Administration Guide "SAP on IBM DB2 for Linux, UNIX, and Windows