Configuring Remote Source connection (SDA) from HANA to MSSQL
I went through couple of blogs on the same topic , but didnt found anything specific to MSSQL configuration. Hence, i would like to present it in more details for configuring remote source connection from HANA to MSSQL.
What is HANA Smart Data Access (SDA) ?
SAP HANA smart data access enables remote data to be accessed. It enables remote data to be accessed as if they are local tables in SAP HANA, without copying the data into SAP HANA. Specifically, in SAP HANA, you can create virtual tables which point to remote tables in different data sources. Customers can then write SQL queries in SAP HANA, which could operate on virtual tables.
More details on SDA can be found in the below blog
In this blog, I have defined the configuration of connecting the HANA DB to external MSSQL DB (HANA Admin View).
Steps for Configuring:
- Download the drivers Unix ODBC & Microsoft SQL
- Installing the drivers
- creating the .odbc.ini file and setting up the configuration.
- Restart the HANA
- Configure the remote source connection in HANA Studio.
Download the Drivers :
2. Download the Microsoft SQL Server ODBC Driver 11 for SQL Server by clicking one of the download buttons.
Installing the Drivers:
Install the unixODBC 2.3.0 Driver Manager
1. After downloading the drivers, you will be able to see msodbcsql-11.0.2260.0.tar.gz
2. Copy the downloaded drivers it to Linux server where HANA is installed.
3. Login as root user and decompress msodbcsql-11.0.2260.0.tar.gz –
tar -zxvf msodbcsql-11.0.2260.0.tar.gz
4. Change to the msodbcsql-11.0.2260.0 directory
5. You can install the driver manager by executing the following command
6. Type “YES” to proceed with unpacking the files. This part of the process can take up to five minutes to complete
7. After the script stops running, follow the instructions on the screen to install the unixODBC Driver Manager.
This will complete the installation of UnixODBC drivers.
P.S: check the version of Unix ODBC by executing command >isql –version -> The output should be unixODBC 2.3.0
Install the Microsoft SQL Server ODBC Driver 11 for SQL Server
1. Change to the msodbcsql-11.0.2260.0 directory, where you can run install.sh to install the driver:
2. run the install script
3. After reviewing the license agreement, type “YES” to continue with the installation.
4.Verify that Microsoft SQL Server ODBC Driver 11 For SQL Server was registered successfully:
odbcinst -q -d -n “ODBC Driver 11 for SQL Server”
5. To check the successful installation of drivers…type the below command
creating the .odbc.ini file and setting up the configuration:
As HANA requires the .odbc.ini file for communicating with remote source MSSQL. Hence, we need to create .odbc.ini file in $HOME directory.
1. Login with sidadm user and create .odbc.ini file -> vi .odbc.ini file
2. Create DSN as MSSQL
3. Server=nave of the server you want to connect and port number
4. Driver = Location of the ODBCsql driver.
P.S: your .odbc.ini file should look like above
5. Goto Home directory and open .sapenv.sh file and add the below line (Update the LD_LIBRARY_PATH)
6. Restart SAP HANA
Configure the remote source connection:
From HANA Studio -> Provisioning -> Remote Source -> right click new remote source
Provide username and password of the remote MSSQL server for logon.
P.S: The following privileges are required to manage remote sources:
This completes the Installation and configuration of Remote source connection to remote MSSQL server from HANA.
References & Known Issues: