In this blogpost . I would like to provide guidance on how to access HANA Cloud Database HDI Container in your BTP.
If your BTP account already has HANA Cloud setup your application (space) in sub-account already has Hana HDI container then you can directly jump to section “Get Started with the SAP HANA Database Explorer” in this blog post”.
SAP HANA Cloud is a SAP HANA Cloud is a database as a service (DBaaS) , provides a single place to access, store, and process all enterprise data in real time with high availability .You can develop smart applications with embedded machine learning , analytics (advanced data processing capabilities , insights ) ,document store . SAP HANA Cloud provides all of the advanced SAP HANA technologies for multi-model data processing ,store and access data in-memory and column-based [ it Process mission-critical data at proven in-memory speed] or on disk . By combining in-memory storage with columnar store, data operations are performed faster than in a traditional database with a disk-based storage. Using SAP HANA Cloud, you can set up and manage SAP HANA databases and bind them to applications running on SAP Business Technology Platform (SAP BTP) or elsewhere. You can benefit from cloud qualities such as availability, security, automatic software updates, elasticity, and low total cost of ownership by using SAP HANA Cloud either as a stand-alone solution or as an extension to your existing on-premise environment.
If you already have an SAP HANA Cloud service in your BTP then skip this step i.e. continue with Use your BTP Existing SAP HANA Cloud service instance and go to section “Get Started with the SAP HANA Database Explorer” in this blog post.
If you need to create an SAP HANA Cloud service instance first → continue with Create an SAP HANA Cloud service instance.
SAP HANA Cloud instances are not created automatically for any type of BTP account. Therefore, you will have to create an SAP HANA Cloud service instance first, if you don’t have one yet. How to create SAP HANA Cloud instance in the trial BTP environment.
Refer below document ,
How to Get an SAP HANA Cloud Instance for SAP Business Technology Platform, Cloud Foundry environment to learn.
On BTP trial, your SAP HANA Cloud instance will be automatically stopped overnight, according to the server region time zone. That means you need to restart your instance every day before you start working with your trial.Once you complete the tutorial steps in Provision an Instance of SAP HANA Cloud, SAP HANA Database
As an optional step if you are completely new to the SAP HANA Cloud environment, you might want to consider also going through this tutorial: Tools to Manage and Access the SAP HANA Cloud, SAP HANA Database in order to familiarize yourself with the various tools that can be used to manage and develop with SAP HANA Cloud.
After provisioning a HANA Cloud DB next step is to create an instance of HANA Schema and HDI Service. This service generates a schema (if you use schema plan) which allows your Spring Boot application to create its database artifacts. There are other plans for different use-cases. For example, if you follow the SAP CAP (SAP Cloud Application Programming Model) is a framework developed by SAP to build cloud applications, services based on either JavaScript/Node.js or Java (Spring Boot). Core Data Services (CDS), which in turn generated into a database objects (tables , views..) with only few lines of code you have a Web API (OData/REST) which offers functionality to create, read, Query, update ,delete (CRUD+ Q) transactions …In SAP CAP, hdi-shared plan is used, which deploys the database artifacts from your CDS files.All these database artifacts are clubbed into a wrapper called Schema, staged, built and then deployed into SAP HANA Cloud Database in the form of a database container.
In an SAP HANA Cloud instance, the SAP HDI is enabled by default.
So the SAP HANA Deployment Infrastructure (HDI) is a service layer of the SAP HANA database and helps create runtime database objects [e.g., Tables, Views, Procedures, etc] from design-time artifacts like CDS, JPA Entities.
HDI creates a new HANA repository (with both design time and runtime management) per project. Each Container gets its own unique technical user to control database artifacts.
You have two options to create HDI Instance. Manual or Automatic (program)
1) Manually :
You can use BTP Cockpit : Set Up a HANA Schema or an HDI Container
or Commands (CLI)
create-service hana-cloud-trial hdi-shared sap-demo-hdi-db2) Programming : You can use SAP CAP Framework or Java or NodeJS or Python
- name: sap-demo-hdi-db type: com.sap.xs.hdi-container parameters: service: hana-cloud-trial # 'hana-cloud-trial' 'hanatrial' on BTP trial landscapes #for BTP enterprise account please use 'hana'Fo your reference :
Tutorials :
Develop a CAP Node.js App Using SAP Business Application Studio
Build a Business Application Using CAP for Java
Sample apps:
https://github.com/SAP-samples/cloud-cap-samples
https://github.com/SAP-samples/cloud-cap-samples-java
https://github.com/SAP-samples/cap-sflight
Official Document :
Developing Java in the Cloud Foundry Environment
Developing Node.js in the Cloud Foundry Environment
Developing Python in the Cloud Foundry Environment
In case you’ve a question, find a bug, or otherwise need support, use our community
Now , it is time to learn how to access HANA Cloud Database in your BTP Cockpit.
SAP HANA Database Explorer is a tool used to interact with SAP HANA databases, as well as use the SAP Graph and Spatial engines. In the HANA Database Explorer, you can also access the SQL console. The SAP HANA database explorer can be opened from multiple locations as shown below:
Note : Instead of creating HANA Cloud in your BTP Space ,If your BTP Admin has setup central HANA cloud for your sub-account (for all spaces) then ask to share central “BTP Hana Cloud Database Explorer ” URL .
Schema ID is your BTP Space HDI instance, choose accordingly .
One additional tip : If you have other technical credentials ,you can switch user by right click on Schema login with different user , enter technical user credentials ..
You can further refer tutorials How to Create Database Objects with SAP HANA Database Explorer .
If you know SAP HANA Database Explorer Cockpit have access to BTP Space then follow below steps.
You can provide the host, port, user name, password from HDI instance of BTP Space
Note :
It is good to know about which Credentials to use ,so few notes for you.
It is highly recommended that you do not use DBADMIN for day-to-day activities in production environments.
Instead, use it to create database users with the minimum privilege set required for their duties (for example, user administration, system administration). Then deactivate DBADMIN. You may temporarily reactivate the DBADMIN user for emergency or bootstrapping tasks.
You can also create alternative ADMIN User ,follow official guide for HANA Database Users.
Create Users and Manage Roles and Privileges
User Management with the SAP HANA Database Administrator DBADMIN
Thank you for reading this blog post. If you find this material useful then please leave your feedback in the comments section below.
Kindly let me know if you need any further assistance in comments section below.
Also ‘Like’ ,‘Share’ , ‘Follow’ me to get new updates.