Security Setup for SAP HANA Cloud SQL Analyzer Privileges TRACE ADMIN and INIFILE ADMIN
SQL Analyzer in SAP HANA Cloud requires system privileges TRACE ADMIN and INIFILE ADMIN for both HDI technical users and classic users. This article explains setup, workflow, and security limits.
On this page
The short answer
To analyze execution plans in SAP HANA Cloud using SQL Analyzer, the acting user whether the HDI container technical user named <container_schema_name>...RT or a classic database user must hold the system privileges TRACE ADMIN and INIFILE ADMIN. These are system level grants not object privileges and cannot be substituted by analytic privileges or modeling roles. Setup requires assigning both before generating plan files in SAP Business Application Studio with the SAP HANA Performance Tools extension installed in a stopped development space.
Why SQL Analyzer Requires Elevated System Privileges
The SQL Analyzer in SAP HANA Cloud provides execution timelines, per-step record counts, parallelism degree, and engine usage for any SQL query. This runtime evidence is not available through ordinary catalog views or object-level SELECT privileges. The retrieved lesson states that analyzing a plan file requires the two system privileges TRACE ADMIN and INIFILE ADMIN because the tool collects trace data and configuration parameters that sit behind system-gated infrastructure. This mental model explains why a developer with only schema access cannot generate a meaningful plan file.
Two User Types That Can Run SQL Analyzer
The same lesson identifies two valid actor patterns. The first is the technical user named <container_schema_name>...RT of an HDI container. The second is a classic database user. Both identities must hold the two system privileges to run the analyzer. The source does not describe how these users are created or imported.
TRACE ADMIN: Scope and Necessity
TRACE ADMIN is necessary because SQL Analyzer depends on runtime execution traces. These traces contain timings, record counts per step, and parallelism degree. Such data is produced by the trace subsystem rather than exposed through normal SQL catalog objects. The source requires this system privilege for the analyzing user but does not describe failure behavior when it is missing.
INIFILE ADMIN: Scope and Necessity
INIFILE ADMIN is required because the analyzer also reads server configuration parameters (INI files) that influence plan generation and engine selection. Capturing this configuration context makes the analysis reproducible. The source requires this system privilege for the analyzing user but does not describe the consequence of its absence.
Granting Privileges to the HDI Technical User
For an HDI container, the source identifies the technical user <container_schema_name>...RT as a valid actor for analyzing plans. The practical step is to grant TRACE ADMIN and INIFILE ADMIN to that technical user at the system level. The retrieved source confirms the requirement but does not provide the exact GRANT statement or cockpit path, so the DBA must use standard SAP HANA Cloud privilege assignment methods.
Granting Privileges to a Classic Database User
Alternatively, a named classic database user can be granted both privileges explicitly. This suits shared diagnostic workspaces or external Database Explorer workflows where no HDI container is in scope. As with the technical user, both system privileges are mandatory; analytic privileges or role-based model security do not substitute for them.
Workflow: From Privilege Setup to Plan File Generation
Worked example: A developer in SAP Business Application Studio analyzes a slow calculation view. The HDI container's technical user is MYAPP_12345_RT. Before generating a plan file, the DBA confirms this user holds TRACE ADMIN and INIFILE ADMIN. The developer opens SQL Console, pastes generated SQL, selects Analyze > Generate SQL Analyzer Plan File, saves it, and the .plv file opens in HANA SQL Analyzer view showing per-step timings. Prerequisites: SAP HANA Cloud access with HDI container or classic account, Studio dev space stopped while adding SAP HANA Performance Tools extension, understanding system vs object privileges. Expected result is a complete plan file with trace and INI context when both privileges are held.
The sequence requires the extension SAP HANA Performance Tools added when the space is stopped. Then connect with the privileged user, generate the plan via the Analyze menu or Database Explorer, and confirm the file opens in the SQL Analyzer view. This decision criterion separates container-bound analysis from cross-container diagnostics.
Security Trade-offs and Operational Limits
Granting TRACE ADMIN and INIFILE ADMIN broadly exposes internal configuration and trace data, increasing risk surface. Least-privilege scoping to dedicated diagnostic users is recommended. These privileges are not covered by analytic privileges or modeling roles. Common mistake is assuming SELECT on schema suffices. Decision criteria: use RT user for container-bound analysis, classic user for cross-container diagnostics.
Scope limits from sources: they confirm mandatory privileges but no GRANT syntax, no subset scoping to trace categories, no revocation audit. A separate lesson on plan variants mentions M_SQL_PLAN_VARIANTS and M_SQL_PLAN_VARIANT_STATISTICS views but does not state their privilege needs, confirming our scope stays on TRACE ADMIN and INIFILE ADMIN. Absolute error counts and false-positive rates are not applicable to this configuration task.
Things to check
- Verify the acting user is either the HDI RT technical user or a classic database user
- Confirm TRACE ADMIN system privilege is granted at system level
- Confirm INIFILE ADMIN system privilege is granted at system level
- Ensure SAP HANA Performance Tools extension is added to a stopped dev space
- Generate plan file via Analyze menu and confirm .plv opens in SQL Analyzer view
- Do not assume SELECT or analytic privileges are sufficient for trace access
- Scope grants to dedicated diagnostic users to limit risk exposure
- Note that exact GRANT syntax is not provided by the retrieved source
Where this applies
Sources confirm both privileges are mandatory but do not provide exact GRANT SQL syntax or SAP HANA Cloud cockpit assignment path. No guidance on subset scoping of trace categories or INI parameters. Privilege revocation timing and audit logging are not addressed. Plan variant monitoring views are mentioned in a separate source without stated privilege requirements, so they are out of scope for this task.