Skip To Content

Connect to SAP HANA from ArcGIS

To connect to an SAP HANA database from ArcGIS clients, install and configure the SAP HANA client ODBC driver on the ArcGIS client machines.

Note:

SAP HANA clients are available to existing SAP users from the SAP Support Portal under Software Downloads.

After the ODBC driver is configured on all ArcGIS client machines, create a database connection file. To publish ArcGIS Server web services that reference the data in the SAP HANA database, register the database connection file with your ArcGIS Server sites.

Install and configure the SAP HANA client

Download a supported 64-bit SAP HANA client from the SAP Support Portal under Software Downloads, and install it on all ArcGIS Pro machines and machines in ArcGIS Server sites with which you will register a connection to an SAP HANA database.

Follow instructions provided by SAP HANA to install and configure the ODBC client.

Connect from ArcGIS Pro

To connect from an ArcGIS Pro project to SAP HANA, install the SAP HANA client ODBC driver on the ArcGIS Pro machine and create a database connection.

Create a database connection using the Database Connection dialog box or the Create Database Connection geoprocessing tool.

You can use the SAP HANA server name and the SQL port number to connect to the database if all of the following are true for your site:

  • You're connecting to an on-premises installation of SAP HANA.
  • You're connecting from a general release version of ArcGIS Pro.
  • The number of characters in the SAP HANA server name and SQL port number of your SAP HANA server is fewer than 31.

If any of the above conditions are not true, you must configure a system data source name (DSN) for the SAP HANA client ODBC driver before you complete the following steps to connect to the database. See SAP HANA documentation for instructions to configure a data source name.

Follow the steps below to connect to SAP HANA using the Database Connection dialog box.

The Database Connection dialog box

  1. Open the Catalog pane in ArcGIS Pro.
  2. Right-click Databases and click New Database Connection.
  3. Choose SAP HANA from the Database Platform drop-down list.
  4. In the Data source text box, type one of the following:
    • The SAP HANA server name and the SQL port number used to communicate with the database separated by a colon (:). For example, if the fully qualified name of your SAP HANA server is myserver.network.com and SAP HANA communicates through port 98765, type myserver.network.com:98765. Alternatively, you can set a port number under Additional Properties. (See step 9 below.)
    • The data source name you configured for the ODBC driver.
  5. Use database authentication for the authentication type.

    Operating system authentication is not supported.

  6. Provide a valid database username and password in the User name and Password text boxes, respectively.
  7. If you prefer not to save your login information as part of the connection, uncheck Save user name and password.

    Doing this can help maintain the security of the database. However, if you do this, you will be prompted to provide a username and password every time you connect from ArcGIS Pro.

    Note:

    Save user name and password must be checked for connection files that you register with an ArcGIS Server site or if you want to search to locate data accessed through this connection file.

  8. Type a name for the connection file in the Connection File Name field.

    As you provide connection information, a default name is created. You can use the default, or type a more descriptive file name.

    This is the name that will appear in the Catalog pane and view, and the name of the .sde file stored on disk.

  9. Optionally, expand the Additional Properties section to type a connection parameter and value.

    Read the SAP HANA documentation for information about additional and optional connection parameters.

  10. Click Validate to confirm that the connection information is valid and the database is accessible.

    If the database contains a geodatabase and the connection is valid, the Geodatabase Properties tab is now active.

  11. Click OK to create the connection file.

A database connection appears under Databases in the Catalog pane, and a connection file (.sde) is created in the ArcGIS Pro project directory.

Connect from ArcGIS Server

To publish SAP HANA data to a federated or stand-alone ArcGIS Server site and keep the data in SAP HANA, install a 64-bit SAP HANA client ODBC driver on each machine in the ArcGIS Server site and register a database connection file with the site.

Once you configure the machines in the ArcGIS Server site, create a database connection to the SAP HANA database and register the connection file with your ArcGIS Server site.

Install the SAP HANA on the ArcGIS Server machines (Microsoft Windows)

Download the SAP HANA client ODBC driver and install it on each machine in the ArcGIS Server site.

Install the SAP HANA client ODBC driver on each ArcGIS Server Windows machine:

  1. Download a supported 64-bit SAP HANA client from the SAP Support Portal, and install it on each machine in the ArcGIS Server site.
  2. Add the SAP HANA client installation directory to the Windows system PATH environment variable.

    For example, if you installed the SAP HANA client ODBC driver to C:\Program Files\sap\hdbclient, add that to the PATH environment variable.

Once you have the SAP HANA client ODBC driver installed, you can proceed with registering a database connection with your ArcGIS Server site. If the following conditions exist, however, you must configure a data source name for the ODBC driver before you register a database connection:

  • You're using SAP HANA 1.0 (any supported service pack release).
  • You're connecting to a SAP HANA Cloud.
  • You're connecting to the database from ArcGIS Server 10.6 or earlier.
  • The number of characters in the SAP HANA server name and SQL port number of your SAP HANA server exceeds 31.

Configure an ODBC data source name on Windows (if required)

If you require a data source name, follow these steps to configure a system data source name (DSN) for the SAP HANA client ODBC driver on each ArcGIS Server Windows machine:

Note:

Use the data source name when you connect from ArcGIS to the database. Use the same name when configuring all SAP HANA ODBC clients to that same database. For example, use the same data source name when you configure the SAP HANA client ODBC driver on your ArcGIS Pro machines as you use when you configure the data source name for the ODBC driver on your ArcGIS Server machines. If you do not use the same name, you will encounter problems when publishing, because ArcGIS compares the connection strings of the data being published and the database that is registered.

  1. Open the ODBC Data Source Administrator (64 bit).
  2. Click the System DSN tab in the ODBC Data Source Administrator (64 bit) and click Add.

    The Create New Data Source dialog box appears.

  3. Choose the SAP HANA ODBC client and click Finish.
  4. Populate the Data Source Name, Description, and Server:Port information for your database.
  5. In the TLS/SSL section, check Connect to the database using TLS/SSL and Validate the TLS/SSL certificate.
  6. Open the advanced ODBC setup dialog box and add the following key value to the Special property settings section: SPATIALTYPES=1. Click OK to apply the changes and close the ODBC Advanced Setup dialog box.

    Note:

    You can skip this step if you are using ArcGIS Server with a supported version of SAP HANA 2.0 or later.

  7. Click OK on the ODBC client setup and ODBC Data Source Administrator to close them.

Connect to the database

You can use the Database Connection dialog box in ArcGIS Pro to connect to the database, as described above.

Alternatively, you can run the Create Database Connection tool in ArcGIS Pro or use Python to run the Create Database Connection command from an ArcGIS Server machine to create a database connection file (.sde) that connects to the database.

You must save user information with the connection file to use the database connection file with ArcGIS Server.

Register the database

To publish web services using data in SAP HANA, create a database connection and register it with your ArcGIS Server sites.

To allow ArcGIS Server sites to access the data, use the database connection file you created to add a registered data store in ArcGIS Pro or add a data store item in the portal.