RE: Getting the size of the database under IDS.2000 under 6.2 Linux
Posted in 2001
Thanks for your help. BTW, how do I get this answer out of the
query. In my case, the database size is much biger than the 2 GB
range of an INTEGER. I tried pulling this value out using ESQL/C and
the int8 data type, but this didn't seem to work. When I enter the
query in dbaccess, I get (for the latter query):
(expresion) (expression) (expression)
Any help would be greatly appreciated.
thanks,
Matt
Molina Victor writes:
> {---------------------------------------------------}
> select a.dbsnum, b.name,
> sum(chksize)*2 Assigned,
> (sum(chksize)-sum(nfree))*2 Used,
> sum(nfree)*2 Free
> from sysmaster@instance_tcp:syschunks a,
> sysmaster@instance_tcp:sysdbspaces b
> where a.dbsnum = b.dbsnum
> group by 1,2
> order by 5; > select "TOTAL ------------------>",
> sum(chksize)*2 Assigned,
> (sum(chksize)-sum(nfree))*2 Used,
> sum(nfree)*2 Free
> from sysmaster@instance_tcp:syschunks a,
> sysmaster@instance_tcp:sysdbspaces b
> where a.dbsnum = b.dbsnum
> group by 1
> order by 1;
> {---------------------------------------------------}
>
> Where instance_tcp is your instance name. For example, instance name =
> ids2k -> ids2k_tcp
>
> Victor
>
>
> -----Mensaje original-----
> De: Matthew Denny [mailto:mdenny@cs.berkeley.edu]
> Enviado el: Mi'rcoles, 17 de Enero de 2001 05:23 p.m.
> Para: informix-client-tools@iiug.org; informix-list@iiug.org;
> linux-informix@iiug.org
> Asunto: Getting the size of the database under IDS.2000 under 6.2 Linux
>
>
>
> Is there any way to get the total size of a database (including
> metadata and indices) from IDS.2000 under RedHat 6.2? I know that
> you can get the number and size of dbspace updates from ON-Monitor,
> but what I really need is just one number that is the amount of
> storage taken by one database's data and metadata. Any help would be
> greatly appreciated.
>
> thanks,
> Matt
>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <HTML>
> <HEAD>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
> <META NAME="Generator" CONTENT="MS Exchange Server version 6.0.4417.0">
> <TITLE>RE: Getting the size of the database under IDS.2000 under 6.2 Linux</TITLE>
> </HEAD>
> <BODY>
> <!-- Converted from text/plain format -->
>
> <P><FONT SIZE=2>{---------------------------------------------------}</FONT>
>
> <BR><FONT SIZE=2>select a.dbsnum, b.name, </FONT>
>
> <BR><FONT SIZE=2> sum(chksize)*2 Assigned,</FONT>
>
> <BR><FONT SIZE=2> (sum(chksize)-sum(nfree))*2 Used,</FONT>
>
> <BR><FONT SIZE=2> sum(nfree)*2 Free</FONT>
>
> <BR><FONT SIZE=2> from sysmaster@instance_tcp:syschunks a, </FONT>
>
> <BR><FONT SIZE=2> sysmaster@instance_tcp:sysdbspaces b</FONT>
>
> <BR><FONT SIZE=2>where a.dbsnum = b.dbsnum </FONT>
>
> <BR><FONT SIZE=2>group by 1,2</FONT>
>
> <BR><FONT SIZE=2>order by 5; </FONT>
>
> <BR><FONT SIZE=2>select "TOTAL ------------------>",</FONT>
>
> <BR><FONT SIZE=2> sum(chksize)*2 Assigned,</FONT>
>
> <BR><FONT SIZE=2> (sum(chksize)-sum(nfree))*2 Used,</FONT>
>
> <BR><FONT SIZE=2> sum(nfree)*2 Free </FONT>
>
> <BR><FONT SIZE=2> from sysmaster@instance_tcp:syschunks a,</FONT>
>
> <BR><FONT SIZE=2> sysmaster@instance_tcp:sysdbspaces b </FONT>
>
> <BR><FONT SIZE=2>where a.dbsnum = b.dbsnum</FONT>
>
> <BR><FONT SIZE=2>group by 1</FONT>
>
> <BR><FONT SIZE=2>order by 1;</FONT>
>
> <BR><FONT SIZE=2>{---------------------------------------------------}</FONT>
>
> <BR><FONT SIZE=2> </FONT>
>
> <BR><FONT SIZE=2>Where instance_tcp is your instance name. For example, instance name = ids2k -> ids2k_tcp</FONT>
> </P>
>
> <P><FONT SIZE=2>Victor</FONT>
> </P>
> <BR>
>
> <P><FONT SIZE=2>-----Mensaje original-----</FONT>
>
> <BR><FONT SIZE=2>De: Matthew Denny [<A HREF="mailto:mdenny@cs.berkeley.edu">mailto:mdenny@cs.berkeley.edu</A>]</FONT>
>
> <BR><FONT SIZE=2>Enviado el: Mi'rcoles, 17 de Enero de 2001 05:23 p.m.</FONT>
>
> <BR><FONT SIZE=2>Para: informix-client-tools@iiug.org; informix-list@iiug.org;</FONT>
>
> <BR><FONT SIZE=2>linux-informix@iiug.org</FONT>
>
> <BR><FONT SIZE=2>Asunto: Getting the size of the database under IDS.2000 under 6.2 Linux</FONT>
> </P>
> <BR>
> <BR>
>
> <P><FONT SIZE=2>Is there any way to get the total size of a database (including</FONT>
>
> <BR><FONT SIZE=2>metadata and indices) from IDS.2000 under RedHat 6.2? I know that</FONT>
>
> <BR><FONT SIZE=2>you can get the number and size of dbspace updates from ON-Monitor,</FONT>
>
> <BR><FONT SIZE=2>but what I really need is just one number that is the amount of</FONT>
>
> <BR><FONT SIZE=2>storage taken by one database's data and metadata. Any help would be</FONT>
>
> <BR><FONT SIZE=2>greatly appreciated.</FONT>
> </P>
>
> <P><FONT SIZE=2>thanks,</FONT>
>
> <BR><FONT SIZE=2>Matt</FONT>
> </P>
> <BR>
>
> </BODY>
> </HTML>