Discussion:
which system table contains the metadata of all the tables in the database
(too old to reply)
S***@infosys.com
2007-09-26 03:22:21 UTC
Permalink
HI,

which system table (under which schema like sysibm) contains the metadata of all the tables in the database?

please reply asap
Kelly Schlamb
2007-09-26 03:25:53 UTC
Permalink
What metadata are you looking for exactly? The main table is SYSIBM.SYSTABLES (or SYSCAT.TABLES) but then there are other tables that contain more information related to the table (e.g. SYSIBM.SYSCOLUMNS). SYSIBM.SYSTABLES will have a row for each table defined in the database.

Regards,
Kelly
S***@infosys.com
2007-09-26 08:02:49 UTC
Permalink
HI

thank you for replying. Is there any table which contains the names of all the tables in the whole database(including every schema) ??

please reply if you know?
Blair Kenneth Adamache
2007-09-26 20:52:12 UTC
Permalink
syscat.tables
Post by S***@infosys.com
HI
thank you for replying. Is there any table which contains the names of all the tables in the whole database(including every schema) ??
please reply if you know?
i***@alcad.si
2007-09-26 11:21:24 UTC
Permalink
Hi,
to get all schemas and tables execute select statement to system tables:
select tabschema, tabname from syscat.tables

or execute command:
list tables for all

Regards,
IgorM
i***@alcad.si
2007-09-26 11:20:26 UTC
Permalink
[i]The main table is SYSIBM.SYSTABLES (or SYSCAT.TABLES) but then there are other tables that contain more information related to the table (e.g. SYSIBM.SYSCOLUMNS).[/i]
Hi,
according to IBM suggestion use SYSCAT tables (views). SYSIBM tables can change from one version to another, but SYSCAT will not.
Hope this helps,
IgorM
Knut Stolze
2007-09-26 13:45:39 UTC
Permalink
Post by i***@alcad.si
[i]The main table is SYSIBM.SYSTABLES (or SYSCAT.TABLES) but then there
[are other tables that contain more information related to the table (e.g.
[SYSIBM.SYSCOLUMNS).[/i]
Hi,
according to IBM suggestion use SYSCAT tables (views). SYSIBM tables can
change from one version to another, but SYSCAT will not.
That's true for DB2 LUW (but the views in schema SYSCAT will also be
extended over time). DB2 z/OS has only the catalog tables in schema
SYSIBM.
--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Loading...