SAP HANA Administration
SAP HANA Trace Files: Locations, Activation, and Troubleshooting Workflow
Learn where SAP HANA trace files are stored, how to enable tracing safely, how to collect diagnosis files, and how to interpret traces without creating unnecessary system overhead.
On this page
- SAP HANA trace files: a practical troubleshooting guide
- How SAP HANA tracing works
- SAP HANA trace file location
- Finding the affected service and trace
- Enabling SAP HANA trace safely
- Collecting HANA diagnosis files
- Reading SAP HANA trace content
- Troubleshooting workflow for trace files
- Common SAP HANA trace mistakes
- Operational checklist for SAP HANA administrators
- Key takeaways
- Frequently asked questions
SAP HANA trace files: a practical troubleshooting guide
SAP HANA trace files record diagnostic information produced by database services, hosts, and selected components. Administrators use them to investigate errors, performance symptoms, crashes, failed operations, and unusual service behavior. The files are valuable because they preserve technical context that may not be visible in an alert or application message.
The safest approach is to treat tracing as a controlled diagnostic activity. First identify the symptom and affected service, then check existing traces, enable only the needed trace component, reproduce or observe the issue, and finally disable temporary tracing and package the relevant evidence. This keeps the investigation focused and limits unnecessary overhead.
How SAP HANA tracing works
SAP HANA services write diagnostic output on the host where each service runs. A system may therefore contain traces for the index server, nameserver, XS-related components, preprocessor, compile server, or other installed services. The exact files depend on the system revision, deployment model, service configuration, and event being investigated.
Trace levels and trace components control how much information a service records. Normal operation already produces important diagnostic output. A higher trace level can expose additional detail, but it can also increase file volume, disk consumption, and processing overhead. Temporary tracing should therefore have a clear start condition, stop condition, and owner.
The main distinction is between routine diagnostic output and targeted tracing. Routine output is useful for reviewing what happened around an error. Targeted tracing is a deliberate change used when the existing information is insufficient.
SAP HANA trace file location
The physical location depends on whether HANA is installed on a single host, multiple hosts, or a managed cloud platform. In a standard on-premise installation, service traces are commonly found below the HANA shared directory in a path that includes the system identifier, host name, and trace directory. A typical pattern is:
/usr/sap/<SID>/HDB<instance>/<host>/trace
Treat this as a path pattern rather than a universal literal. The instance number, host name, installation layout, operating system, and deployment type can change the final location. The database administration tools and system configuration provide the authoritative location for a particular environment.
For a distributed system, inspect the host running the affected service. Looking only on the first or primary host can produce a false conclusion that no trace exists. Also distinguish database service traces from client-side, web dispatcher, operating system, and application-server logs, which may be stored elsewhere.
Never expose trace directories directly through an unsecured web server or copy them to an uncontrolled location. Traces can contain SQL text, object names, user identifiers, host information, and other sensitive operational data.
Finding the affected service and trace
Start with the error timestamp, time zone, tenant or database name, host, connection type, and user or application context. Compare those details with database alerts, service status, index server messages, and operating system events. The objective is to narrow the search before opening large files.
A useful investigation sequence is:
- Record the exact failure time and the business operation that failed.
- Identify the database, host, and service involved.
- Check the trace entries immediately before and after the event.
- Search for error identifiers, exception names, connection identifiers, or distinctive text.
- Compare the event with alerts, backups, savepoints, failovers, deployments, and configuration changes.
- Preserve the relevant time window before rotating, compressing, or deleting anything.
Use the HANA cockpit, database administration tools, operating system tools, or approved support-collection procedures according to the environment. Avoid changing files manually while a service is writing to them. Manual edits can destroy chronology and make later analysis harder.
Enabling SAP HANA trace safely
Enable tracing only after confirming that the default diagnostic output does not answer the question. The exact activation method varies by HANA revision and component. In general, an administrator selects the relevant service and trace component, applies a documented trace level, reproduces the issue if possible, and then returns the setting to its prior state.
Before enabling a trace, define four items:
- Scope: the service, host, tenant, user, statement, or operation being investigated.
- Level: the lowest diagnostic level likely to answer the question.
- Duration: the shortest observation window that can capture the symptom.
- Evidence plan: the files, timestamps, identifiers, and configuration context to collect.
Do not enable broad, high-volume tracing across every service as a first response. That can create large files, obscure the original signal, consume disk space, and affect production performance. If the symptom is intermittent, coordinate a controlled reproduction with the application owner and operations team.
After collecting evidence, disable temporary tracing and verify that the effective configuration has returned to the intended state. Record who changed it, when it was changed, why it was changed, and what was collected.
Collecting HANA diagnosis files
Diagnosis files are most useful when they preserve context rather than a single isolated line. A support package may include traces, alerts, service status, topology, configuration information, operating system data, and a precise incident timeline. Collect only what is permitted by security and privacy policies.
A practical collection checklist includes:
- The system identifier, database name, HANA revision, and deployment type.
- Affected host names and service names.
- The incident start and end time, including time zone.
- Relevant trace files and rotated files for the same period.
- Alert details and service status.
- Recent configuration, deployment, restart, backup, or failover changes.
- Reproduction steps and the expected versus observed result.
- Any correlation identifier, connection identifier, statement hash, or error code.
Compress copies rather than modifying the originals. Use access-controlled storage and redact secrets or sensitive payloads according to policy. Keep a chain of custody when files are being sent to an external support organization.
Reading SAP HANA trace content
Read a trace chronologically and correlate entries across services. A single message may be a consequence rather than the root cause. For example, a request timeout can appear after a lock, resource shortage, network interruption, or service restart. The earliest meaningful warning in the sequence is often more informative than the final failure message.
Look for repeated patterns, not just one alarming line. Useful signals include recurring exception names, increasing latency, failed retries, resource exhaustion, connection termination, unavailable services, blocked operations, and messages that begin immediately after a configuration or topology change.
When comparing events, normalize timestamps and account for clock differences between hosts. Match the trace with database alerts and application logs using a common identifier whenever possible. Avoid drawing conclusions from severity labels alone; review the message context, frequency, duration, and affected scope.
Troubleshooting workflow for trace files
Use this decision process to keep the investigation proportional to the incident:
- Is there a recent failure or performance symptom: Start with existing traces and alerts for the matching time window.
- Is the affected service known: Inspect the service-specific trace on the host where it runs.
- Is the existing detail sufficient: Correlate it with alerts, application logs, and operating system events.
- Is more evidence required: Enable a narrowly scoped trace with a defined duration.
- Was the event reproduced or captured: Collect the relevant files and surrounding context.
- Is the evidence complete: Disable temporary tracing, secure the package, and document findings.
This workflow prevents a common mistake: increasing diagnostic verbosity before identifying what question the investigation needs to answer. Trace configuration is a diagnostic instrument, not a substitute for incident scoping.
Common SAP HANA trace mistakes
Searching the wrong host
In a distributed HANA system, the service handling the request may run on a different host from the one used for administration. Confirm service placement before searching the file system.
Using an incorrect time window
A trace may use a different time zone or contain entries from a rotated file. Record the time zone and inspect adjacent files when the event crosses a rotation boundary.
Leaving verbose tracing enabled
Temporary tracing that remains active can increase storage use and operational risk. Add a disable step to the incident checklist and verify the effective state after the investigation.
Collecting too little context
A single error line rarely explains a distributed failure. Include the preceding and following entries, related services, alerts, configuration changes, and reproduction details.
Sharing unredacted files
Trace files may expose business data or technical secrets. Review and protect them before transfer, and follow the organization’s approved support process.
Operational checklist for SAP HANA administrators
Before investigation, confirm the incident scope, permissions, change window, and available disk space. During investigation, preserve timestamps, avoid broad trace activation, and record every diagnostic change. After investigation, disable temporary tracing, verify the final state, secure the evidence, and document the conclusion.
For recurring incidents, turn the investigation into a runbook. Include the affected service, standard evidence sources, trace activation boundaries, escalation conditions, retention requirements, and rollback steps. This makes future troubleshooting faster and reduces the temptation to use uncontrolled diagnostic settings.
SAP HANA administrators should connect trace handling with broader administration responsibilities: monitoring, service management, security, backup and recovery, and disciplined change control. Trace files are one evidence source within that larger operational model.
Key takeaways
- Trace locations depend on deployment and service placement
- Start with existing diagnostic output before enabling extra tracing
- Use the narrowest trace scope and shortest duration that can answer the question
- Correlate traces with alerts, application logs, and host events
- Disable temporary tracing and protect diagnosis files after collection
Frequently asked questions
In practice: What are SAP HANA trace files used for?
They provide diagnostic information for investigating service errors, crashes, failed operations, performance symptoms, and other unusual behavior. Their value increases when entries are correlated with timestamps, alerts, and application events.
In practice: Where are HANA trace files stored?
In many on-premise installations, service traces are stored below the HANA shared directory in a system, instance, host, and trace path. The exact location varies, so confirm it with the environment’s administration tools and deployment documentation.
In practice: How do I enable an SAP HANA trace?
Identify the affected service and trace component, select the lowest useful diagnostic level, define a short observation window, and use the supported administration method for the HANA revision. Disable the temporary setting after collecting the required evidence.
In practice: What are HANA diagnosis files?
They are a broader evidence set that can include traces, alerts, service status, topology, configuration details, operating system information, and an incident timeline. A complete package is usually more useful than one isolated trace file.
In practice: Can trace files contain sensitive information?
Yes. They can contain SQL text, object names, identifiers, host details, or other operational information. Apply access controls, follow retention rules, and redact or protect files before sharing them.
In practice: Should verbose tracing be enabled in production?
Only when the diagnostic need is justified and the change is controlled. Use the narrowest scope and shortest duration possible, monitor storage and performance, and document the activation and rollback steps.