ST04 — ST04 Database Performance Monitor
ST04 is the database performance monitor, showing CPU, memory, disk, wait events and expensive SQL statements for the connected database. On classic databases (Oracle, DB2) the screens are generated by database-specific function modules; on HANA it becomes a HANA-specific monitor overlapping heavily with DBA Cockpit, which is why the transaction looks completely different depending on the underlying database.
This page covers ST04, the database-layer performance monitor used to diagnose slow response times, CPU or memory saturation, and expensive SQL at the database itself rather than at the application server. It walks through the real navigation sequence, the diagnostic categories that actually cause confusion in practice, and how ST04 relates to DBA Cockpit and workload analysis on S/4HANA.
Reviewed by an ERPClimb SAP consultant on 15 Sept 2026· 1,179 words
Purpose
ST04 is the database performance monitor. It shows the health of the database instance itself: CPU, memory and disk utilization, buffer or cache quality, active sessions or services, wait events, and the most expensive SQL statements running or recently run. The one structural fact that explains most of the confusion around it is that the screen content is entirely database-dependent. The transaction code is the same on every system, but the function modules behind it differ by database platform, so an Oracle-trained consultant opening ST04 on a HANA system finds a different layout, different tabs, and different terminology (services and hosts instead of tablespaces and datafiles). It is a monitor, not a configuration or maintenance transaction; nothing about the database is changed by using it.
When it is used
ST04 is reached when a performance complaint has already been narrowed to the database layer, or when that narrowing has not happened yet and needs to. Typical triggers: a batch job or report that used to finish in minutes now takes hours, a spike in database CPU or memory alerts, a go-live health check, or a blocking/lock situation reported by users. It sits below ST03 (workload analysis, which shows time split by transaction and by component such as database time, CPU time, wait time at the ABAP layer) and above OS-level tools. A consultant checks ST03 first to confirm the bottleneck is database time, then moves to ST04 to find which statement or resource is responsible, rather than starting in ST04 for every slow transaction complaint.
How to use it in practice
- Call ST04 and let the initial overview screen load; note CPU, memory, disk and any highlighted alerts.
- Open the load or performance history tab and set the time window to match the reported incident, not just 'now'.
- Drill into the expensive statements or SQL cache view, sort by cumulative or elapsed time, and identify the top offender.
- Note the statement identifier or hash and the affected table or schema before leaving the screen, since it is not always easy to reproduce the same ranking later.
- Cross-check memory tab if an out-of-memory condition is suspected, or disk usage tab if a space alert triggered the investigation.
- If deeper space, table growth or backup analysis is needed, hand off to DB02 or the full DBA Cockpit rather than trying to do it inside ST04.
Key data objects
- No customizing or master data table is written by ST04 itself; it is a read-only monitor.
- HANA system view for expensive statements - holds captured SQL text, duration, host and connection for statements that exceeded the trace threshold, used to identify the worst-performing query in a time window.
- HANA system view for service level statistics - holds CPU, memory and thread counts per index server or name server process, used to identify which service is saturated.
- Local ABAP statistics tables underlying ST03 - not written by ST04, but consulted alongside it to correlate database time with total response time for the same period.
How to prove it in the data
From the DBA Cockpit SQL editor reachable through ST04, run a query against the expensive statements view filtering on the start time window of the incident and sorting descending by duration; this returns the statement text, execution count and elapsed time that ST04's screen summarizes visually. Join that result to the service statistics view on host and port to see whether one service (usually the index server) was CPU- or memory-bound at the same timestamps. If the numbers in ST04 and DB02n disagree, compare the refresh timestamp shown on each screen rather than assuming either one is wrong.
ECC vs S/4HANA
On S/4HANA, ST04 becomes a HANA-oriented monitor and its content overlaps substantially with what DBA Cockpit shows, since both read from the same HANA statistics infrastructure. The transaction itself remains usable as a GUI entry point for quick checks. For deeper administration, HANA-specific tools with broader drilldown (memory tracing, thread samples, workload class analysis) go beyond what ST04's screens expose, so Basis teams increasingly use DBA Cockpit or HANA-side tooling for anything past a first-pass check.
Common pitfalls and how to diagnose them
- Stale screen data: ST04's overview is a snapshot taken at the last refresh, not a live feed. A consultant staring at a green screen during an ongoing spike is often looking at data from several minutes earlier; refresh explicitly and compare the timestamp before concluding the database is fine.
- Wrong layer entirely: checking ST04 for a slow single transaction when the delay is in the ABAP layer (lock wait, enqueue, or a slow custom loop) wastes time. Confirm in ST03 that database time is actually the dominant component before drilling into ST04.
- Platform layout shock: a consultant experienced with Oracle ST04 opening a HANA system expects tablespace and buffer-hit-ratio screens and instead finds host, service and memory tabs. This is not a bug, it is the expected HANA-specific layout; treat it as a different transaction with the same name.
- Mismatch against DBA Cockpit: numbers in ST04 and in DB02n/DBA Cockpit can differ because they poll the statistics server at different intervals or show different aggregation windows. Restarting the statistics collection service as a reflex fix is unnecessary and can itself cause a short monitoring gap.
- Authorization gaps: users without full DBA Cockpit authorization see blank or greyed-out tabs (particularly SQL trace and expensive statements) and mistake this for a system defect rather than a missing role.
- Missing history: if the embedded statistics server was down, restarted, or its retention period has elapsed, trend charts show empty ranges for that period. An empty chart is evidence of a monitoring gap, not evidence that performance was normal.
Whose problem this is
Database performance is a Basis or dedicated DBA problem, not functional and not ABAP development, except when the root cause traces to a specific poorly written statement, in which case ownership shifts to the ABAP developer of that program. A good handover includes the statement identifier, the affected table, the exact time window, and whether the ST03 workload breakdown confirms database time as the dominant component.
Related SAP objects
Reviewed pages this object connects to in the ERPClimb knowledge graph.
Source: ERPClimb — https://erpclimb.com/sap-tcodes/st04ERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.