Setting up the new HANA service in SAP Cloud Platform Cloud Foundry
Early August 2018, SAP announced the availability of SAP Cloud Platform on AWS in Australia. One of the key services which I was looking to try out was the new HANA service.
So what is actually new with the HANA service?
HANA as a service has been available for a long time in the Neo environment of SAP Cloud Platform. There are plenty of customers who have subscribed to the HANA service to create applications that leverage the core capabilities of HANA or implement data mart scenarios in the cloud.
In the Neo environment, customers could only request for HANA 1.0. There were also limitations around the elastic capabilities – for example, it was not straight forward to change the size of a HANA instance once it has been provisioned to a customer. Early 2018, there were some new capabilities introduced to allow customers to install and manage their HANA database using Self-Service options. You could only select from few of the available standard memory size – 64GB, 128GB, 256GB, 512GB, 1TB.
The new HANA service on Cloud Foundry is based on HANA 2.0 and offers on-demand self-provisioning capabilities. It also offers a flexible pricing model and allows you to scale the HANA instance according to you requirements. You can subscribe to blocks of HANA memory and accordingly spin up several HANA instances in various combination – For example, you can create two HANA instances with memory size 192GB and 96GB.
The complete Feature description of the service can be found in SAP Help.
In this blog, I will share my experience in setting up and connecting to the the new HANA service. There are some differences in how you would connect to the the new HANA service in Cloud Foundry when compared to the neo environment.
Create a HANA service instance
The below screenshot show the list of subaccounts which are attached to a Global account which has been initially created in the Neo environment.
I have used the “New Subaccount” button to create additional subaccounts. In this case, I have created a subaccount called “CAL” which resides in AWS.
Under Entitlement, you should be able to view the resources which your organization has subscribed too. You can edit this page and add resources to each of the subaccount. For my scenario, I would just increase the counter of the HANA service against the CAL subaccount.
Once the HANA service has been assigned to the subaccount, you should be able to view it in the
Under the spaces, within your subaccount, you should be able view “SAP HANA Service” in the Service Marketplace.
Select the HANA service and navigate to the “Instances” menu to create an instance of your HANA service.
Click on the “New Instance” button to trigger the wizard which will take you through the steps to create your first instance. In the first screen, select the plan – Enterprise or Standard (depending on what subscriptions you have).
In the Parameter section, provide the SYSTEM user password. You also get to select the size of your HANA instance here. It is blocks on 16GB with minimum two blocks. You can spin up a HANA instance upto 2TB. In the below screen, you also get to select allow the HANA service to be accessible on the Internet or to specific IP Addresses.
In the next screen, you can assign/bind any existing application to the HANA service. You can skip it if you don’t have any applications. In the last screen, you can provide the name for your HANA instance. I have provided a name “myhana2” as shown below.
When you click on “Finish”, this will trigger the creation of your instance and you will see the status as “Created” in few minutes. Open the dashboard by click on the icon shown below
Login with you SAP Cloud Platform login credentials.
The Dashboard will give details of the database. The ID, Provider, Memory size etc. The Database endpoint highlighted below will be required when you want to connect to this database using other tools. You also get to Start and Stop your instance from the dashboard.
You can also jump to the SAP HANA Cockpit from the dashboard. Note that you would need to provide SYSTEM user and the password provided earlier to access the cockpit.
Once you are in the HANA Cockpit, you can create users/assign additional privileges and perform other administrative tasks.
From the “Overall Database Status” tile, you can get into the details and also obtain the Tenant database name. You will need the database name later on.
In the Cockpit, you can scroll to the bottom and also verify the HANA version.
Click on the “Open SQL Console” at the top right hand corner of the cockpit to launch the SQL console. From here, you can do all the development tasks – creating HANA artefacts and run your SQL commands.
Connect Eclipse to HANA service
There are changes in how you would use Eclipse to connect to HANA service. If you would connect to a HANA service in the Neo environment, you would select “Add Cloud System”. For connecting to Cloud Foundry environment, use “Add System” as shown below.
In the Hostname, provide the database endpoint which you can obtain from the HANA service dashboard. Copy it without the port. For instance number provide 00 and select “Multiple Containers” and provide the Name as <HANA Tenant DB name: Port>. You can obtain the port from the database endpoint from the HANA service dashboard.
The HANA database name can be obtained from the HANA Cockpit by clicking on the first tile “Overall Database status”
In the next screen, provide the HANA DB user credentials and select “Connect using SSL”.
This will connect you to the HANA service on SAP Cloud Platform and you will be able to view the catalog objects within Eclipse.
Connect on-premise Reporting tools
In the Neo environment, when connecting to a HANA database, we would use SAP Cloud Connector to create a service channel. This has been explained by Manjunath Baburao in one of his blog – “Service Channel: Consume HANA databases on SAP Cloud Platform from OnPremise tools”
Each HANA instance has a secure endpoint which can be reached via public internet. You longer need a Cloud Connector or VPN connection. You can use TCP/IP (encrypted), secure Websockets (HTTP based) and any standard HANA client to connect to the HANA service.
In this blog, I will show how to use setup ODBC connection to the HANA service and also look at consuming this within on-premise Predictive Analytic Suite. I had previously covered how this is done in the Neo environment in this blog “Using Predictive Analytics and Python on SAP Cloud Platform HANA database”
The first part is creating ODBC connection. Ensure you have installed the latest HANA Client drivers from the marketplace. Launch the ODBC Data Source Administrator.
In the Server:Port – Provide the database endpoint which is available in the HANA service dashboard. Copy the details from the dashboard along with the port.
Make sure you select the checkboxes :”Connect using SSL” and “Validate the SSL certificate”.
Finally, provide the database user credentials and select “Connect using SSL”.
Test the connection and look for a success message.
[UPDATE 1-Sep-2017]: SAP HANA Academy has posted a video on the same topic and the recommendation is to use wsproxy.
The next part is on consuming this ODBC connection in Predictive Analytics tool.
From the Toolkit menu, click “Open the Data Viewer”.
Select “Database” from the Data Type drop-down box and click the Browse button to select the ODBC DSN created earlier. This will provide you with access to the catalog contents of the HANA service.
Using the same approach, you should be able to connect various on-premise reporting tools to HANA service on SAP Cloud Platform Cloud Foundry environment.