1

Is there a way to get table or tablespace size accurately via SQL for Db2 Z/OS? From whatever I can find, there has been information with regards to Db2 LUW but not for z/OS.

I found a article for z/OS, which as I understand cannot be done from SQL side(using Dbeaver or TOAD, etc) and requires going on the mainframe side as well.

Would be great to get some assistance here.

arsm4
  • 101
  • 2
  • 10
  • Why do you need to know the table size? – cschneid Apr 06 '22 at 17:02
  • @cschneid Not sure how to answer this question. Need to know this for various purposes, as to which table is the biggest, which requires to moved to a different storage, maintenance activities, etc. Are you saying table size is something not a practice in z/OS? – arsm4 Apr 06 '22 at 17:21
  • These are all DBA tasks. I'm saying if you aren't the DBA then this isn't your problem, and if you are the DBA then I'd recommend you refer to [the IBM documentation](https://www.ibm.com/docs/en/db2-for-zos/12?topic=recovery-backing-up-recovering-your-data) before SO. – cschneid Apr 06 '22 at 19:46

1 Answers1

0

You may take a Look at SYSIBM.SYSTABLESPACE. If Statistics are accurate following Columns will help you: PGSIZE (SMALLINT Size of one Page in KB) NACTIVEF (FLOAT Number of active Pages) STATSTIME (Timestamp Time of RUNSTATS Util)

MisterBu
  • 1
  • 1