Skip to content

SAP HANA Database Management in VS Code

SAP HANA is SAP’s in-memory, column-oriented relational database, powering both transactional and analytical workloads across on-premise deployments and HANA Cloud. Key characteristics include:

  • In-memory column store: Data lives in memory in columnar form, making aggregations and analytical queries fast without separate indexes
  • Hybrid workloads: One engine serves OLTP and OLAP, so operational and analytical queries run on the same data
  • Standard SQL: Rich ANSI SQL support plus SQLScript stored procedures and functions
  • Schema-based organization: Databases contain schemas, which contain tables, views, sequences, and routines
  • Multi-tenant architecture: One HANA system hosts multiple isolated tenant databases

SAP HANA is the foundation for SAP S/4HANA, SAP BW/4HANA, and standalone data-platform deployments.

To connect to SAP HANA in DBCode:

  1. Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
  2. Add a New Connection: Click on the “Add Connection” icon.
  3. Complete the connection form: Select SAP HANA as the database type and enter:
    • Host: hostname of your HANA Cloud instance or on-premise server
    • Port: SQL port (443 for HANA Cloud; on-premise tenant ports are typically 3NN15, e.g. 30015)
    • Username / Password: HANA database credentials
    • Database: tenant database name (optional - connects to the port’s default tenant when omitted)
    • SSL: enable for HANA Cloud (required) and TLS-configured on-premise systems
  4. Connect: Click save to connect to your SAP HANA database.
  5. Start exploring: Browse schemas, tables, and views, and run queries.

DBCode uses SAP’s official @sap/hana-client driver. Because the driver is proprietary SAP software, DBCode does not bundle it - on first connection you are prompted to accept SAP’s developer license, and the driver is downloaded from npm for your own use.

For detailed connection instructions, refer to the Connect article.

DBCode enhances your SAP HANA development experience with:

  • SQL query editor: Write and execute HANA SQL with syntax highlighting and multi-statement support
  • Schema browsing: Navigate schemas, tables, views, sequences, procedures, and functions with column types, row counts, and table sizes
  • Data editing: Insert, update, and delete rows inline in the data grid
  • DDL scripting: Script tables, views, and routines via HANA’s built-in object-definition facility
  • Execution plans: Visualize EXPLAIN PLAN output as an interactive plan tree
  • Transactions: Pin a connection to run statements in a transaction and commit or roll back together
  • Session monitoring: View active sessions and running statements, and cancel or disconnect sessions from the monitoring panel
  • Query cancellation: Stop long-running queries from the editor
  • Data export: Export query results in multiple formats

SAP HANA support is in Preview. Kerberos / Windows authentication is not yet supported - use username/password credentials. Some HANA-specific syntax (SQLScript blocks, calculation views, graph and spatial extensions) may not get full editor IntelliSense yet.

By using SAP HANA with DBCode, you can develop, query, and manage HANA Cloud and on-premise HANA databases directly within Visual Studio Code.

For more information about SAP HANA, visit sap.com.