DB2 DISPLAY commands

When something is “wrong with DB2,” the first operator skill is not START or CANCEL. It is -DISPLAY. DISPLAY commands are read-only snapshots of databases, threads, memory pools, logs, distributed access, utilities, traces, and a growing set of optional components (accelerators, AI for z/OS, REST, OpenTelemetry). This page surveys every DISPLAY form in the current Command Reference family so you know which command answers which question.

Db2 commands
Progress0 of 0 lessons

How DISPLAY works

Issue DISPLAY with your subsystem prefix from SDSF, a z/OS console, the DB2I Commands panel, a DSN session, IMS, CICS, or IFI. Abbreviation is usually -DIS. Authorization is typically the DISPLAY privilege or SYSOPR / SYSCTRL / SYSADM / system DBADM. Output is a set of DSN* messages ending with DSN9022I NORMAL COMPLETION. By the time you read a THREAD or PROCEDURE display, the status may already have changed—treat it as a snapshot, not a lock.

Wildcards follow the same patterns as other space-name commands: prefix*, *suffix, *contains*, and ranges name1:name2 in Unicode collation order. Prefer a specific database name over (*) in production.

DISPLAY command catalog
CommandAbbrev.What it shows
-DISPLAY ACCEL-DIS ACCELAccelerator servers (IBM Db2 Analytics Accelerator): status, DETAIL stats
-DISPLAY ARCHIVE-DIS ARCInput archive log units, COUNT, DEALLOC time (member-local in data sharing)
-DISPLAY BLOCKERS-DIS BLLocks and claims active threads hold on named databases, tables, indexes, spaces
-DISPLAY BUFFERPOOL-DIS BPOOLActive/inactive pools: size, thresholds, hit ratios (DETAIL/LIST options)
-DISPLAY DATABASE-DIS DBDatabase and space status, USE, LOCKS, CLAIMERS, LPL, RESTRICT, ADVISORY
-DISPLAY DDF-DIS DDFDDF status, locations, ports, connection and thread statistics
-DISPLAY DYNQUERYCAPTURE-DIS DYNQUERYCAPTUREActive dynamic query capture monitors used with stabilization
-DISPLAY FUNCTION SPECIFIC-DIS FUNC SPECStatistics for external user-defined functions applications have accessed
-DISPLAY GROUP-DIS GROUPData sharing group: members, code/catalog/function levels, SCA/GBP health
-DISPLAY GROUPBUFFERPOOL-DIS GBPOOLCoupling-facility group buffer pools and related statistics
-DISPLAY LOCATION-DIS LOCInformation about specified remote locations (DDF partners)
-DISPLAY LOG-DIS LOGActive log % full, offload task, checkpoint frequency, restart RBA
-DISPLAY ML-DIS MLIBM Db2 AI for z/OS status and, with DETAIL, component daemons
-DISPLAY OTEL-DIS OTELOpenTelemetry span emission status (Db2 13 APAR PH67971); DETAIL counts
-DISPLAY PROCEDURE-DIS PROCStored procedures accessed: status STARTED/STOPQUE/STOPREJ, queued, WLM
-DISPLAY PROFILE-DIS PROFILEWhether monitoring/profile functions are active after START PROFILE
-DISPLAY RLIMIT-DIS RLIMITResource limit facility (governor) status and which RLST table is in use
-DISPLAY RESTSVC-DIS RESTSVCREST services defined in Db2 and whether they are started or stopped
-DISPLAY STATS-DIS STATSSelected process statistics (for example index traverse counts)
-DISPLAY THREAD-DIS THDAllied and distributed threads, tokens, LUWIDs, indoubt/postponed
-DISPLAY TRACE-DIS TRACEActive traces: number, type (PERFM, ACCTG, STAT, AUDIT, MONITOR), class, dest
-DISPLAY UTILITY-DIS UTILUtility jobs in the member or group: phase, UID, STOPPED vs ACTIVE

-DISPLAY DATABASE

This is the workhorse. It shows whether databases and table/index spaces are RW, RO, UT, STOP, STOPP, RESTP, or in restrictive/advisory states. Options change the story:

  • SPACENAM (SPACE, SP) — limit to named spaces; required for many USE/LOCKS/CLAIMERS reports
  • PART — partition list or ranges (1,2,4:6)
  • RESTRICT — only restricted objects (the -904 hunt)
  • ADVISORY (ADV) — advisory states such as AREO* / AREOR / ARBDP that recommend REORG but still allow RW
  • USE — who has the space open
  • LOCKS — lock holders
  • CLAIMERS — claimers (drain/claim model for utilities)
  • LPL — logical page list entries (pages that need recovery from GBP or disk errors)
  • WEPR — write-error page range
  • OVERVIEW — space names and types only (not combined with most other keywords)
  • LIMIT / AFTER — page the report (default LIMIT 50)
