Unix Technical Forum

Schema on Db2 database installed on Main frame machine zOS.

This is a discussion on Schema on Db2 database installed on Main frame machine zOS. within the DB2 forums, part of the Database Server Software category; --> Hi , I would like to know : 1.how to find all the schema in my DB2 database on ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-20-2008, 06:55 PM
karanbikash@gmail.com
 
Posts: n/a
Default Schema on Db2 database installed on Main frame machine zOS.

Hi ,

I would like to know :
1.how to find all the schema in my DB2 database on Main frame
machine .
2. How to see all the tables for a given schema .
3. What are the default schema in Db2 on Mainframe . zOS.


I know all the above when I connect to DB2 on LUW ..
1. db2 select schemaname from syscat.schemata
2. db2 list tables for schema <schema name >
3. The defauult are SYSIBM SYCAT , SYSCAT . SYSFUN .

Can u please help me ...as I am connecting to the ZOS Db2 database
for the first time ,..and all the query fails .

Thanks a lot .
Bikash Karan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-20-2008, 06:55 PM
Mark A
 
Posts: n/a
Default Re: Schema on Db2 database installed on Main frame machine zOS.

<karanbikash@gmail.com> wrote in message
news:585e45d4-f95b-447a-b127-a74e95d489da@j33g2000pri.googlegroups.com...
> Hi ,
>
> I would like to know :
> 1.how to find all the schema in my DB2 database on Main frame
> machine .
> 2. How to see all the tables for a given schema .
> 3. What are the default schema in Db2 on Mainframe . zOS.
>
>
> I know all the above when I connect to DB2 on LUW ..
> 1. db2 select schemaname from syscat.schemata
> 2. db2 list tables for schema <schema name >
> 3. The defauult are SYSIBM SYCAT , SYSCAT . SYSFUN .
>
> Can u please help me ...as I am connecting to the ZOS Db2 database
> for the first time ,..and all the query fails .
>
> Thanks a lot .
> Bikash Karan


The fully qualified table names are in SYSIBM.SYSTABLES. In DB2 z/OS, the
table creator is equivalent to the table schema in DB2 for LUW.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-20-2008, 06:55 PM
karanbikash@gmail.com
 
Posts: n/a
Default Re: Schema on Db2 database installed on Main frame machine zOS.

On May 20, 10:44*am, "Mark A" <nob...@nowhere.com> wrote:
> <karanbik...@gmail.com> wrote in message
>
> news:585e45d4-f95b-447a-b127-a74e95d489da@j33g2000pri.googlegroups.com...
>
>
>
>
>
> > Hi ,

>
> > I would like to know :
> > 1.how to find all the schema in my DB2 database on Main frame
> > machine .
> > 2. How to see all the tables for a given schema .
> > 3. What are the default schema in Db2 on Mainframe . zOS.

>
> > I know all the above when I connect to DB2 on LUW ..
> > 1. db2 select schemaname from syscat.schemata
> > 2. db2 list tables for schema <schema name >
> > 3. The defauult are *SYSIBM SYCAT , SYSCAT *. SYSFUN .

>
> > Can u please help me ...as I am connecting to *the ZOS Db2 database
> > for the first time ,..and all the query fails .

>
> > Thanks a lot .
> > Bikash Karan

>
> The fully qualified table names are in SYSIBM.SYSTABLES. In DB2 z/OS, the
> table creator is equivalent to the table schema in DB2 for LUW.- Hide quoted text -
>
> - Show quoted text -



Hi , Thanks a lot .
I was able to find all the creator i.e schema from sysibm.systools.
I hv 1 more question ...is their a way to get the tables of a schema
with out using the query "select name , creator from sysibm.systools
where creator='XYZ' ;

In normal case in LUW we use the command "db2 list tables for schema
<schemaname> . Is their any similar command in zOS DB2.

Thanks and Regards
Bikash


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-20-2008, 06:55 PM
Dave Hughes
 
Posts: n/a
Default Re: Schema on Db2 database installed on Main frame machine zOS.

karanbikash@gmail.com wrote:

> On May 20, 10:44*am, "Mark A" <nob...@nowhere.com> wrote:

[snip]
> Hi , Thanks a lot .
> I was able to find all the creator i.e schema from sysibm.systools.
> I hv 1 more question ...is their a way to get the tables of a schema
> with out using the query "select name , creator from sysibm.systools
> where creator='XYZ' ;
>
> In normal case in LUW we use the command "db2 list tables for schema
> <schemaname> . Is their any similar command in zOS DB2.


Not as far as I know. On DB2 for z/OS, you're basically limited to
querying the system catalog for information (which wouldn't be a bad
thing if its system catalog was anywhere near as complete as the DB2
for LUW one - unfortunately it's not and there's several "warts" in
there too, e.g. the way view definitions are spread across several rows
in SYSIBM.SYSVIEWS).

On the plus side, the REMARKS columns in the z/OS system catalog permit
762 (?!) characters, beating the rather puny 254 character limit in DB2
for LUW :-). Still, it's not as much as the REMARKS columns in the
QSYS2 catalog on DB2 for i5/OS (2000 characters!) ... which has yet
another layout.

You can find the documentation for the z/OS catalog tables here:

v8
http://publib.boulder.ibm.com/infoce...ic/com.ibm.db2
..doc.sqlref/rctabls.htm#rctabls

v9.1
http://publib.boulder.ibm.com/infoce...ic/com.ibm.db2
9.doc.sqlref/db2z_catalogtablesintro.htm


Cheers,

Dave.


P.S. If I sound a bit cheesed off at all differences it's because
they're causing difficulties for me in a small project. Deep breaths...
:-)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:20 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com