Skip to Content
Author's profile photo Former Member

How to create a new HANA ODBC DSN entry for SAP Data Services on Unix Platforms

This blog describes how to use SAP Data Services 4.1/4.2 Connection Manager on UNIX to create  a new  ODBC DSN data source  for Hana db.

The following configuration steps have been performed on:

  • SAP Data Servers (SDS) 4.2 SP1
  • SUSE Linux Enterprise Server 11 (x86_64) VERSION = 11 PATCHLEVEL = 2
  • HANA DB 1.0 SP7
  • Windows Server 2008 R2 as Client

A: Checks to perform before adding the new DSN entry:

  1. On the SDS job server machine, make sure Hana db client is installed and its version matches that of the Hana server.
  2. Test the database connectivity using the native hana db client driver:
    • cd to the Hana client install directory ie: cd /usr/sap/hdbclient
    • Execute:  ./hdbsql -n hana_servername:port -u username -p password
    • Run a simple command “ \s” for status check, and if no error produced  exit and   proceed.
    • Good test results should look like the figure below:


   3. Set the SDS environment variables:

$ cd $LINK_DIR/bin       (<LINK_DIR> is the SDS installation directory).
$ . ./                (there is a space between the dots)

   4. Verify the location of the odbc.ini file where the DSN entry will be added. The $ODBCINI would have been set by the above script ./

echo $ODBCINI  (The output should be:  <$LINK_DIR>/DataDirect/odbc/odbc.ini)

B: Add a new DSN Entry

  1. cd $LINK_DIR/bin
    Run ./ and select “1” to configure Data Sources. All existing DSN entries should also be displayed:


    2.  Add a new database source and select SAP HANA:


  3. Enter the DSN name,  Hana server details  and logon values:


  4.  After a successful test new HANA DSN entry should be displayed:


  5. Run: view $ODBCINI to confirm the new “[HANA DSN 1]” entry in the odbc.ini:


  6.  Test the odbc connectivity from the same server by issuing this command from hanadb client path :

./odbcreg DSNNAME  username password

For example: ./odbcreg ‘HANA DSN 1’ username  password

Successful test result should look like this:


C: Add DSN and SDS Data Store on Windows client

   1. On the Windows SDS designer client machine, install Hana db client,  with the same version as the server.

   2. Create a new DSN source, using ODBC Data Source Administrator:




  3. In SDS Designer create a new Data Store:


That’s it! Please let me know if you have any questions

Nawfal Tazi

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hey Nawfal,

      Good post. Thanks for sharing with community.

      Looks familiar.  🙂


      Author's profile photo Sylvain Chevallereau
      Sylvain Chevallereau

      Dear Nawfal,

      Thank you this is a good step by step guide. I just wanted to comment the fact that SAP Data Services supports DSN-less and TSN-less conectivity for Hana and a couple of other DB as repository, data source and data target.

      Since version 4.1 this may represent a big advantage especially for big deployment with lots of designers... or do you see any pros and cons that may prefer a DSN instead a DSN-less on HANA.

      Thank you again and kind regards,


      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Sylvian,

      That's right DNS-less/TNS-less connection is another (the common) way of connecting to Hana. I don't see any significant advantages, but there could be some specific requirements by which a developer may want to use one connection as opposed to the other..


      Author's profile photo Rodrigo Caparroz
      Rodrigo Caparroz

      Great post.

      Thank you for sharing

      Author's profile photo Former Member
      Former Member

      Thank you man.

      Great post 🙂 It helped me.


      Author's profile photo Former Member
      Former Member

      This is a very good guide, but I have a question. Hope you can answer.

      After this setup, the ./odbcreg test went fine on Linux, but when running a job from the Dataservice, it complains about a missing entry in $LINK_DIR/bin/ds_odbc.ini

      I added the DSN name and where the HANA driver can be found like:

      [HANA HZ2]


      I have done similar for the MSSQL ODBC connections I created. After that HANA entry the job looks like running connecting to HANA. The job in dataservice is not failing anymore. The problem is just that the job does not find any data in a HANA database table.

      If I create a DSN on Windows like in your chapter C, using same username password, then the designer find data in HANA.

      What could be possible wrong?

      Author's profile photo Former Member
      Former Member

      Very Good Post.

      I was having a hard time here, trying to understand how to connect DS to a HANA database.

      And this post solved it for me 🙂

      Thanks and regards,

      Author's profile photo Former Member
      Former Member

      Hi All,


      We have BODS XI 3.2 SP3. Can we create New Datastore with ODBC for HCP on this version as Target?

      Thanks in Advance for your replies.



      K.Narasimha Murthy