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.
Floyd Wellershaus asked for a sysmaster query to list the tables in a named dbspace for scripting. Art Kagel and Victor Miramontes gave select from systabnames where partdbsnum(partnum) equals the dbspace number. Diane Lavoie gave a join of sysptprof and sysptnhdr using dbinfo with dbspace and partnum to match the dbspace name. Solved.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
If I know the dbspace name and I want to find exactly which tables
are in it, what is the best sysmaster query to do that ?
I know I can run oncheck -pe and find the answers, but I am trying to script
this.
Thanks,
Floyd
select dbsname, tabname
from systabnames
where partdbsnum(partnum) = <dbspacenum>;
Art S. Kagel
----- Original Message -----
From: Floyd Welle.... <fwellers@yahoo.com>
At: 3/ 8 8:16
> If I know the dbspace name and I want to find exactly which tables are in it,
> what is the best sysmaster query to do that ?
> I know I can run oncheck -pe and find the answers, but I am trying to script
> this.
>
> Thanks,
> Floyd
Hi,
You may use the following query, which display tables from psapbtab
dbspace
select tabname
from sysptprof, sysptnhdr
where sysptprof.partnum = sysptnhdr.partnum
and dbinfo("dbspace", sysptprof.partnum) = 'psapbtab'
Diane Lavoie
Database Administrator
Enterprise Systems - Infrastructure and Corporate Solutions
Domtar inc
-----Original Message-----
From: forum.subscriber@iiug.org [mailto:forum.subscriber@iiug.org] On
Behalf Of Floyd Welle....
Sent: Tuesday, March 08, 2005 8:01 AM
To: ids@iiug.org
Subject: get tables from dbspace [4425]
If I know the dbspace name and I want to find exactly which tables are
in it, what is the best sysmaster query to do that ?
I know I can run oncheck -pe and find the answers, but I am trying to
script this.
Thanks,
Floyd
You can
execute the following query on sysmaster database:
select tabname from systabnames
where partdbsnum(partnum)=X
Where X is the number of the dbspace.
Regards,
Víctor Fabián Miramontes
DBA Proyecto SAP
Cencosud S.A.
TE: 54-11-4733-1000 int. 4158
>>> "Floyd Welle...." <fwellers@yahoo.com> 03/08 10:01 a.m. >>>
If I know the dbspace name and I want to find exactly which tables are in it,
what is the best sysmaster query to do that ?
I know I can run oncheck -pe and find the answers, but I am trying to script
this.
Thanks,
Floyd
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.