Topic
  • 8 replies
  • Latest Post - ‏2013-01-07T18:16:49Z by SystemAdmin
SystemAdmin
SystemAdmin
5837 Posts

Pinned topic GET_DBSIZE_INFO returns -1

‏2006-10-06T15:54:27Z |
I just upgraded to version 9 and when I'm looking at my databases using the db2 control center the size and capacity show 0MB. When I execute the GET_DBSIZE_INFO stored procedure the databasesize value is -1. Can someone help me resolve this issue?
Updated on 2013-01-07T18:16:49Z at 2013-01-07T18:16:49Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: GET_DBSIZE_INFO returns -1

    ‏2006-11-21T10:08:05Z  
    I'm also facing the same problem.I'm using DB2 V8.1 FP 12.
    Can anybody please suggest?
  • ocgstyles
    ocgstyles
    472 Posts

    Re: GET_DBSIZE_INFO returns -1

    ‏2006-11-21T14:02:19Z  
    I'm also facing the same problem.I'm using DB2 V8.1 FP 12.
    Can anybody please suggest?
    Hi...

    Just curious... What happens when you do this?

    db2 "select * from systools.stmg_dbsize_info"

    • Keith
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: GET_DBSIZE_INFO returns -1

    ‏2006-12-11T09:41:11Z  
    • ocgstyles
    • ‏2006-11-21T14:02:19Z
    Hi...

    Just curious... What happens when you do this?

    db2 "select * from systools.stmg_dbsize_info"

    • Keith
    I'm getting the same result out of
    db2 "select * from systools.stmg_dbsize_info"
    like dbsize=-1 and dbcapacity=-1

    NOTE: I have catalogged 3 remote DBs in my system.I get correct result for 2 db where as for the rest one i'm getting -1.
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: GET_DBSIZE_INFO returns -1

    ‏2007-01-25T21:33:01Z  
    I'm getting the same result out of
    db2 "select * from systools.stmg_dbsize_info"
    like dbsize=-1 and dbcapacity=-1

    NOTE: I have catalogged 3 remote DBs in my system.I get correct result for 2 db where as for the rest one i'm getting -1.
    Did anyone get the answer to this question? Why is the procedure returning -1 for some databases?

    Value of output parameters

    Parameter Name : SNAPSHOTTIMESTAMP
    Parameter Value : 2007-01-25-20.57.23.396172

    Parameter Name : DATABASESIZE
    Parameter Value : 23209323053056

    Parameter Name : DATABASECAPACITY
    Parameter Value : -1

    Return Status = 0
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: GET_DBSIZE_INFO returns -1

    ‏2007-01-27T09:48:38Z  
    Did anyone get the answer to this question? Why is the procedure returning -1 for some databases?

    Value of output parameters

    Parameter Name : SNAPSHOTTIMESTAMP
    Parameter Value : 2007-01-25-20.57.23.396172

    Parameter Name : DATABASESIZE
    Parameter Value : 23209323053056

    Parameter Name : DATABASECAPACITY
    Parameter Value : -1

    Return Status = 0

    Hi,

    Actually, are you using Windows or Linux? Any filesystem is unmounted or tablespace is offline?

    I tried with this command, db2 call get_dbsize_info(?,?,?,0) and the output is as follows -

    Value of output parameters

    Parameter Name : SNAPSHOTTIMESTAMP
    Parameter Value : 2007-01-27-17.41.43.687000

    Parameter Name : DATABASESIZE
    Parameter Value : 55271424

    Parameter Name : DATABASECAPACITY
    Parameter Value : 577684480

    Return Status = 0

    Refer more to this link here -- http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.admin.doc/doc/r0011863.htm

    Allan
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: GET_DBSIZE_INFO returns -1

    ‏2007-01-30T23:04:49Z  

    Hi,

    Actually, are you using Windows or Linux? Any filesystem is unmounted or tablespace is offline?

    I tried with this command, db2 call get_dbsize_info(?,?,?,0) and the output is as follows -

    Value of output parameters

    Parameter Name : SNAPSHOTTIMESTAMP
    Parameter Value : 2007-01-27-17.41.43.687000

    Parameter Name : DATABASESIZE
    Parameter Value : 55271424

    Parameter Name : DATABASECAPACITY
    Parameter Value : 577684480

    Return Status = 0

    Refer more to this link here -- http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.admin.doc/doc/r0011863.htm

    Allan
    I just found out what the problem was.
    According to the docs, it is not available on DPF databases:

    dbcapacity: An output parameter of type BIGINT that returns the database capacity (in bytes). This value is not available on partitioned database systems.
    Thanks
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: GET_DBSIZE_INFO returns -1

    ‏2007-03-13T15:37:46Z  
    I just found out what the problem was.
    According to the docs, it is not available on DPF databases:

    dbcapacity: An output parameter of type BIGINT that returns the database capacity (in bytes). This value is not available on partitioned database systems.
    Thanks
    Does somebody have an answer why the DBCAPACITY gives back -1?
    I do not have any DPF environment, this is a AIX ESE env.

    Also, the same instruction db2 "CALL SYSPROC.GET_DBSIZE_INFO(?,?,?,0)"
    which was working perfectly on DB2 V8.2.5 (DB2 V8.1 FP12) now is "hanging up" the system after I applied the FP14.

    The "hanging" instruction after 7:30 hours is:

    Connection request start timestamp = 03/06/2007 06:26:51.378188
    Connect request completion timestamp = 03/06/2007 06:26:51.379999
    Application idle time = 7 hours 36 minutes 37 seconds

    Blocking cursor = NO
    Dynamic SQL statement text:
    UPDATE SYSTOOLS.STMG_DBSIZE_INFO SET SNAPSHOT_TIMESTAMP = ?, DB_SIZE = ?, DB_CAPACITY = ? WHERE SNAPSHOT_TIMESTAMP = ?

    Anyway, these are the RESULTS when I use 1440.
    db2 "CALL SYSPROC.GET_DBSIZE_INFO(?,?,?,1440)"
    SNAPSHOTTIMESTAMP = 2007-03-13-10.31.41.568816
    DATABASESIZE = 177783
    DATABASECAPACITY = -1
    Info into SYSTOOLS.STMG_DBSIZE_INFO

    SNAPSHOT_TIMESTAMP DB_SIZE DB_CAPACITY
    --------------------
    2007-03-13-10.31.41.568816 186419347456 -1

    If somebody have the same problem, please advise.
    Thanks
    mceli
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: GET_DBSIZE_INFO returns -1

    ‏2013-01-07T18:16:49Z  
    Does somebody have an answer why the DBCAPACITY gives back -1?
    I do not have any DPF environment, this is a AIX ESE env.

    Also, the same instruction db2 "CALL SYSPROC.GET_DBSIZE_INFO(?,?,?,0)"
    which was working perfectly on DB2 V8.2.5 (DB2 V8.1 FP12) now is "hanging up" the system after I applied the FP14.

    The "hanging" instruction after 7:30 hours is:

    Connection request start timestamp = 03/06/2007 06:26:51.378188
    Connect request completion timestamp = 03/06/2007 06:26:51.379999
    Application idle time = 7 hours 36 minutes 37 seconds

    Blocking cursor = NO
    Dynamic SQL statement text:
    UPDATE SYSTOOLS.STMG_DBSIZE_INFO SET SNAPSHOT_TIMESTAMP = ?, DB_SIZE = ?, DB_CAPACITY = ? WHERE SNAPSHOT_TIMESTAMP = ?

    Anyway, these are the RESULTS when I use 1440.
    db2 "CALL SYSPROC.GET_DBSIZE_INFO(?,?,?,1440)"
    SNAPSHOTTIMESTAMP = 2007-03-13-10.31.41.568816
    DATABASESIZE = 177783
    DATABASECAPACITY = -1
    Info into SYSTOOLS.STMG_DBSIZE_INFO

    SNAPSHOT_TIMESTAMP DB_SIZE DB_CAPACITY
    --------------------
    2007-03-13-10.31.41.568816 186419347456 -1

    If somebody have the same problem, please advise.
    Thanks
    mceli
    Hi ,

    I am also getting the same message . If some body got the solution ?

    db2 "select * from systools.stmg_dbsize_info"

    SNAPSHOT_TIMESTAMP DB_SIZE DB_CAPACITY

    --------------------
    2013-01-07-12.09.17.163034 -1 -1