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.
If you dont want to use dbschema -ss utility , get the table partnum (from
systables) in hexadecimal format ( 0xDDDLLLLL). The first 3 digits give you
the dbspace number. You can check this dbsnum in the sysmaster:sysdbspaces
for the dbspace_name.
If your table is fragmented, it is better you get the partnum from
sysmaster:systabnames instead of your_db:systables.
There may be a direct way to do this. Anyone?
> -----Mensaje original-----
> De: Jiri Lisicky [SMTP:lisicky@datis.cdrail.cz]
> Enviado el: Lunes 13 de Noviembre de 2000 11:00 AM
> Para: informix-list@iiug.org
> Asunto: dbspace of where table is stored
>
> Please, where I find "systable" where is this info stored?
>
> Thanks
> --
> Ji'' Lisick' 'D KM'P Olomouc
> e-mail: lisicky@datis.cdrail.cz V'de'sk' 15
> phone: +420-068-472-2272 Olomouc, Czech Republic
> >>> 'e'tina ISO-8859-2 Compatible <<<
↪ replying to Carlos Kobashikawa C.
Phillip — — source: Informix-list mailing list archive (1991-1998)
Here's a SQL statement that should return the dbspace of where a table is
located, provided the table isn't fragmented.
select name Dbspace, dbsname Database,
tabname Table
from sysmaster:sysdbspaces a, sysmaster:systabnames b
where a.dbsnum = trunc(hex(b.partnum)/1048576)
and tabname='table_name';
Of course substitute table_name for the actual table name.
--
Phillip Tien
Database Administrator
Whole Foods Market, Inc.
If I ever get rich, I hope I'm not real mean to poor people, like I am now.
↪ replying to Phillip
smooth1 — — source: Informix-list mailing list archive (1991-1998)
Why not use the stored procedures already in sysmaster?
select name Dbspace, dbsname Database,
tabname Table
from sysmaster:sysdbspaces a, sysmaster:systabnames b
where a.dbsnum = partdbsnum(b.partnum)
and tabname='table_name';
partdbsnum(partnum) returns the dbspace number!
More portable to future releases??
Phillip wrote in message <3A106165.9F5A9567@wholefoods.com>...
>Here's a SQL statement that should return the dbspace of where a table is
>located, provided the table isn't fragmented.
>
>select name Dbspace, dbsname Database,
>tabname Table
>from sysmaster:sysdbspaces a, sysmaster:systabnames b
>where a.dbsnum = trunc(hex(b.partnum)/1048576)
>and tabname='table_name';
>
>Of course substitute table_name for the actual table name.
>
>
>--
>Phillip Tien
>Database Administrator
>Whole Foods Market, Inc.
>
>If I ever get rich, I hope I'm not real mean to poor people, like I am now.
>
>
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.