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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| <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. |
| |||
| 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 |
| ||||
| 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... :-) |