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 > Informix > Size of a single Database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-18-05, 08:40
mark.jansen mark.jansen is offline
Registered User
 
Join Date: Jan 2005
Posts: 2
Size of a single Database

Hello Forum,

this is my first posting here and I am looking forward to join your community!

I am using IDS 9.40 on Win2003. Are ther any scripts, working with this Version on this OS, that determin the size of a single Database?
I hope, this Question is not too simple for you and bothering you, but I am in Trouble and I need your help.

Greeting Mark
Reply With Quote
  #2 (permalink)  
Old 01-18-05, 17:53
saatatya saatatya is offline
Registered User
 
Join Date: Jan 2005
Posts: 30
Lightbulb Get your database size

Try the following SQL. Database size will be in pages. You need to multiply it with the page size you are using.

DATABASE sysmaster;
SELECT dbsname Database, SUM(size) TotalSizeInPage
FROM sysextents
GROUP BY dbsname

_______________
Sanjit Chakraborty
Reply With Quote
  #3 (permalink)  
Old 01-18-05, 17:53
RobP RobP is offline
Registered User
 
Join Date: Mar 2004
Location: Netherlands
Posts: 183
Hi Mark,

It is quite easy to get the database size of normal datatypes. Especially large objects (blobs) and smart blobs are rather difficult to specify per database. To get the info you need just use the following sql:

select sum(size) as nr_of_pages
from sysmaster:sysextents
where dbsname = '<dbname>'

This is just one of the methods. You can also use the systabnames and sysptnhdr tables in the sysmaster database to get the info. This will even give you a more detailed look because woth this you can get all allocated pages (like in previous query), but also all used and data pages.

Hope this helps,

Rob Prop
Reply With Quote
  #4 (permalink)  
Old 01-21-05, 07:17
mark.jansen mark.jansen is offline
Registered User
 
Join Date: Jan 2005
Posts: 2
THX for your help.

but this method ist obviously not exact enough.
My dbspace is about 70 GB and the addition of all databases is about 72 GB.

The difference of 2 GB ist not acceptable for my purposees.

BTW: I am not using Blobs etc.
Reply With Quote
  #5 (permalink)  
Old 01-21-05, 11:26
saatatya saatatya is offline
Registered User
 
Join Date: Jan 2005
Posts: 30
It is impossible that previous SQL giving wrong information. I am sure you are not considering something in your 70 GB calculation. Verify what all you have in the database with ‘oncheck –pe’ output.

__
SC
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