Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Lee Duong asked for a script listing all dbspaces and the tables in each with sizes. B. Dana pointed to Lester Knutsen's sysmaster SQL on the IIUG site. Mark Oberfield gave a sysmaster query using dbinfo(DBSPACE, pe_partnum) with sysptnext and systabnames, summing pe_size. Arni Thoroddsen suggested parsing CREATE TABLE scripts and using onstat -d.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Lee Duong — — source: Informix-list mailing list archive (1991-1998)
Hi,
Does anyone have some type of scripts that list All DBSPACE for an
Informixserver, and all tables in each DBSPACE + how much bytes they take?
Thanks!
↪ replying to Lee Duong
B. Dana — — source: Informix-list mailing list archive (1991-1998)
Mark Oberfield — — source: Informix-list mailing list archive (1991-1998)
>>>>> " " == Lee Duong <lehocd@sprint.ca> writes:
> Hi, Does anyone have some type of scripts that list All DBSPACE
> for an Informixserver, and all tables in each DBSPACE + how
> much bytes they take?
Oh, oh, I know this one!
Try this:
In the sysmaster database (you _are_ running IDS > 5 aren't you?):
select dbinfo("DBSPACE",pe_partnum) dbspace,dbsname,tabname,
sum(pe_size)*2 KB from sysptnext, systabnames
where partnum=pe_partnum group by 1,2,3 order by 1,4 desc;
Mark
--
"A conservative is one who admires radicals centuries after they're
dead."
-- Leo C. Rosten
↪ replying to Lee Duong
Arni Thoroddsen — — source: Informix-list mailing list archive (1991-1998)
Lee Duong wrote:
> Hi,
> Does anyone have some type of scripts that list All DBSPACE for an
> Informixserver, and all tables in each DBSPACE + how much bytes they take?
>
> Thanks!
Assuming that you have all of the text of the code that built the structure of
tables in the dataspaces( CREATE TABLE etc.) , all you would have to do is
lump all of the text of this code together in one MS Word document and then
built a VB macro that finds all cases of sentences that contain:
<CREATE tablename sentences> " IN <DBSPACE name>".
You only need to find " IN <DBSPACE name>" of course.
You could then have the macro output a line of information concerning the
particular table in the particular DBSPACE.
Or you could just do a find in the MS Word document and copy and paste
manually to for example an Excel document to build up a list of this
information.
But I perhaps Informix has a way of doing this directly? You should be able to
get the information using select statements into the systables to get this
kind of information.
If you dont place the tables in a particular DBSPACE with <CREATE tablename
sentences> " IN <DBSPACE name>"they will be placed in the default DBSPACE (you
are of course better of placing them in particular DBSPACES).
Personally I prefer to document in EXCEL the creation of the DBSPACES and the
tables when I make them originally. I dont rely on my memory with anything of
this sort. I want this information available immediately.
Of course onstat -d should give you the names of the spaces and some
additional info that you can read about in the Administrators guide, Volume 2.
--
Arni Thoroddsen
arnith@loki.bok.hi.is
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.