IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to find storage group related to dataset name


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ahmad

New User


Joined: 18 Oct 2008
Posts: 13
Location: Iran

PostPosted: Sun Nov 11, 2012 6:00 pm
Reply with quote

hi guys
consider that I have name of the dataset like 'DB9CAT.DSNDBD.BANK.TSPAGE.I0001.A009'
and i want to find it's related storage group in db2. i've already serached SYSxxxxxxs on DSNDB06 CATALOG TABLES but found nothing useful.
also my final goal is finding all volumes assigned to that desired storage group.

I'll appreciate your help.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sun Nov 11, 2012 9:09 pm
Reply with quote

Check these Catalog Tables for partial answer:
Table SYSSTOGROUP contains one row for each DB2 storage group.
Table SYSVOLUMES contains one row for each volume of each storage group.

Edit:
Table SYSDATABASE has a column 'STGROUP' which contains the default storage group of the database.
Back to top
View user's profile Send private message
ahmad

New User


Joined: 18 Oct 2008
Posts: 13
Location: Iran

PostPosted: Mon Nov 12, 2012 9:33 am
Reply with quote

thanks marso
but I'v already searched those tables and didn't find any relation between SYSTABLESPACE and SYSSTOGROUP which help me to find for example 'storage group of table space named TSPAGE' .
as you know in db2 panels if you put S command beside table name it'll show you it's table space name and if you put G beside that table space name it'll return it's Storage group name. I want to extract that kind of information.

well,I'm waiting for more...

and you mentioned SYSDATABASE, in my environment database designs some TSs are in default storage group of that data base but some of them have their own SG, so SYSDATABAE couldn't be so helpful in my case.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Nov 12, 2012 10:34 am
Reply with quote

Hi Ahmad,

Quote:
DB9CAT.DSNDBD.BANK.TSPAGE.I0001.A009


So your,
database = BANK
Tablespace= TSPAGE
Partition = 9

to find storage group name, run the below query
Code:
select dbname, tsname, STORNAME
from sysibm.systablepart
where dbname = 'BANK'
and TSNAME = 'TSPAGE'
--and PARTITION = 9
;

Use the above storagegroup name result in the below queries,
Code:
select sgname ,volid from sysibm.sysvolumes
where sgname = ' ' --<-- Type in Storage Group name
;
select name, vcatname, space, dataclas, mgmtclas, storclas
from sysibm.sysstogroup
where name = ' ' --<-- Type in Storage Group name
;


thanks,
Sushanth
Back to top
View user's profile Send private message
ahmad

New User


Joined: 18 Oct 2008
Posts: 13
Location: Iran

PostPosted: Mon Nov 12, 2012 10:54 am
Reply with quote

thanks a lot sushanth bobby

that query will do the trick ;)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
Search our Forums:

Back to Top