Creating SAP Analytics Cloud Live Connection to SAP HANA Database on SAP Cloud Platform
SAP Analytics Cloud (SAC) has the capability to connect to various types of cloud and on-premise data sources via live and import connections. – see this page for complete list of connections.
In this blog post, we focus on connecting from an SAP Analytics Cloud tenant to a cloud data source that is an SAP HANA database on SAP Cloud Platform (SCP) via a live connection.
In general, there are 3 ways to create live connections from an SAP Analytics Cloud tenant to an SAP HANA database:
- Direct – CORS – see this blog post.
- Path – Reverse Proxy – see this blog post.
- SAP Cloud Platform – this current blog post.
For the SAP HANA database that is on SAP Cloud Platform, there are two authentication method – (1) User Name & Password and (2) SAML Single Sign On. This blog post only shows the connection with User Name & Password authentication method.
*Note: The SAP HANA database and SAP Analytics Cloud tenant (SAC) do not need to be on the same SCP landscape.
Before we jump into the steps to create the live connection, you have to be an admin user for (1) an SAP HANA database instance deployed on an SAP Cloud Platform landscape, and (2) an SAP Analytics Cloud tenant. In the steps below, both are on US2 SCP landscape. Additionally, you need to have HANA Studio installed on your machine.
These are the parts of this guide to set up the live connection:
-
- Log into SCP Cockpit – to get the HANA database info.
- Configure HANA Studio – to connect to cloud system.
- Connect HANA Studio to HANA Database.
- Import Info Access service to HANA Database.
- Import Info Access Toolkit and SINA API to HANA Database.
- Configure HANA Database User’s Roles – to allow data access.
- Create Connection from SAP Analytics Cloud Tenant.
Part 1 – Log into SAP Cloud Platform (SCP) Cockpit
The screenshot below shows my SCP account with US West SCP landscape. My SAC tenant is also deployed on the same SCP landscape. The SCP Cockpit contains information associated with your SCP account. Logging into this page is not the same as logging into the SAP HANA database.
You may look at the URL of your SCP Cockpit to know the SCP landscape your HANA database is deployed on. (For example: https://account.us2.hana.ondemand.com/cockpit#/organi….)
After selecting the subaccount, you can see the name under the “subaccount information” section.
This information is useful for later steps.
After selecting “Database Systems”, you can see the SAP HANA database name that is deployed.
This information is useful for part 3 & part 6 of this guide.
Select the database system -> select the tenant in the “Tenant Databases” field -> select the tenant on the “Database ID” column.
You can see the overview of the database.
If you have not already created a user for the HANA database, you can select “Database User” to create an user. A database user is required for part 3 of this guide.
*Important: A database user is needed to log into the HANA database and to create the connection on the SAC tenant.
The “SAP HANA Web-based Development Workbench” link brings you to the login page of this HANA database instance.
You can use the database user created to log into the HANA database.
This web interface allows you to perform workflow similar to that of HANA Studio. However, HANA Studio is required for the upcoming steps.
Part 2 – Configure HANA Studio
In your HANA studio, open “Window” -> “Preference”.
Expand “General”, then select “Network Connections”.
Select the following settings, then click “OK” to close the setting.
Open “Help” -> “Install New Software”.
Install the “Eclipse Plug-in Development Environment”.
Then, install the “SAP Cloud Platform Tools for Connecting to SAP HANA Systems”.
Part 3 – Connect HANA Studio to HANA Database
After restarting HANA Studio, right click at the blank space in the “Systems” view, and select “Add Cloud System”.
Select the SCP landscape host in the “Region host” field.
*Tip: type “h” to show the list of available hosts.
Enter the subaccount name of the SCP account. Step to find this information can be found in part 1 of this blog post. Then, enter your SAP ID and password. This set of credential may not be the same as the ones used to log into the HANA database.
*Tip: The username and password should be the credential you used to log into your machine.
After clicking “Next”, enter the HANA database information.
Step to find this information can be found in part 1 of this blog post.
Part 4 – Import Info Access service to HANA Database
After establishing the connection from HANA studio to the HANA database, Information Access service and user permission need to set up to allow connection from SAC tenant.
In your HANA Studio, open “File” -> “Import”.
Expand “SAP HANA Content” -> select “Delivery Unit” -> choose “Next”.
Under “Target System”, choose your database instance. Choose “Next”.
Select “Server”.
From the dropdown list, select the “SYS/global/hdb/content/HCO_INA_SERVICE.tgz” delivery unit.
Select both actions and choose “Finish”.
After importing the delivery unit to the HANA database, you can verify the import in the SAP HANA modeler. In the “SAP HANA Systems” view, under “Content”, check that the following package is available: sap\bc\ina\service
*Tip: The button to switch to “SAP HANA Modeler” is at top right in HANA Studio.
Part 5 – Import Info Access Toolkit and SINA API to HANA Database
Follow the instruction on this page to acquire and import the InA toolkit to the HANA database.
*Tip: If you do not have the authorization to download the INA UI toolkit from the SAP Software Download Centre, contact Product Support to help you acquire the INA UI toolkit.
After importing the delivery unit to the HANA database, you can verify in the SAP HANA modeler. In the “SAP HANA Systems” view, under “Content”, check that the following packages are available.
Part 6 – Configure HANA Database User’s Roles
Use the SCP XS Admin tool to log into the HANA database. The URL format for login is https://[DatabaseSystemName][SubaccountName].[SCPLandscape].ondemand.com/sap/hana/xs/admin
With the SCP account and HANA database in this guide, the URL is: “https://sacpmhs001d64afd459.us2.hana.ondemand.com/sap/hana/xs/admin”.
Use the same credential to login as the ones for “SAP HANA Web-based Development Workbench” in part 1 of the instruction.
Select the “Menu” icon top left and select “XS Artifact Administration”.
In the “Packages” area, select “sap> bc > ina > service > v2”
*Important: Make sure you are in that v2 package or you may affect the authentication to your XS Admin tool.
Select “Edit” at the bottom right to update configuration as shown below.
Then, choose “Save”.
Go back to HANA Studio.
In the “SAP HANA Systems” view, under “Security”, expand “Users”.
Select the database user used in part 3 from the list.
Select the “add” icon to add the three roles to the user.
Part 7 – Create Connection from SAP Analytics Cloud Tenant
Log into the SAC tenant that is deployed on the same SCP landscape as the HANA database.
Select the “Menu” icon, and choose “Connection”
Select the “Add” icon on the top right. Select “Live Connection”, then select “SAP HANA”.
In the prompt, specify the connection name in the “Name” field.
*Tip: The “Name” field is an internal name to the SAC tenant.
Choose “SAP Cloud Platform” as the “Connection Type”. Use the information from part 1 to fill in other connection details.
Choose “User Name and Password” as the “Authentication Method”. Use the database user and password as the credentials.
Choose “OK”
Congratulations! You have successfully created a live connection from an SAP Analytics Cloud tenant to a HANA database!
After creating this live connection between your SAC tenant and the HANA database, you would be able to leverage the content in the HANA database to create models and stories in the SAC tenant.
Hi Benny,
Nice to see the post it is useful , i want be in touch with you to gain the knowledge please sent me an email on my personal ID shivasap04@gmail.com
Thanks
shiva
Hoping someone can help. When I open my SAP HANA Studio, and go to Windows -> Preferences, I do not see the option listed on this blog. No HTTP - Dynamic - Dynamic is available and I don't see where I can add that. Please help.
Thanks!
B.Kurtis@sap.com