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 > space allcaotion in db2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-17-08, 05:34
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
space allcaotion in db2

Hi all,
After the creation of blank database in db2, how we come to know the actual space used by that database?
as i din't had any idea, i just took the backup of that blank database n checked the size in the properties of the backup file, which says its 20 MB...is this the right way to know?
Reply With Quote
  #2 (permalink)  
Old 07-17-08, 06:22
d_mohan81 d_mohan81 is offline
Registered User
 
Join Date: Feb 2007
Posts: 31
you can try this command to get the szie of the database

select * from systools.stmg_dbsize_info
__________________
Regards
Mohan
Reply With Quote
  #3 (permalink)  
Old 07-17-08, 08:17
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
the following exception is thrown when i execute the command

SQL0204N "SYSTOOLS.STMG_DBSIZE_INFO
" is an undefined name.
Reply With Quote
  #4 (permalink)  
Old 07-17-08, 08:46
Pawan Kumar Pawan Kumar is offline
Registered User
 
Join Date: Mar 2008
Posts: 120
first connect to database....then run below procedure
db2 "call get_dbsize_info(?,?,?,0)"
__________________
Regards
Pawan Kumar
Reply With Quote
  #5 (permalink)  
Old 07-17-08, 11:27
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Which DB2 version on which platform?
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #6 (permalink)  
Old 07-18-08, 07:14
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
m using DB2 v8.1 on windows XP.

after executing the command:
'db2 call get_dbsize_info(?,?,?,0)'
it is throwing this error:
SQL04404 no authorized routine named "GET_DBSIZE_INFO" of type "procedure" having compatible arguments was found.

n after runnig this command:
'select * from systools.stmg_dbsize_info'
it is throwing this error:
SQL0204N "systools.stmg_dbsize_info " is an undefined name.
I can also not find any schema in my database with name systools.
Reply With Quote
  #7 (permalink)  
Old 07-18-08, 08:10
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
That SP was introduced in approximately FP 9 of 8.1 (which is the same as 8.2.2). Fixpacks are free to download from the IBM site and the latest for vesion 8 is FP 16.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #8 (permalink)  
Old 07-18-08, 08:15
nick.ncs nick.ncs is offline
Registered User
 
Join Date: May 2007
Location: somewhere in dbforums
Posts: 221
Well if you have control center then the total db size is displayed whenever you select any database....
Reply With Quote
  #9 (permalink)  
Old 07-19-08, 17:25
DB2Learner DB2Learner is offline
Registered User
 
Join Date: Jul 2008
Posts: 8
This will help U....check this
db2 "select TABLESPACE_ID,CONTAINER_TYPE,TABLESPACE_NAME,TOTAL _PAGES,USABLE_PAGES,(TOTAL_PAGES-USABLE_PAGES) as FREEPAGES from table(SNAPSHOT_CONTAINER('SIDRKMG',-1)) as sample"
Reply With Quote
  #10 (permalink)  
Old 07-22-08, 02:00
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
hi marcus,

thanks! i upgraded to v9 n now i can see the SP with name get_dbsize_info.

nick,
i din't found any db information when i select the database. just let me know where exactly i will find that info.

DB2learner,
din't understood the command u suggested to execute.
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