get tables from dbspace
Posted in 2005
Topics: Storage & Space Management
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