Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Container size allocated to tablespaces

Status
Not open for further replies.

2742

Programmer
Apr 23, 2001
34
NZ
Hi everyone
Could anyone tell me how to find the size/ space allocated to a particular tablespace (without the gui) ie what sys table is this information in?

If anyone could help it would be most appriciated.

Thanks
 
Easy from the command line

db2 list tablespaces show detail
 
Thanks but is there something else. I'm trying to get the size allocated to a database managed table space and use the size for a calculation. Using the list you can't define where clauses or limit what is outputed.
 
use the method already described and grep awk what you want. size = page size * total number of pages
 
Thanks again but it still not quite what i want. You can use the above method to find out how much space is currently used! The total number of pages used from FPAGES or NPAGES in the syscat tables. Is there somewhere it tells you how many pages are allocated in the syscat tables?

Or am i miss understanding what you are saying ??
 
Here is the query so far, i hope this helps you understand what i mean!

DB2 SELECT TABNAME, COLCOUNT, TABLEID, TBSPACEID, CARD,NPAGES,FPAGES,(((FPAGES*4096)/1024)/1024) as SizeUsed,TBSPACE,INDEX_TBSPACE FROM SYSCAT.TABLES WHERE TBSPACEID IN (SELECT TBSPACEID FROM SYSCAT.TABLESPACES WHERE TBSPACETYPE = 'D')

All i need to find out now is the size allocated so i can find out the percentage used!

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top