text
1
2
3
4
-DISPLAY DATABASE(PAYROLL) SPACENAM(*) LIMIT(*) -DISPLAY DATABASE(PAYROLL) SPACENAM(TSACCT) LOCKS -DISPLAY DATABASE(*) SPACENAM(*) RESTRICT LIMIT(*) -DISPLAY DATABASE(DSNDB01) SPACENAM(*) LPL

Status RW means applications can read and write. RO is read-only. UT is utility-only. STOP means -STOP DATABASE completed; SQL cannot use the space until -START DATABASE. STOPP means stop pending (a STOP is in progress, often waiting for drain). RESTP is restart pending. RECP means recovery pending—usually COPY, RECOVER, or REBUILD INDEX is required. CHKP is check pending after a referential or check-constraint violation (CHECK DATA). COPY is copy pending, often after a LOG NO utility; you cannot update until an image copy (or an allowed bypass) clears it. GRECP is group buffer pool recovery pending in data sharing. LPL pages need recovery from a coupling facility or I/O error. Advisory AREO* / AREOR recommend REORG but still allow RW. Learn the codes; do not START FORCE as a first reflex.

USE, LOCKS, and CLAIMERS answer three different “who is in my way?” questions. USE shows which threads have the object open. LOCKS shows IRLM locks (including lock state and duration). CLAIMERS shows the drain/claim holders that block a utility from draining the space. BLOCKERS is a related but separate command that starts from a database name and lists lock and claim holders across objects—handy when DROP DATABASE hangs and you do not yet know the space name.

-DISPLAY THREAD

Shows allied (TSO, CICS, IMS, batch, RRS) and distributed threads. TYPE filters include ACTIVE, INACTIVE, INDOUBT, POSTPONED, PROCEDURE, SYSTEM, and * . LOCATION(*) adds remote conversation detail. DETAIL adds package, statement, accounting, and XID information. The TOKEN is what -CANCEL THREAD wants. Status PT marks parallel child tasks under an originating thread. During shutdown only TYPE(SYSTEM) remains useful; SCOPE(GROUP) is forced local.

text
1
2
3
-DISPLAY THREAD(*) -DISPLAY THREAD(*) TYPE(INDOUBT) -DISPLAY THREAD(*) LOCATION(*) DETAIL

-DISPLAY BUFFERPOOL and GROUPBUFFERPOOL

BUFFERPOOL reports local pools (VPSIZE, thresholds, getpage and I/O counters with DETAIL). Inactive pools still appear so you can see definitions that will apply when the pool becomes active. GROUPBUFFERPOOL reports coupling-facility structures: size, connections, castout, and directory/data entries. GBP failures show up here and in DISPLAY GROUP; recovery may require START DATABASE after the structure is rebuilt.

-DISPLAY LOG and -DISPLAY ARCHIVE

DISPLAY LOG answers “how full are the active logs, is offload stuck, when was the last checkpoint, what was RESTART RBA.” Dual logging shows COPY1 and COPY2. If percentages differ, the data sets are different sizes and Db2 still switches both at end-of-file—wasting space. Encrypted logs can show KEY LABEL. GDPS Continuous Availability environments add CDDS mode (source versus proxy) in DSNJ375I.

DISPLAY ARCHIVE shows how many archive tape units Db2 may use and how long they stay allocated (the values -SET ARCHIVE changes). ARCHIVE LOG SCOPE(GROUP) does not make DISPLAY ARCHIVE group-wide; issue it on each member.

-DISPLAY DDF and -DISPLAY LOCATION

DISPLAY DDF shows whether DDF is STARTD or STOPD, the IP and port, alias ports, and counts of connections versus active database-access threads. DETAIL breaks down statistics. DISPLAY LOCATION focuses on a named remote location: conversation queues, threads accessing that partner. Use them together when distributed SQL hangs: DDF up, location jammed, then DISPLAY THREAD LOCATION(*).

-DISPLAY UTILITY, TRACE, PROCEDURE, FUNCTION

DISPLAY UTILITY(*) lists UID, utility name, phase, percent, and member. STOPPED means the job left SYSUTILX occupied. DISPLAY TRACE lists trace numbers, types (PERFM, ACCTG, STAT, AUDIT, MONITOR), classes, and destinations (GTF, SMF, SRV, OPX). Start traces with -START TRACE; modify IFCIDs with -MODIFY TRACE; stop with -STOP TRACE—DISPLAY only shows what is on.

DISPLAY PROCEDURE shows stored procedures that applications have accessed: STOPQUE versus STOPREJ versus STARTED, queued requests, failures, WLM environment. Qualify with schema. DISPLAY PROCEDURE *.* needs SYSOPR or higher. DISPLAY FUNCTION SPECIFIC is the same idea for external UDFs (not sourced or built-in functions).

