SAP HANA

Connect a SAP HANA database to Solid using a dedicated read-only database user.

Overview

Solid connects to SAP HANA via the SQL interface using a dedicated read-only database user. Solid reads schema metadata, table structure, and query history to build and maintain semantic models. It does not write to your HANA database.

Before you start, you will need:

  • A SAP HANA instance reachable from Solid's static IPs on the HANA SQL port (default 39015 for tenant databases, 30015 for system database)
  • Permission to create a database user in HANA
  • Your HANA host, port, and database name

Step 1: Create a read-only database user

Connect to your SAP HANA system as an admin user and run:

-- Create the user
CREATE USER solid_svc PASSWORD "<choose-a-strong-password>" NO FORCE_FIRST_PASSWORD_CHANGE;

-- Grant schema access (repeat for each schema Solid should read)
GRANT SELECT ON SCHEMA "<your_schema>" TO solid_svc;

-- Grant access to monitoring views (required for query history)
GRANT MONITORING ON DATABASE TO solid_svc;
GRANT SELECT ON SYS.M_SQL_PLAN_CACHE TO solid_svc;

Replace <your_schema> with each schema you want Solid to monitor. The solid_svc user needs SELECT on every schema it should analyze — no write permissions are required.


Step 2: Allow Solid's IPs through your network

SAP HANA defaults to blocking external connections at the network level. Add Solid's static IP addresses to your HANA instance's firewall or IP allowlist on the SQL port.

See Solid's Static IP Addresses for the current list.


Step 3: Connect in Solid

  1. In Solid, go to Settings → Integrations → Connect a data source
  2. Select SAP HANA
  3. Fill in the connection form:
FieldWhat to enter
HostYour SAP HANA server hostname or IP address — no https://, no trailing slash
Port39015 for tenant databases (default); 30015 for the system database
DatabaseYour tenant database name (leave blank for the system database)
Usernamesolid_svc (or whatever user you created in Step 1)
PasswordThe password you set in Step 1
  1. Click Test Connection to verify Solid can reach the endpoint
  2. Select the schemas you want Solid to monitor and click Save

Permissions summary

What Solid needsHow to grant it
Read table structure and column metadataGRANT SELECT ON SCHEMA "<schema>" TO solid_svc
Read query historyGRANT MONITORING ON DATABASE TO solid_svc and GRANT SELECT ON SYS.M_SQL_PLAN_CACHE TO solid_svc

Solid does not require CREATE, INSERT, UPDATE, or DELETE on any object.


Troubleshooting

Test connection fails: "Connection refused" or timeout

  • Confirm the Host and Port are correct
  • Verify Solid's static IPs are allowed through your firewall on the SQL port
  • Check that the HANA SQL service is running: SELECT * FROM SYS.M_SERVICES WHERE SERVICE_NAME = 'indexserver'

Test connection fails: "Authentication failed"

  • Confirm the Username and Password match the user created in Step 1
  • Check that NO FORCE_FIRST_PASSWORD_CHANGE was included when creating the user — HANA sometimes requires a password change on first login, which blocks automated connections

No schemas appear after connecting

  • Verify the solid_svc user has SELECT on the target schemas: SELECT * FROM SYS.GRANTED_PRIVILEGES WHERE GRANTEE = 'SOLID_SVC'
  • Schemas with no tables will not appear in the selector

Query history is empty

  • Confirm GRANT MONITORING ON DATABASE TO solid_svc was applied
  • HANA's plan cache (M_SQL_PLAN_CACHE) only retains recently executed queries. Run some queries against the target schemas and sync again

Did this page help you?