dbTalk Databases Forums  

GET_DBSIZE_INFO

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss GET_DBSIZE_INFO in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Eliane
 
Posts: n/a

Default GET_DBSIZE_INFO - 08-10-2010 , 03:10 PM






Hi everyone,

Does somebody know why database size shows -1 value?!

I get correct value for other databases on the same instance.
Statistics are updated.


$ db2 "CALL GET_DBSIZE_INFO(?, ?, ?, 0)"

Value of output parameters
--------------------------
Parameter Name : SNAPSHOTTIMESTAMP
Parameter Value : 2010-08-10-12.57.35.475130

Parameter Name : DATABASESIZE
Parameter Value : -1

Parameter Name : DATABASECAPACITY
Parameter Value : -1

Return Status = 0


Thanks in advance!

Reply With Quote
  #2  
Old   
Gilroy Gonsalves
 
Posts: n/a

Default Re: GET_DBSIZE_INFO - 08-14-2010 , 05:27 PM






On Aug 10, 9:10*pm, Eliane <elian... (AT) yahoo (DOT) com.br> wrote:
Quote:
Hi everyone,

Does somebody know why database size shows -1 value?!

I get correct value for other databases on the same instance.
Statistics are updated.

$ db2 "CALL GET_DBSIZE_INFO(?, ?, ?, 0)"

* Value of output parameters
* --------------------------
* Parameter Name *: SNAPSHOTTIMESTAMP
* Parameter Value : 2010-08-10-12.57.35.475130

* Parameter Name *: DATABASESIZE
* Parameter Value : -1

* Parameter Name *: DATABASECAPACITY
* Parameter Value : -1

* Return Status = 0

Thanks in advance!

Check table systools.stmg_dbsize_info for the database size.
Calculating DB size is expensive operation and you are trying to
calculate immediately following the call to GET_DBSIZE_INFO procedure
using 0 as parameter to the procedure. Use -1 which will cacluate the
DB size at 30 minutes interval and cache it in STMG_DBSIZE_INFO table

Reply With Quote
  #3  
Old   
Willem Fischer
 
Posts: n/a

Default Re: GET_DBSIZE_INFO - 08-16-2010 , 05:08 AM



On Aug 15, 12:27*am, Gilroy Gonsalves <gonsalves.gil... (AT) gmail (DOT) com>
wrote:
Quote:
On Aug 10, 9:10*pm, Eliane <elian... (AT) yahoo (DOT) com.br> wrote:





Hi everyone,

Does somebody know why database size shows -1 value?!

I get correct value for other databases on the same instance.
Statistics are updated.

$ db2 "CALL GET_DBSIZE_INFO(?, ?, ?, 0)"

* Value of output parameters
* --------------------------
* Parameter Name *: SNAPSHOTTIMESTAMP
* Parameter Value : 2010-08-10-12.57.35.475130

* Parameter Name *: DATABASESIZE
* Parameter Value : -1

* Parameter Name *: DATABASECAPACITY
* Parameter Value : -1

* Return Status = 0

Thanks in advance!

Check table systools.stmg_dbsize_info for the database size.
Calculating DB size is expensive operation and you are trying to
calculate immediately following the call to GET_DBSIZE_INFO procedure
using 0 as parameter to the procedure. Use -1 which will cacluate the
DB size at 30 minutes interval and cache it in STMG_DBSIZE_INFO table
I don't have DB2 access right now but the stored procedure
dbsize_info() was not very usable for us (issues with SMS
tablespaces). Instead I got the tablespace snapshot via
SYSIBMADM.SNAPTBSP and SYSIBMADM.SNAPTBSP_PART and summed up the
product of number of pages and pagesize of each tablespace. Remember
to cast to BIGINT, because INTEGER is too small.

See

http://publib.boulder.ibm.com/infoce...c/r0022009.htm
http://publib.boulder.ibm.com/infoce...c/r0022008.htm

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.