Group, blockers, stats, profile, RLIMIT, REST

  • DISPLAY GROUP — member names, statuses (ACTIVE, QUIESCED), code level, catalog level, function level, SCA and lock structure health. First command after a data sharing incident.
  • DISPLAY BLOCKERS — which threads hold locks or claims on DSNDB06, DSNDB01, or a user database when DROP or STOP waits.
  • DISPLAY STATS — specialized counters such as index traverse counts for named indexes (DBNAME / SPACENAM / PART).
  • DISPLAY PROFILE — whether START PROFILE loaded SYSIBM.DSN_PROFILE* tables into memory (filtering, monitoring, attributes).
  • DISPLAY RLIMIT — governor on or off and which resource limit specification table (Authid.DSNRLSTxx) is active.
  • DISPLAY RESTSVC — REST services by collection, started or stopped (pairs with START/STOP RESTSVC).
  • DISPLAY DYNQUERYCAPTURE — monitors started by START DYNQUERYCAPTURE for stabilizing cached dynamic SQL.

Accelerator, ML, and OTEL

DISPLAY ACCEL lists accelerator servers and, with DETAIL, query and load statistics. ACCESS(MAINT) on START ACCEL shows up here as maintenance mode. DISPLAY ML reports IBM Db2 AI for z/OS: STOPPED versus STARTED, compatible versus current Db2ZAI level, and DETAIL daemon lines (MLZD, training, package automation). DISPLAY OTEL is the Db2 13 OpenTelemetry report (APAR PH67971): STATUS STARTED/STOPPED, EMIT YES/NO, successful versus failed SMF 1161 span records, and trace-parent sampling counts. Use DETAIL. Issue it on each member; there is no SCOPE(GROUP).

text
1
2
3
4
5
-DISPLAY ACCEL(*) DETAIL -DISPLAY ML DETAIL -DISPLAY OTEL DETAIL -DISPLAY UTILITY(*) -DISPLAY TRACE(*)

A practical order for incidents

  1. DISPLAY GROUP (if data sharing) — is this member active?
  2. DISPLAY LOG — are we about to hang on log-full?
  3. DISPLAY THREAD TYPE(ACTIVE) — who is running?
  4. DISPLAY DATABASE(...) RESTRICT — what is unavailable?
  5. DISPLAY UTILITY(*) — is a STOPPED REORG the cause?
  6. Then DDF, BUFFERPOOL, PROCEDURE, or ACCEL depending on the symptom.

DISPLAY never fixes the problem. It tells you whether the next command is START, STOP, CANCEL, TERM, RECOVER, or a utility restart.

Explain It Like I'm Five

DISPLAY is looking through the classroom window without opening the door. DISPLAY DATABASE is “are the lights on in each room?” DISPLAY THREAD is “who is sitting in which chair, and what is their ticket number?” DISPLAY LOG is “how full is the notebook?” DISPLAY UTILITY is “is the janitor still mopping?” You look first. You only use START, STOP, or CANCEL after you know which room has the problem.

Exercises

  1. On a sandbox, issue -DIS DB(DSNDB06) SPACENAM(*) LIMIT(20) and identify RW versus any restricted status.
  2. Issue -DIS THREAD(*) and write down one TOKEN. Do not cancel it; just match NAME and PLAN to a known connection.
  3. Compare -DIS LOG and -DIS ARCHIVE output and list three facts each command gives that the other does not.
  4. Issue -DIS UTIL(*) and explain what you would do if a COPY were STOPPED.
  5. If your shop has data sharing, capture -DIS GROUP and name the function level shown.

Quiz

Test Your Knowledge

1. What does -DISPLAY DATABASE(... ) RESTRICT show?

  • Only SMS class names
  • Objects in restricted states (STOP, RECP, CHKP, LPL, and similar) that block or limit SQL
  • Only GRANTs
  • Only DSNZPARM

2. Which DISPLAY command shows the token you need for -CANCEL THREAD?

  • -DISPLAY ARCHIVE
  • -DISPLAY THREAD (TOKEN column, often with TYPE and LOCATION options)
  • -DISPLAY ML only
  • -DISPLAY PROFILE only

3. DISPLAY ARCHIVE versus DISPLAY LOG — what is the difference?

  • They are identical
  • DISPLAY LOG shows active log fill percent, offload task, and checkpointing; DISPLAY ARCHIVE shows input archive log tape/unit information
  • DISPLAY LOG is only for CICS
  • DISPLAY ARCHIVE starts a utility

4. What privilege is typically required for most -DISPLAY commands?

  • Only PACKADM
  • DISPLAY privilege, or SYSOPR / SYSCTRL / SYSADM / system DBADM
  • Only INSERT on SYSIBM.SYSTABLES
  • No authorization ever

5. What is -DISPLAY OTEL?

  • A Db2 13 OpenTelemetry command that shows whether span emission is started and how many SMF 1161 records succeeded or failed
  • A BIND option
  • A storage group name
  • Only an IMS command