SAP transaction codeObjectDB02ModuleBASIS

DB02 — Database Performance and Space Monitor

DB02 (or DB02N/DBACOCKPIT) is the transaction that shows database size, growth history, tablespace or datafile free space, table and index sizes, and missing indexes or stale statistics. It is a read-only monitor built on the underlying database's own catalog views, so what it displays and how it is organized depends entirely on which database platform sits under the SAP system.

This page covers DB02 as the standard database administration and space monitor used to investigate table growth, missing indexes, and statistics problems before they surface as performance tickets. It focuses on the diagnostic traps that come from the fact that DB02 is a thin wrapper over whatever database is underneath, so the same screen means different things on Oracle, DB2, and HANA.

Reviewed by an ERPClimb SAP consultant on 15 Sept 2026· 1,152 words

Purpose

DB02 gives an administrative view of the database itself rather than of application data: overall size and growth trend, tablespace or datafile utilization, table and index sizes, missing indexes, and whether cost-based optimizer statistics are current. The one fact that explains most confusion is that DB02 has no data model of its own. It queries the native database catalog and statistics views, so a table that looks fine in DB02 on Oracle may look completely different once the same system is migrated to HANA, because HANA has no tablespaces in the classical disk sense and measures memory consumption by column store and delta storage instead. Consultants moving between systems on different platforms frequently misread DB02 output because they apply the wrong platform's mental model to it.

When it is used

Reached for whenever a performance ticket traces back to a specific table or index rather than to workload or buffer settings, when planning an archiving run and needing before-and-after table sizes, when a tablespace fills up and datafiles need extending, or when EarlyWatch or a routine health check flags missing indexes or outdated statistics. It sits downstream of ST04 (database workload) and ST03 (workload by transaction): those point at a slow statement, DB02 confirms whether the underlying object has an index problem or stale statistics. It is not the tool for live session monitoring or lock waits, and it does not replace DB13 for scheduling the statistics and backup jobs that keep its own numbers accurate.

How to use it in practice

  • Call DB02 (or DB02N / DBACOCKPIT on newer releases) and confirm the correct database instance or tenant is selected before reading anything
  • Check the overview screen for total size, free space percentage, and growth trend over the recent period
  • Open the Space overview for tables and indexes, sort by size to identify the largest or fastest growing objects
  • Check the missing indexes and missing/outdated statistics tabs for flagged objects
  • Drill into the specific table for detailed size, row count estimate, and date statistics were last collected
  • Cross check the growth history graph for gaps, which usually mean a monitoring job did not run rather than the object shrinking

Key data objects

  • Native database catalog views (DBA_TABLES on Oracle, SYSCAT on DB2, M_TABLES/M_CS_TABLES on HANA) - the live source of size, row count and column store figures DB02 displays, not stored in any SAP application table
  • DD02L - SAP table catalog holding technical settings such as buffering mode and size category, useful for cross checking whether a table's SAP-level definition matches what DB02 reports physically
  • DBSTATC - controls which tables are included in the automatic statistics collection job and with what method, worth checking when a table shows as missing or stale statistics repeatedly

How to prove it in the data

Because DB02 reads live catalog views rather than a persisted SAP table, there is no single SE16 screen that reproduces its output. Instead check DBSTATC filtered on the table name to see whether automatic statistics collection is switched off for that object, and check DD02L for the table's buffering and size category to rule out a configuration mismatch masquerading as a database problem. Confirm the statistics or space collection job actually ran recently through the DB13 job calendar before trusting any growth trend gap in DB02 as real data loss.

ECC vs S/4HANA

On S/4HANA the underlying database is HANA, and DB02 functionality is generally accessed through DB02N or DBACOCKPIT, which add HANA-specific views such as column store memory consumption and delta merge status alongside the classical size and statistics screens. The core diagnostic logic is unchanged: still checking size, growth, missing indexes, and statistics currency, just against a different catalog. A browser-based database administration cockpit also exists for HANA monitoring outside the SAP GUI transaction, though its exact naming should be confirmed in the target landscape rather than assumed.

Common pitfalls and how to diagnose them

  • Stale statistics read as a missing index: a table appears in the missing index list because the optimizer keeps choosing a full scan due to skewed or outdated statistics, not because an index is truly absent. Check statistics collection date before creating a new index.
  • Growth history gaps mistaken for shrinkage: if the scheduled statistics or space collection job failed or was descheduled, the growth trend graph shows a drop that looks like data was deleted. Verify the job log in DB13 before raising an alarm.
  • Wrong database or tenant selected: in multi-instance or multitenant HANA landscapes, numbers can look alarmingly wrong simply because the wrong tenant or instance was selected on entry to DB02. Reconfirm the connection before interpreting any figure.
  • Reflex index creation: adding an index to fix a 'missing index' flag without checking whether an equivalent index already exists under a different name, or whether the statement pattern justifies it, adds maintenance overhead without fixing the query.
  • Estimated versus actual row counts: on delete-heavy tables the optimizer's stored row count estimate can diverge sharply from the physical row count. The fix is a statistics refresh or reorganization, not an index rebuild, and DB02 alone cannot tell which is needed without checking the statistics date.
  • Applying disk-based thinking to HANA: tablespace fragmentation and datafile extension concepts from Oracle or DB2 do not map onto HANA's column store and delta merge behavior. Reading HANA figures through an ECC lens produces wrong conclusions about free space and growth.

Whose problem this is

Owned by Basis or the DBA team. Functional consultants should not act on DB02 findings directly. A good handover to Basis includes the table or index name, the specific tab or figure in DB02 that triggered concern, the timestamp of the observation, and whether a workload symptom (slow transaction, timeout) is linked to it. ABAP involvement is limited to cases where custom table growth points to a design or archiving object gap.

Related SAP objects

Reviewed pages this object connects to in the ERPClimb knowledge graph.

Source: ERPClimb — https://erpclimb.com/sap-tcodes/db02ERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.