Stefano
Tera Contributor

For this test I used the ServiceNow Developer Sandbox and a local instance of SAP HANA express edition

First of all you must download the jdbc driver for SAP HANA DB ngdbc.jar. I found and download the driver from Internet.

Following this step I uploaded the driver to my midserver.

  • I navigated to MID Server > JAR Files.
  • I clicked New.
  • I completed the following fields:
    1. Name: SAP HANA
    2. Description: SAP HANA
  • I clicked the paper clip icon in the banner and attached the JAR(ngdbc-2.3.62.jar) file to the record
  • I restarted the MID Server service.

find_real_file.png

Then I  added the new JDBC format choice following this is the procedure:

  • I navigated to System Import Sets > Administration > Data Sources.
  • I clicked New, in the Data Sources form, right-clicked the Format field label, and select Show Choice List from the pop-up menu.

find_real_file.png

  • I clicked New in the list of choices.
  • I provided the following values to create the new database choice.
    1. Table: sys_data_source
    2. Label:  HANA
    3. Value:com.sap.db.jdbc.Driver
    4. Dependent value: JDBC

find_real_file.png

The new data source now appears in the list of available JDBC formats.

Last step was create a new data source.

  • I navigated to System Import Sets > Administration > Data Sources and clicked New.
  • In the Data Source form, I selected JDBC from the list in the Type field.
  • I selected the “HANA” from the choice list in the Format field.
  • I added the Connection URL field configuring the form.

find_real_file.png

  • I provided the connection URL: jdbc:sap://localhost:30015/?currentSchema=SAPECC

find_real_file.png

Here is the result:

find_real_file.png

 

Some useful link:

I hope this post is useful.

See you.

Comments
Afsar Hussain
Kilo Guru

Hi Stefano,

I got the similar requirement but I am getting error when I am clicking on 'Test load 20 records' related link on the data source record.

The error is : Unable to load JDBC driver: com.sap.db.jdbc.Driver

Please find the attached screenshot for more clear view of the error.

Please help to know why this error I am getting and how to resolve it.

 

Regards,

Afsar

davidnavelgas
Tera Contributor

Hi,

 

I have the same problem. Could you help us? I believe that when you create a JDBC Data Source for MySQL, Oracle or SQL Server, it possible to pull data without MID SERVER but if the requirement is with other Databases like HANA, I always received the error "Mid Server not respond" or "Unable to load JDBC driver: com.sap.db.jdbc.Driver". Is there another way to recover data from HANA? OData could be a possible?

 

Cheers and thanks in advance.

Version history
Last update:
‎04-18-2019 05:25 AM
Updated by: