Saturday, 24 August 2013

Db2 Directory Guide: SPT01, SCT02, DBD01, SYSLGRNX, and SYSUTILX


Db2 directory guide showing SPT01 SCT02 DBD01 SYSLGRNX and SYSUTILX internal control data
Db2 manages the directory internally.

A Db2 package can be present in the catalog and still fail at execution time if the internal execution structures are damaged, unavailable, or out of sync. When recovery, bind, or utility processing is involved, Db2 uses directory objects that normal application SQL does not query.

The Db2 directory stores internal control information used by Db2 for operation, package and plan execution, database descriptors, log range tracking, and utility restart. Unlike the catalog, the directory is not a normal SQL reporting source. Db2 and supported utilities maintain it.

What the Db2 directory does

The directory supports Db2 execution and recovery work that must be fast and controlled. It stores internal forms of packages and plans, database descriptors, log ranges used for recovery, and utility status needed for restart. Developers usually learn about it when a bind, run, utility, or recovery problem points below normal catalog metadata.

Directory versus catalog

AreaPurposeNormal access
Db2 catalogStores queryable metadata about objects, privileges, packages, plans, routines, and statistics.Read with SQL when authorized.
Db2 directoryStores internal control data used by Db2 for execution, recovery, utility restart, and package or plan processing.Managed by Db2 and supported utilities, not normal application SQL.

Important Db2 directory objects

Directory objectWhat it supportsWhy it matters
SPT01Skeleton package table, often called SKPT.Contains internal package information and access-path data created by BIND PACKAGE and removed by FREE PACKAGE.
SCT02Skeleton cursor table, often called SKCT.Contains internal plan information and access-path data created by BIND PLAN and removed by FREE PLAN.
DBD01Database descriptors.Stores internal database descriptor information for table spaces, indexes, tables, constraints, and related structures.
SYSLGRNXLog range tracking.Helps Db2 locate log ranges needed for recovery of updated table spaces or partitions.
SYSUTILXUtility execution and restart state.Stores utility status so Db2 can restart, recover, or terminate utility work correctly.

How directory objects show up in support work

Package or plan execution

When a static SQL program runs, Db2 uses package or plan structures created at bind time. Catalog rows help you identify the package, collection, and validity, but execution also depends on internal structures in the directory. If a bind or free operation fails, support teams often check both catalog state and Db2 messages tied to directory processing.

Recovery and log ranges

SYSLGRNX helps Db2 find the log ranges needed for recovery. If an object has been updated, Db2 can use recorded ranges instead of searching all log data blindly. This matters during RECOVER, restart, and problem diagnosis after an outage.

Utility restart

SYSUTILX is involved when utilities such as REORG, LOAD, COPY, or RECOVER need restart or cleanup handling. If a utility stops, do not delete anything by hand. Use supported commands such as -DISPLAY UTILITY, restart procedures, or -TERM UTILITY only when site rules allow it.

-DISPLAY UTILITY(*)
-TERM UTILITY(utility-id)

Safe handling rules

  • Do not update or delete Db2 directory data manually.
  • Use supported Db2 commands, bind actions, utilities, and recovery procedures.
  • Check the catalog first when the question is about object names, package names, privileges, or statistics.
  • Check Db2 messages, utility output, and recovery documentation when the problem points to directory-managed state.
  • Escalate directory damage, utility restart confusion, or recovery inconsistencies to the DBA or systems programmer team.

Common mistakes

Treating the directory like catalog tables

The catalog is meant to be queried for metadata. The directory is internal. Treating both as ordinary application data is a support risk.

Terminating utilities without restart context

A utility entry can represent recoverable work. Capture the utility ID, phase, object name, and messages before taking action.

Looking only at package catalog rows

Package catalog rows help identify the package, but a runtime issue may also involve bind output, plan references, load libraries, directory-managed structures, or subsystem messages.

Related Db2 topics

Use this guide with Db2 Catalog, Db2 Packages, Db2 Utilities, Db2 Commands Quick Reference, and Db2 Binding and Rebinding.

FAQ

What is the Db2 directory?

The Db2 directory stores internal control information used by Db2 for package and plan execution, database descriptors, log range tracking, utility restart, and recovery processing.

Can I query the Db2 directory with SQL?

No for normal application or support work. The catalog is the SQL-queryable metadata source. The directory is maintained by Db2 and supported utilities.

What is SYSUTILX used for?

SYSUTILX stores Db2 utility execution and restart information. It helps Db2 restart or clean up utility work after interruption.

No comments:

Post a Comment

New In-feed ads