If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Which system tables keeps information of TABLESPACE CONSUMTION?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-30-07, 11:55
kunal kunal is offline
Registered User
 
Join Date: May 2006
Posts: 18
Which system tables keeps information of TABLESPACE CONSUMTION?

Hi,

I want write a script to reflect the status of tablespace consumed by the database . Can anyone please tell me which SYS table contains the information of free pages and used pages.? I am aware of table SYSTABLESPACES but it contains only static information.
Also it would be great if anyone can tell where(in which sys tables) i can see log space consumption and temp space consumption, and max agents reached details/

Thanks
Kunal
Reply With Quote
  #2 (permalink)  
Old 01-30-07, 12:04
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
What you need is snapshot table functions (e.g. snap_get_db(), snap_get_tbsp())
Reply With Quote
  #3 (permalink)  
Old 01-31-07, 03:12
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Quote:
Originally Posted by kunal
I am aware of table SYSTABLESPACES but it contains only static information.
That doesn't answer your question (n_i already mentioned snapshot functions), but you should never use the SYSIBM.SYS* tables on DB2 for LUW (except SYSIBM.SYSDUMMY1). Those tables are not documented and may change at any time. Instead, rely on the catalog views in the SYSCAT schema.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #4 (permalink)  
Old 01-31-07, 09:59
kunal kunal is offline
Registered User
 
Join Date: May 2006
Posts: 18
Thanks . I can see that there is SYSCAT schema which contains SNAP views which will serve the purpose to some extent.

But i can see that it will give me infomration only AT THE MOMENT snapshot is taken . I will not get information like what is the resourse consumed over the batch window of say 4 hrs i.e what is total memory consumed and whats MOMENTARY MAX limiit reached..etc .from where would i get that statistics over period?
Reply With Quote
  #5 (permalink)  
Old 01-31-07, 23:55
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
if you need to study tablespace behaviour over a period create Event Monitor

CONNECT TO DBNAME ;
CREATE EVENT MONITOR as FOR TABLESPACES WRITE TO TABLE BUFFERSIZE 4 BLOCKED MANUALSTART ;
CONNECT RESET;

this will create a table tablespace_as where u can see the details
__________________
Rahul Singh
Certified DB2 9 DBA / Application Developer
Reply With Quote
  #6 (permalink)  
Old 02-01-07, 13:01
kunal kunal is offline
Registered User
 
Join Date: May 2006
Posts: 18
Thanks .It was great advice .

But this will be enough for monitoring TABLESPACE consumption . Could you please also tell similer thing to monitor log space and temp space consumption?

Thanks
Kunal
Reply With Quote
  #7 (permalink)  
Old 02-01-07, 14:38
kunal kunal is offline
Registered User
 
Join Date: May 2006
Posts: 18
Hi ,
I have created event monitor ...started it and stopped after some time...now when i want to analyse the data ... i dont see any data in the table TABLESPACE_AS...any ideas whats gone wrong?
Reply With Quote
  #8 (permalink)  
Old 02-01-07, 16:24
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by kunal
any ideas whats gone wrong?
Nothing. Except, may be, the fact that you didn't read the manual, which says that "the event monitor records a table space event for each table space when the last application disconnects from the database".
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On