PART III - DB2 CATALOG AND DIRECTORY - IBM Mainframe

DB2 has a set of tables that function as a repository for all DB2 objects. These tables define the infrastructure of DB2, enabling simple detection of and access to DB2 objects. Two sets of tables store all the information related to DB2 objects: the DB2 Catalog and DB2 Directory.

DB2 Catalog—Tablespaces, Tables and Indexes

DB2 Catalog—Tablespaces, Tables and Indexes

The entire DBMS relies on the DB2 catalog. The DB2 catalog is composed of 11 tablespaces and 43 tables all in a single database DSNDB06. Each DB2 catalog table maintains data about an aspect of the DB2 environment. In that respect, DB2 catalog functions as a data dictionary for DB2 , supporting and maintaining data about the DB2 environment. The DB2 catalog records all information required by DB2 about STOGROUPS, databases, tablesppaces, partitions, tables, columns, views, synonyms, aliases, indexes, index keys, foreign keys, relationships, plans, packages, DBRMs, database privileges, plan privileges, system privileges, table privileges, view privileges, use privileges, image copy datasets, REORG executions, LOAD executions, object organization efficiency information, links and relationships between DB2 catalog tables and other control information.

The DB2 catalog is built, maintained and used as a result of the creation of objects defined to the catalog. In other words as the user creates or modifies the DB2 objects, metadata (data about data) is being accumulated in the catalog. When a DB2 SQL statement is issued, the DB2 catalog is accessed or updated. All the information in the DB2 catalog is not however up-to-date. The DB2 catalog can be updated using the RUNSTATS utility.

DB2 Catalog—Plans and Packages

DB2 Catalog—Plans and Packages

DB2 Catalog-Views, Stogroups and Database

DB2 Catalog-Views, Stogroups and Database

Catalog Structure

The DB2 catalog is structured as DB2 tables, but they are not standard tables. Many of the DB2 catalog tables are toed together hierarchically using a special relationship called 'link'. The DB2 catalog table SYSIBM.SYSLINKS stores the information defining the relationships between other catalog tables.

DB2 Directory

DB2 uses a second data dictionary, other than the catalog, called DB2 Directory for storing detailed, technical information about the aspects of DB2's operation. The DB2 Directory is for DB2's internal use only. The data in the DB2 directory cannot be accessed by the SQL statements. The following figure gives the inter­relationships of the various DB2 components.

DB2 Directory Components

DB2 Directory Components


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics