Skip to Content
Technical Articles
Author's profile photo Apoorva Nagaraju

Create SDA remote source in SAP HANA CLOUD using SAP Cloud Connector

SAP Cloud Connector serves as a link between SAP BTP applications and on-premise systems. Runs as on-premise agent in a secured network and provides control over on-premise systems and resources that can be accessed by cloud applications.

In this blog, you will learn how to enable cloud connector for HANA Cloud Instance, install and configure the cloud connector. Also to connect an SAP HANA on-premise database to SAP HANA Cloud using SDA remote source.

Cloud connector enablement for SAP HANA Cloud Instance

For New instance

  1. Go to SAP BTP home page and enter your account
  2. Enter Subaccount and then Space
  3. Click on SAP HANA Cloud on the left navigation menu
  4. Click on Create and then select SAP HANA database
  5. Follow the steps in wizard to create instance
  6. Under SAP HANA Database Advanced Settings, you can specify what IP addresses you allow by selecting enable the cloud connector option
  7. 7. Proceed with other settings and click on Create Instance
  8. 8. Instance created can be connected with the cloud connector

For Existing instance

  1. Open SAP Hana Cloud Central Cockpit
  2. Select the instance that you want to connect to an SAP HANA on-premise database
  3. Click on Manage Configurations
    4. Select Edit
  4. 5.Navigate to Connections tab and enable the Cloud Connector
  5. 6. Save the changes

Install Cloud Connector

Download the cloud connector from Hana tools.

Refer SAP Help Document for supported browsers.

After the installation is complete, open a browser and enter “https://localhost:8443”

“8443” is the default port specified during installation.

“Administrator/manage” is the default login credentials which is case-sensitive. On first login, password needs to be changed.

Define Subaccount

In the Cloud connector, Subaccount needs to be defined to map to the subaccount that your SAP HANA Cloud database instance is located.

  1. Select the region of the subaccount
  2. Enter the subaccount ID

Details of Region and Subaccount ID can be obtained from the BTP cockpit as seen in the below image


  1. 3. Provide the credentials of the subaccount on SAP BTP Cockpit
  2. 4. Location ID is optional but needed when setting up remote source
  3. 5. Save

Connect to SAP HANA on-premise system

  1. Click on Cloud To On-Premise on the left panel
  2. Click on the plus icon in the top right corner to add system mapping
  3. 3. From the drop-down menu Back-end Type, select SAP HANA
  4. 4. Select TCP from the drop-down menu for the protocol. Refer here for more information on TCP
  5. 5. Enter the internal host and internal port of your on-premise HANA system
  6. 6. Specify the virtual host and virtual port to expose your internal host to the public network
  7. 7. Proceed and the click on Finish
  8. 8. After finish, status is Unchecked in the column Check Result. Click on the glass icon under Actions column
  9. 9.Status will be changed to Reachable which means cloud connector can reach SAP HANA On-Premise system

Create SDA Remote Source Using Cloud Connector

Create a remote source in SAP HANA Cloud,SAP HANA Database to an SAP HANA on-premise database.

Prerequisites

  • Need CREATE REMOTE SOURCE system privilege.
  • The remote source is reachable by the network from the computer you are using.
  • Download and import the SSL certificate signed by DigiCert.

REST API-based adapters communicate with the endpoint through an HTTP client. To ensure secure communication, the adapters require client certificates from the endpoint services. Connections to an SAP HANA database in SAP HANA Cloud, which are based on the hanaodbc adapter, also require an SSL certificate.

Refer the document Import Certificates for SSL Connections to Remote Sources.

Create a Remote Source Using SQL Syntax

In SQL console, execute a CREATE REMOTE SOURCE command by specifying the required properties

CREATE REMOTE SOURCE “SDA_CC”
ADAPTER “hanaodbc”
CONFIGURATION ‘<?xml version=”1.0″ encoding=”UTF-8″?><ConnectionProperties name=”connectionproperties”><PropertyEntry name=”adapterversion”>1.0</PropertyEntry><PropertyEntry name=”connectionmode”>adapterproperties</PropertyEntry><PropertyEntry name=”driver”>libodbcHDB.so</PropertyEntry><PropertyEntry name=”server”>virtual_host</PropertyEntry><PropertyEntry name=”port”>virtual_port</PropertyEntry><PropertyEntry name=”dml_mode”>readwrite</PropertyEntry><PropertyEntry name=”extraadapterproperties”>use_haas_socks_proxy=true;scc_location_id=locationid</PropertyEntry></ConnectionProperties>’
WITH CREDENTIAL TYPE ‘PASSWORD’ USING ‘user=<user_name>;password=<password>’;

Create a Remote Source Using Database Explorer

  1. In Database explorer, right-click the Remote Sources object in your database catalog and click Add Remote Source

  2. 2. Specify a remote source name
  3. 3. In the Adapter Name dropdown list, choose HANA (ODBC)
  4. 4. Enter the required information under the properties section
  5. Server: Virtual Host , Port: Virtual Port (Specified in the Cloud Connector)
  6. 5. Extra Adapter properties to be specified as “use_haas_socks_proxy=true;scc_location_id=<loc_id>”

Location_ID is the ID set up in the Cloud Connector


  1. 6. Specify the credentials
  2. 7. Click on Create

After the connection is established the schemas and tables can be accessed from the HANA On-Premise system via the remote source.

Assigned Tags

      11 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Michael Cocquerel
      Michael Cocquerel

      Do other CREDENTIAL TYPE like KERBEROS and JWT are supported (instead of PASSWORD) in the case of SDA from HANA Cloud to HANA on-premise ? if yes, what are the additional steps required to make it working ?
      Regards,
      Michael

      Author's profile photo Apoorva Nagaraju
      Apoorva Nagaraju
      Blog Post Author

      Hi Michael,

      SSO Kerberos is supported in SDA only between on-premise HANA systems. That is, it is not supported in 'SAP HANA Cloud, SAP HANA database' and it also cannot be used in the hybrid scenario between SAP HANA Cloud and on-premise HANA.

      Instead Single Sign-On (SSO) with JSON Web Tokens can be used. 

      https://help.sap.com/docs/HANA_CLOUD_DATABASE/477aa413a36c4a95878460696fcc8896/084d01055286438682ce8bb4afa87fc0.html

      Regards,
      Apoorva

      Author's profile photo Ankit Soni
      Ankit Soni

      Hi Apoorva Nagaraju

      Thanks for this guide on connectivity on-prem HANA DB as SDA remote source. Can we also encrypt the communication with encrypt=TRUE property when communicating to on-prem HANA DB in additional adapter properties or it doesn't work when using the SAP cloud connector?

      I have created a certificate collection with Digicert Root CA certificate in HANA cockpit with purpose as "REMOTE SOURCE" as advised in sap help - Create an SAP HANA Cloud, SAP HANA Database Remote Source | SAP Help Portal but when adding the encrypt along with other 2 properties for SCC I get SSL error. Appreciate it if you could advise if we can get encryption when using an SAP cloud connector.

      Thanks,

      Ankit

      Author's profile photo Apoorva Nagaraju
      Apoorva Nagaraju
      Blog Post Author

      Hi Ankit,

      encrypt=TRUE is not supported. Only the below extra adapter properties are supported.-

      • useHaasSocksProxy=true or use_haas_socks_proxy=true
      • sccLocationId=<SCC_location_ID> or scc_location_id=<SCC_location_ID>

      For details you can refer - https://help.sap.com/docs/HANA_CLOUD_DATABASE/477aa413a36c4a95878460696fcc8896/20d299d2f5224e8590982e8ad97362a2.html

      Regards,

      Apoorva

      Author's profile photo Giuseppe Miceli
      Giuseppe Miceli

      Hello,

      very useful blog.

      Is it possible to create odata adapter remote source in the same way using cloud connector? I am not able to find how to set the location id.

       

      Thanks

      Giuseppe

      Author's profile photo Apoorva Nagaraju
      Apoorva Nagaraju
      Blog Post Author

      Hi Giuseppe,

      Using SDI adapter via cloud connector is not supported. To set location id you can refer Define Subaccount section.

      Regards,

      Apoorva

      Author's profile photo Luiz Souza
      Luiz Souza

      Hi Apoorva Nagaraju !

      Thank you for your amazing sharing.

      In my case the direction is the opposite, I need to access remotly some tables/calculation views standards of sap hana On-premise, private cloud into SAP HANA Cloud.

      The idea is to create new custom calculation views into BAS using data from my sap hana On-premise, private cloud.

      Does this explanation also apply to this scenario?

      Thank you in advance!

      Luiz Souza

      Author's profile photo Apoorva Nagaraju
      Apoorva Nagaraju
      Blog Post Author

      Hi Luiz Souza,

      Yes, the same holds good for sap hana On-premise, private cloud.

      Regards,

      Apoorva

      Author's profile photo Luiz Souza
      Luiz Souza

      Thank you!

      Author's profile photo Luiz Souza
      Luiz Souza

      Can you help with Credentials ?

      1. Cloud Connector: Where Can I can find the "Internal Host and Port"  for  SAP HANA & TCP ? Is it the same that we use for htpp ? Or need to be something related/specific to sap hana database ?

      2. SAP HANA CLOUD: What is the user I have to inform here ?


      Thank you!

      Author's profile photo Apoorva Nagaraju
      Apoorva Nagaraju
      Blog Post Author

      Hi Luiz,

      "Internal Host and Port" is the host and port details of the HANA On premise system.
      Technical user – Specify a valid user and password to connect to the remote source. All connections to the remote source share the same credential for the remote source.

      For more details on credentials refer - https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-data-access-guide/managing-credentials-for-remote-sources?version=2023_3_QRC

      Regards,

      Apoorva