To monitor the status of an SAP HANA restoration, you watch recovery progress through the tenant database's state in M_SERVICES, the restoration entries in M_BACKUP_CATALOG, and—for larger recoveries—the M_RECOVERY_PROGRESS view, while the nameserver trace tracks the phases the system moves through. The key condition: you need access to the SYSTEMDB or the recovering tenant (or the nameserver trace file and landscapeHostConfiguration via OS-level tools) and enough free disk space in the data and log volumes to finish the job, since a restore that runs out of space stalls and then fails. This guide walks through the prerequisites, the exact queries and commands, what each status really means, and how to tell a stalled restore from a slow one.

Prerequisites and Permissions Before You Start

Monitoring HANA restoration is mostly a read activity, but it still requires the right access. Work through these before you touch anything:

1: Identify the recovery type. Is this a full data backup restore, a point-in-time recovery that includes log replay, a tenant restore, or a system database rebuild? Log replay after the data restore is the long, unpredictable part, and its progress is measured differently from the data copy phase. 2: Confirm connectivity. You need a SQL connection to the SYSTEMDB (port 313 by default for the system database, or the tenant's SQL port) or the ability to read trace files on the host. The hdbuserstore key for the adm user is the standard way to connect without retyping credentials. 3: Check the privileges. Database users need the MONITORING or CATALOG READ role to query M_BACKUP_CATALOG, M_SERVICES, and M_RECOVERY_PROGRESS. A dedicated monitoring user with these roles is safer than using SYSTEM. 4: Verify free space. Before and during recovery, confirm there's enough room in the data volume for the restored data files plus the log volume for the replayed logs. Running out of space is the most common cause of a restore that hangs at 90 percent and then fails. 5: Have the trace location ready. The nameserver trace lives under /usr/sap//HDB/trace/ on the host or in the diagnosis files collected by hdbdiag/HDB info. You'll need OS access to read it if SQL is not yet available during the restore.

With these in hand, the steps below are ordered from the earliest signal to the most detailed.

Step 1: Confirm the Recovery Is Actually Running

Before you interpret any progress, verify a recovery is in progress and not already finished. Run this against the SYSTEMDB:

Look at the ACTIVE_STATUS and DETAIL columns. During recovery the nameserver service typically shows a status that indicates startup or recovery in progress rather than YES for active. The DETAIL field carries short phase text. If the service is fully active and M_BACKUP_CATALOG shows a completed recovery entry with a recent timestamp, the restore is done—start monitoring for the next phase (log replay or tenant restart), not the copy.

Cross-check with the backup catalog:

A complete data backup entry that appears during recovery with state running and no end time is your earliest positive signal.

Step 2: Read the Recovery Progress Views

Once the recovery is underway, the most direct progress indicator for data restore and log replay is M_RECOVERY_PROGRESS (available in SYSTEMDB during recovery). Query it like this:

The key columns are PHASE, PROGRESS_PERCENT, PROGRESS_MESSAGE, and timestamps for the current phase. This view is populated while the recovery is active; if it's empty, the recovery may be in a phase that doesn't report there (such as an early startup stage) or may have already completed.

To see the stream of progress entries a monitor can poll every few seconds, use M_RECOVERY_PROGRESS alongside the catalog. You can also watch the number of replayed log records and the current log position versus the target position—during point-in-time recovery, the gap between the current replayed position and the target timestamp is the practical measure of remaining work.

Success check: PHASE advances (for example from data restore to log replay), PROGRESS_PERCENT rises, and UTC_END_TIME in the catalog eventually fills in. Failure check: PHASE stays identical across several polls while PROGRESS_PERCENT moves by less than a fraction of a percent per minute and free space in the data/log volume is shrinking toward zero. That combination points to a space-exhaustion stall, not normal slowness.

Step 3: Watch the Nameserver Trace for Phase Detail

SQL monitoring depends on the nameserver being up enough to answer queries. During the earliest recovery stages it may not be, so the nameserver trace is your ground truth. Locate it:

Typical messages include "recovery progress", "replaying log", "recovery finished", and explicit phase names. The trace is verbose, so tail the last few hundred lines rather than reading the whole file. The nameserver also records "recovery has finished" or an error indicating the exact failure—this is the fastest way to confirm success when SQL isn't yet reachable.

Practice tip: during a planned recovery, open a second terminal and run tail -f on the trace so you see phase transitions in real time. That's faster than repeated SQL polling and gives you context that query results alone won't.

Step 4: Track Log Replay and the Redo Log Position

Full data restore is a bounded copy; log replay is often the longer part, especially when recovering a point in time many hours back. To estimate remaining replay:

and monitor the replayed log position against the recovery target. For a point-in-time recovery, the target is the UTC timestamp you specified. The difference between the last replayed log position and the target log position (available in the recovery status output) tells you how much remains. If the view doesn't expose positions directly, the nameserver trace logs each replayed segment with its position and timestamp.

Expect log replay speed to vary: it's typically limited by I/O and CPU, and the first records after a data restore are often replayed faster than later ones as cache warms. A steady replay that slows gradually is normal. A replay that stops entirely for many minutes while the trace shows no new "replaying" entries is not.

Step 5: Estimate Duration and Set a Reasonable Check Interval

There's no single "correct" restore time, but you can build a rough estimate from the inputs:

Data restore time ≈ (size of data backup in GB) ÷ (sustained read throughput in GB per second). A 200 GB backup on a system sustaining 500 MB/s takes roughly 400 seconds for the copy—about seven minutes—plus overhead. Log replay time ≈ (volume of logs to replay) ÷ (replay throughput), which is often the dominant term.

Work through the arithmetic with your own measured throughput rather than assuming a number. For example, if you have 50 GB of log backups to replay and observe playback of 200 MB/s, that's about 250 seconds; if throughput is only 20 MB/s, it balloons to roughly 40 minutes. Recompute as you observe real progress—the observed rate is always more trustworthy than a planning estimate.

Poll every 30–60 seconds for a small tenant and every 2–5 minutes for large recoveries; polling tighter than that adds load without new information. Store the poll results (phase, percent, timestamp) so you can detect a trend rather than reacting to a single reading.

Step 6: Distinguish "Slow" From "Stalled" and Handle Failures

The hard part of monitoring is telling a healthy but slow restore from one that has silently stopped. Use these signals:

Healthy slow: PHASE advances eventually, PROGRESS_PERCENT rises, the trace shows new replayed segments, and data/log volume usage grows steadily. Stalled: identical progress across multiple polls, no new trace entries mentioning replay, and free space dropping toward zero without new data being written. Failed: catalog shows an error MESSAGE, the trace contains a recovery error, and M_SERVICES shows the nameserver back to a non-recovering state without the recovery entry completing.

If you suspect a stall, start with reversible checks: confirm disk space in the data and log volumes, confirm the trace is still being written to, and re-query M_RECOVERY_PROGRESS. If the trace shows a hard error—log corruption, missing backup file, insufficient space—the restore will not complete on its own. Note the error code from the trace and catalog, and escalate to your SAP Basis administrator or database support; don't attempt to delete the recovery state or restart the HANA system on your own, because a second recovery attempt before the first is properly assessed can compound the problem. The specific stop condition is: an error in the trace or catalog that names a cause you cannot resolve by freeing space or restoring a missing file.

To read recovery failures properly, open the backup.log and nameserver trace side by side and locate the first error line; later lines are usually consequences. That first line is what you escalate.

A Compact Status Reference

Here's how the common statuses map to interpretation for the main indicators:

Indicator Where to look Running state Success state Failure state
Service state M_SERVICES (nameserver) active status reflects startup/recovery service active, normal service down or error detail
Backup catalog M_BACKUP_CATALOG recovery entry running, no end time entry complete with end time error message present
Recovery phases M_RECOVERY_PROGRESS PHASE and percent advance empty or final phase complete phase stuck, error message
Phase detail nameserver trace new replay/restore lines appear "recovery finished" line recovery error line

No single row is sufficient—confirm with a second source before declaring success or failure.

Cross-Checks, Time Zones, and What Not to Assume

Times in M_BACKUP_CATALOG are UTC, so compare them against UTC logs rather than local clock times. If the restore started at 14:00 UTC and your local zone is UTC+2, the catalog will look two hours "behind"—that's not a fault. Convert deliberately.

Don't assume a high percentage means nearly done. During log replay, the last few percent can take disproportionate time because of checkpointing and the final switch to a consistent state. Conversely, a percentage that resets can mean a phase transition (data restore ended, replay began) rather than a restart—check the phase, not only the number.

Version matters too: the exact columns and availability of M_RECOVERY_PROGRESS differ across HANA revisions, so check the documentation matching your revision rather than relying on a view's behavior from another system. When a view is missing or empty, fall back to the catalog and trace as described above.

Monitoring Tenant Restores and the SYSTEMDB

Tenant database recovery is generally observed by querying the recovering tenant itself once it's reachable, while the SYSTEMDB shows the tenant's service state in M_SERVICES. For a system database rebuild, you don't have the SYSTEMDB available yet, so the nameserver trace and OS-level checks (free space, running processes) are your only live indicators until startup completes. Confirm the tenant ID being restored against the M_DATABASES view on the SYSTEMDB after completion—if the tenant is restored but still shows inactive or unknown in M_DATABASES, verify its state and restart the tenant through the appropriate DBA Cockpit or SQL procedure only if you're authorized to do so.

Practical Monitoring Habits That Pay Off

The most common operational mistake is starting the monitoring only after a problem is suspected. Set up a small polling loop (a SQL query every minute writing phase, percent, and timestamp to a file) so you have a baseline to compare against. Record the backup volume and log volume sizes before recovery; when a restore takes longer than expected, the difference between restored size and expected size tells you quickly whether the copy is the slow part or whether replay is. Keep the trace tailed in a second terminal, and note the first recovery error you see if a failure occurs—that's the line to hand to support, not the hundreds that follow.

Finally, don't confuse the restore with the system startup that follows it. After the catalog entry completes and the nameserver reports recovery finished, HANA still starts its services and, for tenant restores, activates the tenant. Monitoring a restore means confirming both the recovery phase and the post-recovery startup, because a recovery that "succeeded" but left the tenant inactive is not a completed restoration operationally.