Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2006
    Posts
    21

    Unanswered: Command to check DB size

    Hi!

    I am using DB2 v8.1.1.89 on AIX. I want to check the size of database which has been used up yet. Could anyone advise the command to be run to check this?

    Thank you very much!

  2. #2
    Join Date
    Jun 2006
    Posts
    471

    size

    you could a table function to query
    SNAPSHOT_TBS_CFG--(--dbname--,--dbpartitionnum--)---
    this returns all info about page size and pages used so ts size....
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  3. #3
    Join Date
    Jun 2006
    Posts
    21
    I tried to run "SNAPSHOT_TBS_CFG" in command editor but it failed.

    BTW, I also tried to run "call sysproc.get_dbsize_info(?, ?, ?, 0)" but the following error occurred:
    SQL0443N Routine "*IZE_INFO" (specific name "") has returned an error SQLSTATE with diagnostic text "SQL1092 Reason code or token: XXX "
    (XXX is the login user name...)

  4. #4
    Join Date
    Jul 2006
    Location
    Pune , India
    Posts
    433
    hi
    i suppose you are not having proper authorities.

    C:\Program Files\IBM\SQLLIB\BIN>db2 ? SQL1092


    SQL1092N "<authorization-ID>" does not have the authority to
    perform the requested command.

    Explanation:

    The user attempted to execute a command or operation without
    having the proper authority for that command or operation.

    The command cannot be processed.

    Federated system users: this situation can also be detected by
    the data source.

    User Response:

    Log on as a user with the correct authority and retry the failed
    command or operation. Correct authorities may include SYSADM,
    SYSCTRL, SYSMAINT, and DBADM. DBADM is granted on databases and
    all other authorities are determined by membership in the groups
    defined in the database manager configuration (eg. if
    sysctrl_group in the database manager configuration file is
    defined as 'beatles', then you must belong to the group 'beatles'
    to have SYSCTRL authority). Refer to the Command Reference or
    the SQL Reference for the listing of required authorities for the
    attempted command or operation.


    Contact the System Administrator for authority request
    assistance. Do not attempt to execute the command without
    appropriate authorization.

    Rahul

  5. #5
    Join Date
    Jun 2006
    Posts
    21
    Thanks a lot!! I think the user id I am using really dont have privilege to run this command.

    If the user has necessary privileges, is it that this command return the size of the database which I am connecting to?

  6. #6
    Join Date
    Jul 2006
    Location
    Pune , India
    Posts
    433
    yup,

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

    Value of output parameters
    --------------------------
    Parameter Name : SNAPSHOTTIMESTAMP
    Parameter Value : 2006-07-24-12.38.29.984000

    Parameter Name : DATABASESIZE
    Parameter Value : 10677248000

    Parameter Name : DATABASECAPACITY
    Parameter Value : 17040382976

    Return Status = 0



    Get more at:

    http://publib.boulder.ibm.com/infoce...69%7a%65%22%20

  7. #7
    Join Date
    Jun 2006
    Posts
    21
    I see. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •