Sap Hana Cloud Tutorial
Sap Hana Cloud Tutorial
i
SAP HANA Cloud
Audience
This tutorial has been prepared for anyone who has a basic knowledge of SQL and
Database Cloud concepts. After completing this tutorial, you will find yourself at a
moderate level of expertise in administration of HANA Cloud environment.
Prerequisites
Before you start proceeding with this tutorial, we assume that you are well-versed with
basic database concepts. You should have a good exposure to SQL, and other Cloud based
platforms.
All the content and graphics published in this e-book are the property of Tutorials Point (I)
Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish
any contents or a part of contents of this e-book in any manner without written consent
of the publisher.
We strive to update the contents of our website and tutorials as timely and as precisely as
possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt.
Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our
website or its contents including this tutorial. If you discover any errors on our website or
in this tutorial, please notify us at [email protected]
ii
SAP HANA Cloud
Table of Contents
About the tutorial ............................................................................................................................................ ii
Audience .......................................................................................................................................................... ii
Prerequisites .................................................................................................................................................... ii
iii
SAP HANA Cloud
iv
1. SAP HANA Cloud — Overview SAP HANA Cloud
SAP HANA Cloud platform is could-based Database service hosted as Platform-as-a service
and provides in-memory HANA database management capabilities in single cloud solution
for all the application requirements. You can experience the power features of HANA
database on cloud platform. You can extend your on-premise landscape to HANA cloud or
can also deploy HANA cloud as standalone solution for data needs.
As cloud-based Database platform, you can integrate the data from different streams and
sources and in memory engine allows you to make faster decision based on live data.
Using SAP HANA cloud, you can store, access and execute data processing at one place
and HANA columnar data processing enables processing of data in real time. It provides
you the benefits such as software updates, elasticity, low cost of ownership to maintain
the platform.
This diagram describes the key features of SAP HANA cloud platform. With availability of
SAP HANA cloud, you can bind SAP applications running on cloud platform to HANA
database. You can also manage how to access HANA database using variety of user
interface tools available in HANA cloud platform.
1
SAP HANA Cloud
2
2. SAP HANA Cloud — Benefits SAP HANA Cloud
SAP HANA cloud platform enables you to access the data stored in HANA database in real
time and to bind the application hosted on cloud or on-premise. HANA cloud provides
better efficiency, governance and compliance, low cost of ownership and faster ROI. SAP
HANA in-memory column-based database improves the flexibility, memory, performance,
and data visualizations in real time.
Following are the key benefits of using SAP HANA Cloud platform:
Easy Integration
3
SAP HANA Cloud
You can easily integrate data from on-premise applications, non-SAP and SAP applications
to Cloud based HANA platform. You can easily manage life cycle service, business
processes in real time, HANA application platform, automation of few processes and
connectivity between HANA cloud and on-premise applications securely.
Parallel Processing
Based on columnar based storage, SAP HANA platform allows you to perform parallel and
multiprocessing of data. All the aggregations can be performed during run time due to
highly efficient HANA processing engines.
Storage
HANA column-based storage allows you to store large volume of data, manage
unstructured data, binding the database to Cloud.
Predictive Analysis
With the use of in-memory engine, business users can access to real time data and perform
different analytics functions:
4
3. SAP HANA Cloud — Architecture SAP HANA Cloud
SAP HANA cloud is a platform as a service solution to provide the in-memory columnar
based Database engine for development and runtime on Cloud applications. Developers
can easily create scalable, an interactive and efficient applications on top of HANA DB.
Developers can use different scenarios on SAP HANA Cloud platform for application
development:
In below architecture diagram, you can see the basic approach of SAP HANA cloud
platform:
5
SAP HANA Cloud
Developer Experience
To start with application development on HANA based platform, developers should set few
of the perquisites to use Cloud-based platform like Eclipse based features. SAP HANA
Native Storge Extension is enabled by default in HANA Cloud. DB developers can select
6
SAP HANA Cloud
specific tables, columns to use Native storage. Initial size of NSE is 10% of HANA cloud
instance memory size however this can also be changes after instance creation.
For Example,
SAP NSE SAP HANA in-memory NSE Data Total SAP HANA
HANA Buffer data (compressed) Volume Database Data
Memory Cache Size Size
60 GB 6 GB 30 GB - 6 GB (24 GB) 48 GB 72 GB
7
4. SAP HANA Cloud — Key capabilities SAP HANA Cloud
SAP HANA Cloud is based on Business Technology platform and powered by strong HANA
in-memory database engine. Below listed key capabilities of HANA Cloud:
Centrally Stored
Centrally stored with data coming from multiple data sources. Simplified and streamlined
access of all data in one storage solution. Fix the issues like data duplication using SAP
HANA smart data integration and virtualization options.
High Performance
Easy scaling up/down with no additional costs and process both transactional and
analytical data. High compute and storage.
Application Development
Using HANA cloud, you can easily develop SAP and custom applications. Scalable query
engine and support.
Security
Data protection capabilities, security logging and analytics for system event and logs.
8
SAP HANA Cloud
SAP HANA Cloud platform can be used with below 3 main capabilities:
9
5. SAP HANA Cloud — Enabling Trial SAP HANA Cloud
SAP provides 30 days fee trial for HANA cloud and this can be extended up to 365 days.
It includes starter scenarios and you can extend your on-premise solution to cloud or can
use HANA cloud as single solution for deploying your application.
https://www.sap.com/products/hana/cloud-trial.html
Click on Get started with a 30-day trial, to setup the trial it involves 3 steps:
Registration
Verify your email
Access all Resources
For registration, you need to provide a valid email address, First Name, Last Name,
Company, Country, Phone# and Relations to SAP. Provide the password at the time of
registration and after Accepting Terms and Conditions, click on Submit button.
If you are already an existing user, you can use Login option on right to directly login to
HANA Cloud platform.
10
SAP HANA Cloud
After completing the registration, you will get a welcome email on your provided email ID.
It guides you to access the HANA Cloud URL login using below options:
SAP BTP trial home page Next is to Click on the "Enter Your Trial Account" button. This
takes you to the SAP Business Technology Platform Cockpit.
11
SAP HANA Cloud
Click on "SAP HANA Cloud" in the left navigation menu Access your trial.
Access your Trial Option-> Once you click on any of the link, it will take you to Logon page
where you need to pass your email ID and password provided during registration step.
Next is to accept the Legal disclaimers for SAP BTP Trial as below Accept. This will load
SAP BTP cockpit and you will land on below page.
12
SAP HANA Cloud
Once you are logged in, you will see SAP BTP cockpit home page with your Global Account
number. Click on top right icon to see validity of your trial period. When your trial expires,
your application hosted on HANA cloud will stop working however your data will not be
deleted. You have an option to extend the trial up to 365 days as below:
Trial account is usually recommended for personal use and exploration of features and not
for Production or team use. Use of platform resources and services are restricted in Trial
account and you can explore basic features of SAP BTP platform. Following are key features
related to HANA Cloud Trial account:
SAP offer BTP trial accounts in multiple regions. When you login to Trial account, it
shows you the region in which the account is created.
13
SAP HANA Cloud
Trial also allows you to use both productive and beta services.
You can use 2 configured on-premise systems with the Cloud connector.
In Trial account, SAP doesn’t provide SLA's regarding availability of Cloud platform
as it is recommended only for personal use.
14
6. SAP HANA Cloud — Price Detail SAP HANA Cloud
Your Selection
Buyer Information
Payment Information
Confirm
To make the selection, enter the Product name as below and Search. This will load all the
matching options available in SAP Store. Select SAP HANA Cloud and provide the necessary
details as requested and this will enable your enterprise HANA Cloud account.
15
SAP HANA Cloud
16
7. SAP HANA Cloud — Integration with Other SAP HANA Cloud
apps
SAP HANA cloud platform as a Service provides an easy way to integrate your existing SAP
and non-SAP applications to your business landscape. There are different scenarios which
can be used to integrate HANA Cloud platform with On-premise and Cloud apps.
1. Cloud to Cloud
2. Cloud to On-premise
3. On-premise to On-premise
4. Hybrid model
17
8. SAP HANA Cloud — Connector (HCC) SAP HANA Cloud
To connect your HANA Cloud platform with an on-premise system, you can install HANA
Cloud connector and configure it to communicate with HANA Cloud platform. HANA Cloud
Connector is required for accessing on-premise NetWeaver Gateway and to develop a
custom application using IDE. To use HANA Cloud Connector with SAP HANA Cloud
platform, you must have HANA Cloud account.
You can download HANA Cloud connector HCC v2.9 or higher from this link:
https://tools.hana.ondemand.com/#cloud.
As perquisite you should have JAVA JDK installed on your VM/on-premise system or you
can also install SAP JDK8. By default, it uses port 8443 and proceed with installation steps.
Once HCC is installed, you have to start the Connector service by navigating to
Services.msc on your system.
18
SAP HANA Cloud
On SAP HANA cloud Administrator page, you need to provide details of your Cloud platform
landscape. Below information is required:
19
9. SAP HANA Cloud — Connecting an On- SAP HANA Cloud
premise NW system
You can configure your HANA Cloud connector to connect to your on-premise NetWeaver
Gateway system. Once you install HANA Cloud Connector, navigate to Administrator page
and clock on Cloud to On-premise option in left side menu.
To add an On-premise gateway, click on “+” icon as shown and this will open a new window
to provide details of your NetWeaver Gateway system Next.
In next step, you need to provide Protocol for communication with on-premise system:
20
SAP HANA Cloud
In next step, you need to provide NetWeaver Gateway system details and Port# Next.
You have to provide Host name for your Virtual server however Port number remains
same. Virtual Host name can be anything that is used to identify the system in HCC
configuration.
21
SAP HANA Cloud
Provide Principal Type, you can keep it as default if you are using HTTP communication,
pass the description in Next window Next.
22
SAP HANA Cloud
To test the connection, click on check box “Check Internal Host” and click on finish button
to complete the connection. You can also add Resources Accessible on NetWeaver Gateway
system by clicking on “+” icon.
Provide a forward slash (/) in URL Path option Select the checkbox “Path and sub-paths”
Save.
23
10. SAP HANA Cloud — Data Lake SAP HANA Cloud
Data lake is one of fully integrated key component of SAP HANA Cloud platform, which
stores all structured, unstructured data files and shares common security and tools as
HANA Cloud. Data lake IQ component provides the high-performance SQL analysis on
large volume of data stored in Data lake.
HANA Cloud data lake is usually managed and queried using SAP HANA Cloud SQL
statements and data lake SQL statements. When you create a data lake instance, several
things occur automatically.
24
SAP HANA Cloud
This creates a container in data lake called “SYSRDL#CG”. It also creates a schema with
the same name as the container is created. The container is managed and owned by
schema and it resides all tables, views and indexes.
In HANA Cloud instance, a remote source named “SYSRDL#CG_SOURCE” also exists which
is used to connect the instance to data lake. All query and data management in data lake
is performed via SAP HANA Cloud platform.
To create a Data lake, you can either choose to create the data lake with instance creation
or you can do after the instance is created. To enable data lake after your instance is
provisioned, navigate to Manage HANA Cloud option in SAP HANA Cloud cockpit.
Click on 3 dots (…) on HANA Database instance and this will open side menu Add Data
Lake. Provide the Instance Name and description of your data lake. If you are using Trial
account, you won’t be able to modify the Data Lake values for Storage, vCPU’s Save.
25
SAP HANA Cloud
You can create tables, views, access the data reside on HANA Cloud data lake using
Database Explorer option as mentioned. Navigate to Instance associated with specific
data lake that you want to explore and click on “Action” button.
This will open a new tab to run SQL queries known as “Database Explorer” Using this
you can create new tables, access data in HANA Cloud data lake. To view the tables
created in Data lake, right-click on “Remote Sources” option under the Catalog option of
the Database instance.
26
SAP HANA Cloud
You can also create Remote Source using SQL query as below by setting an ODBC
connection to HANA database:
How to Execute a data lake SQL statement in Data lake IQ (HANA DB-managed): You can
connect to SAP HANA database, and use the REMOTE_EXECUTE procedure as below:
While using REMOTE_EXECUTE procedure, SQL query must be enclosed with single quotes.
Below shows SQL query to create Table and View in Data Lake:
27
SAP HANA Cloud
28
11. SAP HANA Cloud — Data Lake Components SAP HANA Cloud
Data Lake IQ
Data Lake Files
Data Lake IQ
Data Lake IQ is used to store and analyze huge amount of structured data. It is cost
effective solution to maintain high performance efficient SQL access to data. When you
provision a data lake in HANA DB instance, it by default enables Data Lake IQ with that.
You can make a direct connection to Data Lake IQ using any of client tool:
To connect to Data Lake IQ, you can use any of mentioned IQ clients enabling data lake
IQ component. These perquisites should be met- The data lake instance has been created
and IP address is allowed to access the data lake IQ.
Select “HANA DATALAKE CLIENT 1.0” Select OS from the dropdown list and click the zip
file to download. To connect to Data Lake, follow the steps.
29
SAP HANA Cloud
Click on Interactive SQL icon select the Data base type “Data Lake IQ” and provide your
username- “HDLADMIN” and password which you provided while creating Data Lake
instance.
Pass the instance details of Data Lake and provide in Connection parameters Connect.
:r <filename>
:R <filename>
This command is used to read an OS file into the command buffer then shows the
command.
use <database_name>
!! <os_command>
<file_name>
select @@version
go > <file_name>
>> <file_name>
This command appends the output of the Transact-SQL command to <file_name>. This
example appends the instance version to <file_name>:
select @@version
go >> <file_name>
| command
It pipes the output of the Transact-SQL command to an external command. This example
finds all instances of “sa” in the listing produced by sp_who:
sp_who
go | grep sa
30
SAP HANA Cloud
Reset
Quit or exit
It exits isql.
You can use Load table statement to query the store object files without need of loading
them in Data Lake IQ. When you provision a Data Lake instance, Files container is also
provisioned that time without any additional cost and you just need to pay storage cost
for the files stored in Object Store.
The data lake Files container is the repository where data lake IQ stores auditing files and
diagnostic logs. This storage isn’t optional – data lake IQ always uses the data lake Files
container for auditing and diagnostic files.
31
12. SAP HANA Cloud — Connect to HANA Cockpit SAP HANA Cloud
You can connect to HANA Cockpit using SAP BTP cockpit. Login to SAP BTP account and
click on subaccount -> Trial and navigate to Cloud Foundry.
Once you click on Dev space Service Instances (You should have an existing HANA
Database instance) and click on Open Dashboard button icon under Actions and click on
Authorize to allow access to HANA Cockpit access.
32
SAP HANA Cloud
This will open SAP HANA service BTP dashboard and you can also see SAP HANA Cockpit
option and HDB instance ID at the top.
Click on SAP HANA Cockpit icon at the right top and provide user name & password to
login to HANA Cockpit OK.
33
13. SAP HANA Cloud — SAP BTP service SAP HANA Cloud
SAP Business Technology platform (BTP) is an integrated platform for business where they
can integrate, extend data to value from all different multiple hosted applications and with
ability to perform database management, app development and analytics capability at one
place. SAP HANA Cloud platform is part of SAP BTP cockpit service only.
You can access SAP BTP trial from this link - https://www.sap.com/cmp/td/sap-cloud-
platform-trial.html and explore the key features:
BTP platform for developing and deploying your first cloud application
Leveraging BTP platform for creating interactive UI’s and apps using guided tutorial
from SAP
34
SAP HANA Cloud
To via all the available documentation, Release notes, Tools, Support, SAP store, etc., you
can navigate to Useful links option on left bottom in your trial subscription.
To view list of all services available via BTP platform, navigate to Services -> Service
Market Place. To access HANA Cloud platform, search for SAP HANA Cloud and click on
create on “…” button to create an Instance.
35
SAP HANA Cloud
36
14. SAP HANA Cloud — Binding Applications SAP HANA Cloud
After creating SAP HANA Cloud instance in Foundry space, you can bind an application
using BTP cockpit. Applications are usually bind to HANA cloud platform using a schema
or HDI container. You can assign a schema or HDI container to an application by assigning
service plan to your database.
To setup a schema or HDI container, you need to navigate to HANA Cloud platform
Cloud Foundry Space Services Service Marketplace.
Note: One of perquisites of setting up schema or HDI container is that you have an
enterprise account and have added schema or HDI-shared plan under Entitlements.
After navigating to Service Market Place, select SAP HANA Schemas & HDI Containers
Create Instance.
37
SAP HANA Cloud
Next is to select the Service plan as shown from the list or HDI-shared service plan to
create HDI Container click on “…” Create.
Select the Plan, Space and provide the Instance Name Next.
Pass the parameters as per requirement Next Create. You will get a message, Service
instance creation is in progress. You can view the instance and its current status on
the Instances and Subscriptions page.
38
SAP HANA Cloud
To check the instance status, navigate to Instances and Subscriptions option under
Services. Status tab shows the instance status if successfully created.
To bind your application to SAP HANA Cloud instance via SAP HANA Schemas & HDI
Containers, Navigate to Cloud Foundry space Applications and this will show you the list
of all applications to which the selected application is currently bound.
Select Service Bindings Service Type tab, select the Service from the catalog radio
button and choose Next select SAP HANA Schemas & HDI Containers Select Service
Plan Finish
After creating binding, you have to restart the application. Navigate to Cloud Foundry ->
Applications and click on Stop.
39
SAP HANA Cloud
40
15. SAP HANA Cloud — Migration SAP HANA Cloud
There are various benefits that you can achieve if you migrate your existing applications
to HANA Cloud platform. You have an option to scale your data storage requirement and
pay only for storage and compute you need. With HANA cloud, you have an inbuild HANA
Cloud data lake and you can choose between multi cloud like Amazon and Azure services.
Before you plan migration to HANA Cloud platform, you need to perform assessment of
HANA Cloud capabilities, define different steps and plan the migration tasks under each
phase and effort required to perform the migration.
You can migrate HANA database using migration wizard in BTP Cockpit.
Note: If you don’t complete the migration within 60 days then it will be automatically
archived.
To start with migration, navigate to SAP BTP cockpit Cloud Foundry Space.
Navigate to SAP HANA Cloud migration Select New Migration and provide the migration
details Create.
41
SAP HANA Cloud
Under Plan section, select the Source system details and perform the compatibility check
by clicking “Check Compatibility with SAP HANA Cloud”. Follow the steps as per Migration
wizard and finish the migration.
42
16. SAP HANA Cloud — Self-service Tool SAP HANA Cloud
There is a Self-service tool from SAP which you can use to migrate HANA Database Service
to HANA cloud platform. This tool performs the compatibility of HANA Database with SAP
HANA Cloud platform and identifies which DB objects can be migrated directly and which
needs configuration and migration to be handled manually.
To use Self Service tool, HANA service instance must be having HANA database revision
53 or later and it only supports migration for HANA database running in cloud Foundry
hosted in Amazon Web Service. Self-Service tools can migrate Database schemas, DB
objects, data stored in HANA DB. You can generate a report in Self-service tool which
shows you all the objects which are migrated and features which cannot be automatically
migrated and also provides details to make your implementation work in HANA Cloud
platform.
43
17. SAP HANA Cloud — Creating Instance SAP HANA Cloud
To create an instance of SAP HANA Cloud in Cloud Foundry, you have to ensure that
subaccount is created in Global account and space exists in subaccount. Cloud Foundry
support is also enabled inside subaccount.
To create HANA DB instance, navigate to SAP BTP cockpit Cloud Foundry space SAP
HANA Cloud.
This will take you to SAP HANA Cloud Central page, Go to Create From drop down Select
SAP HANA Database to create an instance. You can select the Organization and Space
where you want to create this instance.
44
SAP HANA Cloud
Space - This shows Space name in Cloud Foundry under which this DB instance is
created
Instance Name - Provide the name of instance. Note that the name of instance
should start and end with an alphanumeric character and it can include the
underscore character _.
As per password policy - The password must have at least 8 characters and
comprise at least one uppercase letter, two lowercase letters, and at least one
number. The password must not include the user name, the characters ' " ` \ ; [ ],
or control characters, such as newline, backspace, tab.
45
SAP HANA Cloud
Memory - Provide the memory size for your HANA Database instance.
Note: If you are using Microsoft Azure, you can select from 32 GB to 3776 GB of
memory and AWS, you can select from 30 GB to 3600 GB of memory.
Compute - Provide the number of vCPU for SAP HANA database. This is usually
allocated as per size of memory assigned.
Storage - This is available storage space for SAP HANA database. This is
allocated as per memory size of HANA database.
Provide Advance parameters for HANA Database and also for Data Lake if required and
click on Create instance. This will create HANA DB instance in your HANA Cloud platform.
46
18. SAP HANA Cloud — Creating Data Lake SAP HANA Cloud
instance
You can create a data lake to efficiently and securely store, manage, and analyze large
amounts of structured, semi-structured, and unstructured data.
To create a Data Lake instance using SAP BTP cockpit. Navigate to SAP BTP cockpit
Select SAP HANA Cloud Create Data Lake.
Location Details
Organization - Provides the name of Cloud Foundry organization under which the
instance is created.
Space - Provides the name of Cloud Foundry space under which the instance is
created.
47
SAP HANA Cloud
Basic Settings:
Instance Name- Provide the name of Data Lake instance (The instance name
must start and end with alphanumeric characters and can include "-", "_", and "."
characters).
Note: Name of Data Lake instance must be different from the name of SAP HANA
DB instance.
48
SAP HANA Cloud
Provide other parameters like Connection allowed, Data Lake IQ settings and click on
Create instance. This will create a new Data Lake instance in HANA Cloud platform.
49
19. SAP HANA Cloud — Managing Instance SAP HANA Cloud
There is need to administrator and manage SAP HANA Cloud instance for Database and
Data Lake. To manage the instance, navigate to SAP STP cockpit and navigate to SAP
HANA Cloud Central.
View all SAP HANA Cloud instances that you have access
To find an instance using instance ID assigned
To create SAP HANA Cloud instances
To stop and start an instance
To check the instance status
To review all the alerts and notifications
To check memory, compute, and storage consumption.
To make changes to an instance or deleting the instances
To open HANA DB instance in SAP HANA cockpit and SAP HANA database explorer
page
To open Data Lake instance in Database Explorer page
To Manage SAP HANA Cloud instance, navigate to SAP BTP cockpit Cloud Foundry space
and choose SAP HANA Cloud.
50
20. SAP HANA Cloud — Creating Tables SAP HANA Cloud
You can create tabled in SAP HANA Cloud platform and load the data from various sources.
Data load can be performed using SQL console option in Database Explorer. Usually two
types of Database tables can be created.
Physical or logical Tables- You can load and query data as normal DB tables
Virtual Tables- These tables usually point to remote sources
Tables can be created at design time using SAP Web IDE and deploy using HANA
Deployment infrastructure.
To create table, navigate to HANA Database Explorer and open your SAP HANA database
instance. SAP HANA Database Explorer can be opened from “Actions” menu of SAP HANA
Cloud instance Execute SQL and explore Objects.
This will open SAP HANA Database Explorer in a new tab. For first time access, provide
Database username and password.
In HANA Database Explorer, you can view the Databases available in your HANA Cloud
platform. Each instance has its own Catalog Navigate to Catalog tab of HANA DB and
you can interact with the data in Database or create new tables/schemas or DB views.
Open an SQL console from the HANA Database Explorer by right-clicking on Database
instance Open SQL Console. Below functions can be performed:
51
SAP HANA Cloud
Ex: CREATE COLUMN TABLE TEST1.Test (Pincode CHAR(5) PRIMARY KEY, City CHAR (30)
NOT NULL, Country CHAR(10) NOT NULL);
To insert the data into the tables, you can use INSERT statement:
Ex:
52
21. SAP HANA Cloud — Success Stories SAP HANA Cloud
SAP HANA Cloud provides geospatial capabilities, Adaptive Server Enterprise, scalable
HANA cloud solution for app development, extending current on-premise landscape to
Cloud solution, Data Lake capabilities to take the analytics to new levels. You can extend
SAP HANA on-premise system to HANA Cloud and this allows SAP HANA Cloud and On-
premise landscape can be used together in a hybrid landscape.
https://saphanajourney.com/customer-stories/
53
22. SAP HANA Cloud Administrator — SAP HANA Cloud
Responsibilities
Experience with integrating SAP Cloud Platform with different modules like HCM,
Sales Force, Success Factor and other ECC modules
Experience with one or more Hyper scalers cloud platform Azure, AWS, GCP- at
least of the mentioned preferred
SAP HANA Cloud platform sizing for customer specific application development
and Analytics scenarios
54