Database size??
Posted in 2003
Topics: General Discussion
Hi Friends! Somebody know how can obtain the database size in a multiple database instance Thanks in advance. Luis Arturo López Caballero Proyecto ASARE - Modulo Base Mexico D.F. Tel. 01(55)52294400 Ext. 85705
Do oncheck -pt dbname and some all 'Number of
pages allocated' or
'Number of pages used' depand what you need
Uri
luis.lopez0.... wrote:
>Hi Friends!
>
>Somebody know how can obtain the database size in a multiple database
>instance
>
>Thanks in advance.
>
>
>Luis Arturo López Caballero
>Proyecto ASARE - Modulo Base
>Mexico D.F.
>Tel. 01(55)52294400 Ext. 85705
>
>
>
>
>
>
>
>
>
>
>
--
Uri Haham
Professional Services Manager
ComSoft Technologies Ltd.
P.O.B 2016
Herzliya 46120 ISRAEL
Main switchboard: +972-9-9598999
Main fax no: +972-9-9598980
Extension: +972-9-9598627
E-mail uri@comsoft.co.il
URL www.comsoft.co.il
You can
use the infos in sysmaster database:
To see what an dbexport should consist of (no blobs in calculation):
database sysmaster;
set isolation to dirty read;
select sysdatabases.name[1,18],
round(sum(sysptnhdr.nrows * sysptnhdr.rowsize ) / 1048576, 2) Db_Size,
"MB" MB
from sysdatabases , sysptnhdr , systabnames
where sysdatabases.name = systabnames.dbsname
and systabnames.partnum = sysptnhdr.partnum
group by sysdatabases.name
===============================================
Allockated pages in dbspaces:
database sysmaster;
set isolation to dirty read;
select dbsname[1,18], round(sum(size * sh_pagesize / 1024),0) kB
from sysextents, sysshmvals
group by 1
order by 1
On Thu, 27 Feb 2003 02:42:49 -0500 (EST)
"Uri Haham " <uri@comsoft.co.il> wrote:
> Do oncheck -pt dbname and some all 'Number of pages allocated' or
> 'Number of pages used' depand what you need
>
> Uri
>
> luis.lopez0.... wrote:
>
> >Hi Friends!
> >
> >Somebody know how can obtain the database size in a multiple database
> >instance
> >
> >Thanks in advance.
> >
> >
> >Luis Arturo López Caballero
> >Proyecto ASARE - Modulo Base
> >Mexico D.F.
> >Tel. 01(55)52294400 Ext. 85705
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
> --
> Uri Haham
> Professional Services Manager
> ComSoft Technologies Ltd.
> P.O.B 2016
> Herzliya 46120 ISRAEL
> Main switchboard: +972-9-9598999
> Main fax no: +972-9-9598980
> Extension: +972-9-9598627
> E-mail uri@comsoft.co.il
> URL www.comsoft.co.il
>
>
>
>
>
--
Mit freundlichen Grüßen
Gerd Kaluzinski
\\\\\\\\|//
(o o)
--------------------------------------------------ooO-(_)-Ooo---
Gerd Kaluzinski mailto:gerd.kaluzinski@bytec.de
Manager Consulting mailto:support@bytec.de
Informix Certified Senior System Engineer
http://www.bytec.de
BYTEC GmbH Telefon: 07541-585-1019
Hermann-Metzger-Str. 7 Fax : 07541-585-2019
88045 Friedrichshafen Ooo.
-------------------------------------------------.ooO----( )---
( ) (_/
\\\\_)
Luis, I ask the same question a few days ago and Collin
Bull sent me this
nice script by Lester.... Hope this helps
Silvana
-----------------------------------------------------
I find the following script very useful -:
----------------------------------------------------------------------------
-
-- Module: @(#)dbsfree72.sql 1.5 Date: 97/07/18
-- Author: Lester B. Knutsen Email: lester@advancedatatools.com
-- Advanced DataTools Corporation
-- Discription:display free dbspace like Unix "df -k " command
----------------------------------------------------------------------------
-
-- Note: This is the 7.2 vesrion of this script modified to correctly
-- correctly display the truncated dbspace name
select d.dbsnum,name dbspace, -- name truncated to fit on one line
sum(chksize) Pages_size, -- sum of all chuncks size pages
sum(chksize) - sum(nfree) Pages_used,
sum(nfree) Pages_free, -- sum of all chunks free pages
round ((sum(nfree)) / (sum(chksize)) * 100, 2) percent_free
from sysmaster:sysdbspaces d, sysmaster:syschunks c
where d.dbsnum = c.dbsnum
and d.is_blobspace = 0
group by 1, 2
order by 1
into temp A;
select dbspace[1,8], pages_size, pages_used, pages_free, percent_free
from A;
drop table A;
Colin Bull
c.bull@VideoNetworks.com
> -----Original Message-----
> From: forum.subscriber@iiug.org [ mailto:forum.subscriber@iiug.org
<mailto:forum.subscriber@iiug.org> ]On
> Behalf Of Meza, Silvana
> Sent: 10 February 2003 21:27
> To: ids@iiug.org
> Subject: database current size used. [319]
>
>
> IDS 7.31uc7
> AIX 4.3.3
>
> I know that onstat -d gives the current size allocated and free in
> pages....but
> it doesn't give any totals.
>
> Is there an easy way to get the total size that is actually being used?
>
> Silvana
>
-----Original Message-----
From: luis.lopez0.... [ mailto:luis.lopez02@cfe.gob.mx
<mailto:luis.lopez02@cfe.gob.mx> ]
Sent: Wednesday, February 26, 2003 4:36 PM
To: ids@iiug.org
Subject: Database size?? [523]
Hi Friends!
Somebody know how can obtain the database size in a multiple database
instance
Thanks in advance.
Luis Arturo López Caballero
Proyecto ASARE - Modulo Base
Mexico D.F.
Tel. 01(55)52294400 Ext. 85705
The following query could help you:
database sysmaster;
select dbsname,sum(nptotal*2) kbytes
from systabnames, sysptnhdr
where systabnames.partnum = sysptnhdr.partnum
group by 1;
Regards,
Víctor Fabián Miramontes
DBA Proyecto SAP
Cencosud S.A.
TE: 4733-1000 int. 4153
>>> "luis.lopez0...." <luis.lopez02@cfe.gob.mx> 02/26 7:35 PM >>>
Hi Friends!
Somebody know how can obtain the database size in a multiple database
instance
Thanks in advance.
Luis Arturo L=pez Caballero
Proyecto ASARE - Modulo Base
Mexico D.F.
Tel. 01(55)52294400 Ext. 85705