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 > Command to check DB size

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-24-06, 03:16
miyuki miyuki is offline
Registered User
 
Join Date: Jun 2006
Posts: 21
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!
Reply With Quote
  #2 (permalink)  
Old 07-24-06, 04:30
guyprzytula guyprzytula is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 07-24-06, 04:39
miyuki miyuki is offline
Registered User
 
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...)
Reply With Quote
  #4 (permalink)  
Old 07-24-06, 05:32
rahul_s80 rahul_s80 is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 07-24-06, 06:00
miyuki miyuki is offline
Registered User
 
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?
Reply With Quote
  #6 (permalink)  
Old 07-24-06, 06:26
rahul_s80 rahul_s80 is offline
Registered User
 
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
Reply With Quote
  #7 (permalink)  
Old 07-24-06, 06:50
miyuki miyuki is offline
Registered User
 
Join Date: Jun 2006
Posts: 21
I see. Thanks!
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