Determining what dbspaces tables are in.
Posted in 1999
Topics: Storage & Space Management
Can anyone show me a command or query that will show me what tables are in what dbspaces. Along the same lines, what dbspace does Informix create tables in by default? The same as the database? I'm using Workgroup Server 7.2x, and Dynamic Server 7.2x
Here is what I use for Workgroup Server...
echo "select sysdbspartn.name Database, sysdbstab.name DBSpace
from sysdbspartn, sysdbstab
where trunc(sysdbspartn.partnum/1048576) = sysdbstab.dbsnum
order by 1" | dbaccess sysmaster -
Steve
--
Steven L Cooper
Manager, Systems Engineering
---------------------------------------
Please reply to NG only, so others may be enlightened...
The views expressed here are mine and
you can't have them...unless you agree!
Russell Bierschbach <rbierschbach@simpletel.com> wrote in article
<36966d9d.0@news.prismnet.com>...
> Can anyone show me a command or query that will show me what tables are
in
> what dbspaces.
>
> Along the same lines, what dbspace does Informix create tables in by
> default? The same as the database?
>
> I'm using Workgroup Server 7.2x, and Dynamic Server 7.2x
>
>
>
>
>
>
In article <36966d9d.0@news.prismnet.com>, "Russell Bierschbach" <rbierschbach@simpletel.com> wrote: > Can anyone show me a command or query that will show me what tables are in > what dbspaces. > > Along the same lines, what dbspace does Informix create tables in by > default? The same as the database? > > I'm using Workgroup Server 7.2x, and Dynamic Server 7.2x > > Try this SQL while connected to sysmaster: SELECT stbn.tabname TABLE, stbn.dbsname DATABASE, sdbs.name DBSPACE FROM systabnames stbn, sysdbspaces sdbs, <database name>:systables stbl WHERE stbn.partnum = stbl.partnum AND stbl.tabid > 99 AND sdbs.dbsnum = (TRUNC(HEX(stbn.partnum)/1000000)); You're correct. When you create a table, it is created in the same dbspace that the database is created in. Bob -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own