SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Connect Using the SAP HANA ODBC Driver

Connect to SAP HANA using an ODBC data source.

Overview

🎓 beginner 15 min. SAP HANA CloudBeginnerSAP HANA Cloud SAP HANA DatabaseSAP HANASAP HANA Express Edition

You will learn

  • โœ”How to create and test an SAP HANA ODBC data source
  • โœ”How to use an ODBC data source in an application

Prerequisites

Prerequisites

  • You have completed the first 3 tutorials in this mission.

Steps

Intro

Open Database Connectivity (ODBC) provides an API for accessing databases. Database vendors provide ODBC drivers for their database products. An application written to the ODBC standard can be ported to other databases that also provide an ODBC interface.


Step 1 Configure a data source using Microsoft Windows ODBC Data Source Administrator
โ€”

The ODBC Data Source Administrator lists the installed ODBC drivers and the configured data sources.

  1. Open the administrator by entering ODBC after clicking on the Microsoft Windows start icon.

    Ensure that you choose the 64-bit version if you have the 64-bit version of the SAP HANA client installed.

    start ODBC Administrator
    start ODBC Administrator

  2. Click the Drivers tab and view the installed drivers.

    odbc admin drivers
    odbc admin drivers

    The SAP HANA ODBC driver (HDBODBC) is visible.

  3. Click the User DSN tab to view the data sources.

  4. Click Add to create a new data source to connect to a SAP HANA database.

    Add ODBC user data source
    Add ODBC user data source

  5. Select HDBODBC and click Finish.

    New data source
    New data source

  6. Example data source configuration for SAP HANA Cloud.

    For the host, paste the SQL Endpoint from your instance. For more details, review Choose an SAP HANA Database.

    ODBC HANA Cloud
    ODBC HANA Cloud

  7. Example data source configuration for SAP HANA, express edition.

    ODBC HXE
    ODBC HXE

    To connect to SAP HANA, express edition, Multitenant should be checked and the Validate TLS/SSL certificate option can be unchecked. For more information on this topic, see How to Configure TLS/SSL in SAP HANA 2.0.

  8. Click Test connection.

    Test Succeeded
    Test Succeeded

    The user name USER1 and password Password1 can be entered when prompted for credentials.

  9. Press OK to save the data source.

    Saved values can also be viewed using the Microsoft Windows registry editor under the key Computer\HKEY_CURRENT_USER\Software\ODBC\ODBC.INI.

For additional details see Connect to SAP HANA via ODBC.

Step 2 Configure a data source on Linux or Mac with unixODBC
+
Step 3 Use a SAP HANA data source from another program
+
Step 4 Knowledge check
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 4
1. Configure a data source using Microsoft Windows ODBC Data Source Administrator 2. Configure a data source on Linux or Mac with unixODBC 3. Use a SAP HANA data source from another program 4. Knowledge check

Learn more →