Schema on Db2 database installed on Main frame machine zOS.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • karanbikash@gmail.com

    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
  • Mark A

    #2
    Re: Schema on Db2 database installed on Main frame machine zOS.

    <karanbikash@gm ail.comwrote in message
    news:585e45d4-f95b-447a-b127-a74e95d489da@j3 3g2000pri.googl egroups.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.SYSTABLE S. In DB2 z/OS, the
    table creator is equivalent to the table schema in DB2 for LUW.


    Comment

    • karanbikash@gmail.com

      #3
      Re: Schema on Db2 database installed on Main frame machine zOS.

      On May 20, 10:44 am, "Mark A" <nob...@nowhere .comwrote:
      <karanbik...@gm ail.comwrote in message
      >
      news:585e45d4-f95b-447a-b127-a74e95d489da@j3 3g2000pri.googl egroups.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.SYSTABLE S. 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


      Comment

      • Dave Hughes

        #4
        Re: Schema on Db2 database installed on Main frame machine zOS.

        karanbikash@gma il.com wrote:
        On May 20, 10:44 am, "Mark A" <nob...@nowhere .comwrote:
        [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

        ..doc.sqlref/rctabls.htm#rct abls

        v9.1

        9.doc.sqlref/db2z_catalogtab lesintro.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...
        :-)

        Comment

        Working...