Catalog Table v9

download Catalog Table v9

of 30

description

DB2

Transcript of Catalog Table v9

  • 7/16/2019 Catalog Table v9

    1/30

    SYSTEM CATALOG TABLES: db2 ver 9

    The system catalogtable is a collection of tables and views that contain important information about adatabase.

    These catalog tables describe such things as table spaces, tables, columns, indexes, privileges,

    application plans, and packages. Authorized users can query the catalog; however, it is primarily intendedfor use by DB2 and is therefore subject to change. All catalog tables are qualified by SYSIBM. Thecatalog tables are updated by DB2 during normal operations in response to certain SQL statements,commands, and utilities.

    For e.g., when a table is created, DB2 inserts a row into SYSIBM.SYSTABLES for each column of thetable , inserts a row into SYSIBM.SYSCOLUMNS inserts a row into SYSIBM.SYSTABAUTH.

    You cannot explicitly create or drop these tables, but you can query and view their content. When thedatabase is created, in addition to the system catalog table objects, the following database objects aredefined in the system catalog:

    A set of read-only views for the system catalog tables is created in the SYSCAT schema.A set of updatable catalog views is created in the SYSSTAT schema

    DB2 for z/OS maintains these system catalog tables in database DSNDB06.DB2 catalog tables are contained in certain table space. There are 28 table spaces for system catalogtables in DB2 VER 9.

    Eg; DSNDB06.SYSDBASE.

    This table space contains catalog tables which stores the information on the objects that make up adatabase: table spaces, tables, views, columns, indexes, relationships, etc.

    This will contain following tables;SYSCOLAUTH, SYSCOLUMNS, SYSFIELDS, SYSFOREIGNKEYS, SYSINDEXES, SYSINDEXPART,

    SYSINDEXSPACESTATS, SYSKEYS, SYSRELS, SYSSYNONYMS, SYSTABAUTH, SYSTABLEPART,SYSTABLES, SYSTABLESPACEetc

    DSNDB06.SYSPLANThis table space contains the information about system catalog tables which stores the informationabout plans, DBRMs, statements in the plan, plan authorization, plan dependencies.

    ,

  • 7/16/2019 Catalog Table v9

    2/30

  • 7/16/2019 Catalog Table v9

    3/30

  • 7/16/2019 Catalog Table v9

    4/30

  • 7/16/2019 Catalog Table v9

    5/30

  • 7/16/2019 Catalog Table v9

    6/30

  • 7/16/2019 Catalog Table v9

    7/30

  • 7/16/2019 Catalog Table v9

    8/30

  • 7/16/2019 Catalog Table v9

    9/30

  • 7/16/2019 Catalog Table v9

    10/30

  • 7/16/2019 Catalog Table v9

    11/30

  • 7/16/2019 Catalog Table v9

    12/30

  • 7/16/2019 Catalog Table v9

    13/30

  • 7/16/2019 Catalog Table v9

    14/30

  • 7/16/2019 Catalog Table v9

    15/30

  • 7/16/2019 Catalog Table v9

    16/30

  • 7/16/2019 Catalog Table v9

    17/30

  • 7/16/2019 Catalog Table v9

    18/30

  • 7/16/2019 Catalog Table v9

    19/30

  • 7/16/2019 Catalog Table v9

    20/30

  • 7/16/2019 Catalog Table v9

    21/30

  • 7/16/2019 Catalog Table v9

    22/30

  • 7/16/2019 Catalog Table v9

    23/30

    SYSIBM.IPLIST table

    The SYSIBM.IPLIST table allows multiple IP addresses to be specified for a given

    LOCATION.

    Insert rows into this table when you want to define a remote DB2 data sharing

    group. The same value for the IPADDR column cannot appear in both the SYSIBM

    IPNAMES table and the SYSIBM.IPLIST table. Rows in this table can be inserted,

    updated, and deleted.

    SYSIBM.IPNAMES table

    The SYSIBM.IPNAMES table defines the remote DRDA servers DB2 can access

    using TCP/IP.

    Rows in this table can be inserted, updated, and deleted.

    SYSIBM.LOCATIONS table

    The SYSIBM.LOCATIONS table contains a row for every accessible remote server.

    The row associates a LOCATION name with the TCP/IP or SNA networkattributes for the remote server. Requesters are not defined in this table.

    Rows in this table can be inserted, updated, and deleted.

    SYSIBM.LULIST table

    The SYSIBM.LULIST table allows multiple LU names to be specified for a givenLOCATION.

    Insert rows into this table when you want to define a remote DB2 data sharing

    group. The same value for LUNAME column cannot appear in both theSYSIBM.LUNAMES table and the SYSIBM.LULIST table. Rows in this table can be

    inserted, updated, and deleted.

    SYSIBM.LUMODES table

    Each row of the SYSIBM.LUMODES table provides VTAM with conversation limits

    for a specific combination of LUNAME and MODENAME. The table is accessed

  • 7/16/2019 Catalog Table v9

    24/30

  • 7/16/2019 Catalog Table v9

    25/30

    only during the initial conversation limit negotiation between DB2 and a remote

    LU. This negotiation is called change-number-of-sessions (CNOS) processing.

    Rows in this table can be inserted, updated, and deleted.

    SYSIBM.LUNAMES tableThe SYSIBM.LUNAMES table must contain a row for each remote SNA client or

    server that communicates with DB2.Rows in this table can be inserted, updated, and deleted.

    SYSIBM.MODESELECT table

    The SYSIBM.MODESELECT table associates a mode name with any conversation

    created to support an outgoing SQL request. Each row represents one or more

    combinations of LUNAME, authorization ID, and application plan name.Rows in this table can be inserted, updated, and deleted.

    SYSIBM.SYSAUXRELS table

    The SYSIBM.SYSAUXRELS table contains one row for each auxiliary table created

    for a LOB column. A base table space that is partitioned must have one auxiliary

    table for each partition of each LOB column.

    SYSIBM.SYSCHECKDEP table

    The SYSIBM.SYSCHECKDEP table contains one row for each reference to a column

    in a check constraint.

    SYSIBM.SYSCHECKS table

    The SYSIBM.SYSCHECKS table contains one row for each check constraint.

    SYSIBM.SYSCHECKS2 table

    The SYSIBM.SYSCHECKS2 table contains one row for each check constraint for

    catalog tables created in or after Version 7. Check constraints for catalog tables

    created before Version 7 are not included in this table.

    SYSIBM.SYSCOLAUTH table

    The SYSIBM.SYSCOLAUTH table records the UPDATE or REFERENCES privilegesthat are held by users on individual columns of a table or view.

    SYSIBM.SYSCOLDIST table

    The SYSIBM.SYSCOLDIST table contains one or more rows for the first key

    column of an index key.Rows in this table can be inserted, updated, and deleted.

    SYSIBM.SYSCOLDISTSTATS table

    The SYSIBM.SYSCOLDISTSTATS table contains zero or more rows per partition for

    the first key column of a partitioning index or a data-partitioned secondary index.

    No row is inserted if the index is a non-partitioned index. Rows in this table can

    be inserted, updated, and deleted.

    SYSIBM.SYSCOLDIST_HIST table

    The SYSIBM.SYSCOLDIST_HIST table contains rows from SYSCOLDIST.Rows are added or changed in this table when RUNSTATS collects history

    statistics. Rows in this table can also be inserted, updated, and deleted.

    SYSIBM.SYSCOLSTATS table

    The SYSIBM.SYSCOLSTATS table contains partition statistics for selected columns.

    For each column, a row exists for each partition in the table.

    Rows are inserted when RUNSTATS collects either indexed column statistics or

  • 7/16/2019 Catalog Table v9

    26/30

  • 7/16/2019 Catalog Table v9

    27/30

    non-indexed column statistics for a partitioned table space. No row is inserted if

    the table space is nonpartitioned. Rows in this table can be inserted, updated, and

    deleted.

    SYSIBM.SYSCOLUMNS table

    The SYSIBM.SYSCOLUMNS table contains one row for every column of each table

    and view.

    SYSIBM.SYSCOLUMNS_HIST table

    The SYSIBM.SYSCOLUMNS_HIST table contains rows from SYSCOLUMNS.

    Rows are added or changed in this table when RUNSTATS collects history

    statistics. Rows in this table can also be inserted, updated, and deleted.

    SYSIBM.SYSCONSTDEP table

    The SYSIBM.SYSCONSTDEP table records dependencies on check constraints or

    user-defined defaults for a column.

    SYSIBM.SYSCONTEXT table

    The SYSIBM.SYSCONTEXT table contains one row for each trusted context.

    SYSIBM.SYSCONTEXTAUTHIDS table

    The SYSIBM.SYSCONTEXTAUTHIDS table contains one row for each authorization

    ID with which the trusted context can be used.

    SYSIBM.SYSCOPY table

    The SYSIBM.SYSCOPY table contains information needed for recovery.

    SYSIBM.SYSCTXTTRUSTATTRS table

    The SYSIBM.SYSCTXTTRUSTATTRS table contains one row for each list of

    attributes for a given trusted context.

    SYSIBM.SYSDATABASE table

    The SYSIBM.SYSDATABASE table contains one row for each database, except for

    database DSNDB01.

    SYSIBM.SYSDATATYPES table

    The SYSIBM.SYSDATATYPES table contains one row for each distinct type defined

    to the system.

    SYSIBM.SYSDBAUTH table

    The SYSIBM.SYSDBAUTH table records the privileges that are held by users over

    databases.

    SYSIBM.SYSDBRM table

    The SYSIBM.SYSDBRM table contains one row for each DBRM of each application

    plan.

    SYSIBM.SYSDEPENDENCIES table

    The SYSIBM.SYSDEPENDENCIES table records the dependencies between objects.

    SYSIBM.SYSDUMMY1 table

    The SYSIBM.SYSDUMMY1 table contains one row. The table is used for SQL

    statements in which a table reference is required, but the contents of the table are

    not important.

    Unlike the other catalog tables, which reside in Unicode table spaces,

  • 7/16/2019 Catalog Table v9

    28/30

    SYSIBM SYSDUMMY1 resides in table space SYSEBCDC which is an EBCDIC

  • 7/16/2019 Catalog Table v9

    29/30

    SYSIBM.SYSDUMMY1 resides in table space SYSEBCDC, which is an EBCDIC

    table space.

    SYSIBM.SYSENVIRONMENT table

    The SYSIBM.SYSENVIRONMENT table records the environment variables when anobject is created.

    SYSIBM.SYSFIELDS table

    The SYSIBM.SYSFIELDS table contains one row for every column that has a field

    procedure.

    SYSIBM.SYSFOREIGNKEYS table

    The SYSIBM.SYSFOREIGNKEYS table contains one row for every column of everyforeign key.

    SYSIBM.SYSINDEXES table

    The SYSIBM.SYSINDEXES table contains one row for every index.

    SYSIBM.SYSINDEXES_HIST table

    The SYSIBM.SYSINDEXES_HIST table contains rows from SYSINDEXES.

    Rows are added or changed in this table when RUNSTATS collects history

    statistics. Rows in this table can also be inserted, updated, and deleted.

    SYSIBM.SYSINDEXPART table

    The SYSIBM.SYSINDEXPART table contains one row for each nonpartitioned

    secondary index (NPSI) and one row for each partition of a partitioning index or a

    data-partitioned secondary index.

    SYSIBM.SYSINDEXPART_HIST table

    The SYSIBM.SYSINDEXPART_HIST table contains rows from SYSINDEXPART.

    Rows are added or changed in this table when RUNSTATS collects historystatistics. Rows in this table can also be inserted, updated, and deleted.

    SYSIBM.SYSINDEXSPACESTATS tableThe SYSIBM.SYSINDEXSPACESTATS table contains real time statistics for index

    spaces.

    Rows in this table can be inserted, updated, and deleted.

    SYSIBM.SYSINDEXSTATS tableThe SYSIBM.SYSINDEXSTATS table contains one row for each partition of a

    partitioning index or a data-partitioned secondary index.

    Rows in this table can be inserted, updated, and deleted.

    SYSIBM.SYSINDEXSTATS_HIST table

    The SYSIBM.SYSINDEXSTATS_HIST table contains rows from SYSINDEXSTATS.

    Rows are added or changed in this table when RUNSTATS collects history

    statistics. Rows in this table can also be inserted, updated, and deleted.

    SYSIBM.SYSJARCLASS_SOURCE tableThe SYSIBM.SYSJARCLASS_SOURCE table is an auxiliary table for

    SYSIBM.SYSJARCONTENTS.

    SYSIBM.SYSJARCONTENTS table

    The SYSIBM.SYSJARCONTENTS table contains Java class source for installed JAR.

  • 7/16/2019 Catalog Table v9

    30/30