Connect to and manage SAP HANA in Microsoft Purview

This article outlines how to register SAP HANA, and how to authenticate and interact with SAP HANA in Microsoft Purview. For more information about Microsoft Purview, read the introductory article.

Supported capabilities

Metadata extraction Full scan Incremental scan Scoped scan Classification Access policy Lineage Data Sharing
Yes Yes No Yes No No No No

Note

Supported version for SAP HANA is 15.

When scanning SAP HANA source, Microsoft Purview supports extracting technical metadata including:

  • Server
  • Databases
  • Schemas
  • Tables including the columns, foreign keys, indexes, and unique constraints
  • Views including the columns
  • Stored procedures including the parameter dataset and result set
  • Functions including the parameter dataset
  • Sequences
  • Synonyms

When setting up scan, you can choose to scan an entire SAP HANA database, or scope the scan to a subset of schemas matching the given name(s) or name pattern(s).

Prerequisites

  • You must have an Azure account with an active subscription. Create an account for free.

  • You must have an active Microsoft Purview account.

  • You need Data Source Administrator and Data Reader permissions to register a source and manage it in the Microsoft Purview governance portal. For more information about permissions, see Access control in Microsoft Purview.

  • Set up the latest self-hosted integration runtime. For more information, seeĀ Create and configure a self-hosted integration runtime. The minimal supported Self-hosted Integration Runtime version is 5.13.8013.1.

    • Ensure JDK 11 is installed on the machine where the self-hosted integration runtime is installed. Restart the machine after you newly install the JDK for it to take effect.

    • Ensure that Visual C++ Redistributable for Visual Studio 2012 Update 4 is installed on the machine where the self-hosted integration runtime is running. If you don't have this update installed, download it now.

    • Download the SAP HANA JDBC driver (JAR ngdbc) on the machine where your self-hosted integration runtime is running. Note down the folder path which you will use to set up the scan.

      Note

      The driver should be accessible by the self-hosted integration runtime. By default, self-hosted integration runtime uses local service account "NT SERVICE\DIAHostService". Make sure it has "Read and execute" and "List folder contents" permission to the driver folder.

Required permissions for scan

Microsoft Purview supports basic authentication (username and password) for scanning SAP HANA.

The SAP HANA user you specified must have the permission to select metadata of the schemas you want to import.

CREATE USER <user> PASSWORD <password> NO FORCE_FIRST_PASSWORD_CHANGE;
GRANT SELECT METADATA ON SCHEMA <schema1> TO <user>;
GRANT SELECT METADATA ON SCHEMA <schema2> TO <user>;

And the user must have the permission to select on system table _SYS_REPO.ACTIVE_OBJECT and on system schemas _SYS_BI and _SYS_BIC.

GRANT SELECT ON _SYS_REPO.ACTIVE_OBJECT TO <user>;
GRANT SELECT ON SCHEMA _SYS_BI TO <user>;
GRANT SELECT ON SCHEMA _SYS_BIC TO <user>;

Register

This section describes how to register a SAP HANA in Microsoft Purview by using the Microsoft Purview governance portal.

  1. Go to your Microsoft Purview account.

  2. Select Data Map on the left pane.

  3. Select Register.

  4. In Register sources, select SAP HANA > Continue.

  5. On the Register sources (SAP HANA) screen, do the following:

    1. For Name, enter a name that Microsoft Purview will list as the data source.

    2. For Server, enter the host name or IP address used to connect to a SAP HANA source. For example, MyDatabaseServer.com or 192.169.1.2.

    3. For Port, enter the port number used to connect to the database server (39013 by default for SAP HANA).

    4. For Select a collection, choose a collection from the list or create a new one. This step is optional.

    Screenshot that shows boxes for registering SAP HANA sources.

  6. Select Finish.

Scan

Use the following steps to scan SAP HANA databases to automatically identify assets. For more information about scanning in general, see Scans and ingestion in Microsoft Purview.

Authentication for a scan

The supported authentication type for a SAP HANA source is Basic authentication.

Create and run scan

  1. In the Management Center, select integration runtimes. Make sure that a self-hosted integration runtime is set up. If it isn't set up, use the steps in Create and manage a self-hosted integration runtime.

  2. Go to Sources.

  3. Select the registered SAP HANA source.

  4. Select + New scan.

  5. Provide the following details:

    1. Name: Enter a name for the scan.

    2. Connect via integration runtime: Select the configured self-hosted integration runtime.

    3. Credential: Select the credential to connect to your data source. Make sure to:

      • Select Basic Authentication while creating a credential.
      • Provide the user name used to connect to the database server in the User name input field.
      • Store the user password used to connect to the database server in the secret key.

      For more information, see Credentials for source authentication in Microsoft Purview.

    4. Database: Specify the name of the database instance to import.

    5. Schema: List subset of schemas to import expressed as a semicolon separated list. For example, schema1; schema2. All user schemas are imported if that list is empty. All system schemas and objects are ignored by default.

      Acceptable schema name patterns that use SQL LIKE expression syntax include the percent sign (%). For example, A%; %B; %C%; D means:

      • Start with A or
      • End with B or
      • Contain C or
      • Equal D

      Usage of NOT and special characters aren't acceptable.

    6. Driver location: Specify the path to the JDBC driver location in your machine where self-host integration runtime is running, e.g. D:\Drivers\SAPHANA. It's the path to valid JAR folder location. Make sure the driver is accessible by the self-hosted integration runtime, learn more from prerequisites section.

    7. Maximum memory available: Maximum memory (in gigabytes) available on the customer's machine for the scanning processes to use. This value is dependent on the size of SAP HANA database to be scanned.

    Screenshot that shows boxes for scan details.

  6. Select Continue.

  7. For Scan trigger, choose whether to set up a schedule or run the scan once.

  8. Review your scan and select Save and Run.

View your scans and scan runs

To view existing scans:

  1. Go to the Microsoft Purview governance portal. Select the Data Map tab on the left pane.

  2. Select the desired data source. You can view a list of existing scans on that data source under Recent scans, or you can view all scans on the Scans tab.

  3. Select the scan that has results you want to view.

    The page that appears shows you all of the previous scan runs, along with the status and metrics for each scan run. It also displays:

    • Whether your scan was scheduled or manual.
    • How many assets had classifications applied.
    • How many total assets were discovered.
    • The start and end times of the scan, and the total scan duration.

Manage your scans - edit, delete, or cancel

To manage or delete a scan:

  1. Go to the Microsoft Purview governance portal. Select the Data Map tab on the left pane.

  2. Select the desired data source. You can view a list of existing scans on that data source under Recent scans, or you can view all scans on the Scans tab.

  3. Select the scan that you want to manage. You can then:

    • Edit the scan by selecting Edit scan.
    • Cancel an in-progress scan by selecting Cancel scan run.
    • Delete your scan by selecting Delete scan.

Note

  • Deleting your scan does not delete catalog assets created from previous scans.
  • The asset will no longer be updated with schema changes if your source table has changed and you re-scan the source table after editing the description on the Schema tab of Microsoft Purview.

Next steps

Now that you've registered your source, use the following guides to learn more about Microsoft Purview and your data: