Professional Documents
Culture Documents
SAP HANA 2.0 - An Introduction (2019)
SAP HANA 2.0 - An Introduction (2019)
SAP HANA®2.0
An Introduction
~ Rheinwerk
Pub sh ng
Contents
Preface ..................................................................................................................................................... 17
1 Introduction 27
2 Technology Overview 51
7
Contents Contents
2.2 System Architecture Overview ..................................................................................... 57 3.3 SAP HANA Lifecycle Management ............................................................................... 130
2.2.1 Implementation Scenarios ............................................................................... 57 3.3.1 Platform Lifecycle Management ..................................................................... 131
2.2.2 Services and Processes ....................................................................................... 58 3.3.2 Product Availability Matrix ............................................................................... 133
2.2.3 Memory and Persistence ................................................................................... 62 3.3.3 Installation and Update ..................................................................................... 135
2.2.4 Single-Host and Distributed Systems ........................................................... 63 3.3.4 Application Lifecycle Management ................................................................ 139
2.2.5 Database and Application Server ................................................................... 65 3.4 Application Server Administration .............................................................................. 141
2.2.6 Data Tiering ........................................................................................................... 66
3.4.1 SAP HANA XS Admin Tool .................................................................................. 142
2.3 Editions .................................................................................................................................... 67 3.4.2 Deploying SAP HANA XS Advanced Applications ...................................... 142
2.3.1 SAP HANA, Platform Edition ............................................................................. 67 3.5 Summary ................................................................................................................................. 145
2.3.2 SAP HANA, Express Edition ............................................................................... 67
2.3.3 SAP HANA, Cloud Edition ................................................................................... 68
2.3.4 Licensing, Options, and the Feature Scope Description .......................... 68
2.4 What’s New: Support Package Stacks and Revisions ......................................... 70
4 Development 147
3.2 System Administration ..................................................................................................... 105 4.6 SAP HANA Deployment Infrastructure ...................................................................... 171
3.2.1 System Configuration ......................................................................................... 105 4.7 Application Lifecycle Management ............................................................................. 173
3.2.2 Performance Monitoring and Analysis ......................................................... 108 4.8 JSON Document Store ....................................................................................................... 174
3.2.3 Resource Management ...................................................................................... 118
4.9 SAP Cloud Platform ............................................................................................................. 177
3.2.4 Security .................................................................................................................... 123
4.9.1 Cloud Foundry and Neo ...................................................................................... 178
3.2.5 Backup and Recovery .......................................................................................... 124
4.9.2 SAP Cloud Application Programming Model ............................................... 179
3.2.6 Additional Responsibilities ............................................................................... 129
4.9.3 SAP Cloud Platform, SAP HANA Service ........................................................ 180
8 9
Contents Contents
2.2 System Architecture Overview ..................................................................................... 57 3.3 SAP HANA Lifecycle Management ............................................................................... 130
2.2.1 Implementation Scenarios ............................................................................... 57 3.3.1 Platform Lifecycle Management ..................................................................... 131
2.2.2 Services and Processes ....................................................................................... 58 3.3.2 Product Availability Matrix ............................................................................... 133
2.2.3 Memory and Persistence ................................................................................... 62 3.3.3 Installation and Update ..................................................................................... 135
2.2.4 Single-Host and Distributed Systems ........................................................... 63 3.3.4 Application Lifecycle Management ................................................................ 139
2.2.5 Database and Application Server ................................................................... 65 3.4 Application Server Administration .............................................................................. 141
2.2.6 Data Tiering ........................................................................................................... 66
3.4.1 SAP HANA XS Admin Tool .................................................................................. 142
2.3 Editions .................................................................................................................................... 67 3.4.2 Deploying SAP HANA XS Advanced Applications ...................................... 142
2.3.1 SAP HANA, Platform Edition ............................................................................. 67 3.5 Summary ................................................................................................................................. 145
2.3.2 SAP HANA, Express Edition ............................................................................... 67
2.3.3 SAP HANA, Cloud Edition ................................................................................... 68
2.3.4 Licensing, Options, and the Feature Scope Description .......................... 68
2.4 What’s New: Support Package Stacks and Revisions ......................................... 70
4 Development 147
3.2 System Administration ..................................................................................................... 105 4.6 SAP HANA Deployment Infrastructure ...................................................................... 171
3.2.1 System Configuration ......................................................................................... 105 4.7 Application Lifecycle Management ............................................................................. 173
3.2.2 Performance Monitoring and Analysis ......................................................... 108 4.8 JSON Document Store ....................................................................................................... 174
3.2.3 Resource Management ...................................................................................... 118
4.9 SAP Cloud Platform ............................................................................................................. 177
3.2.4 Security .................................................................................................................... 123
4.9.1 Cloud Foundry and Neo ...................................................................................... 178
3.2.5 Backup and Recovery .......................................................................................... 124
4.9.2 SAP Cloud Application Programming Model ............................................... 179
3.2.6 Additional Responsibilities ............................................................................... 129
4.9.3 SAP Cloud Platform, SAP HANA Service ........................................................ 180
8 9
Contents Contents
4.10 Client Interfaces ................................................................................................................... 181 5.3 Spatial Data Processing .................................................................................................... 228
4.10.1 SAP HANA Client Installation ........................................................................... 181 5.4 Graph Data Processing ...................................................................................................... 232
4.10.2 SQLDBC .................................................................................................................... 183
5.5 Series Data Processing ....................................................................................................... 235
4.10.3 JDBC .......................................................................................................................... 183
4.10.4 ODBC ........................................................................................................................ 184 5.6 Text Analytics and Search ................................................................................................ 237
4.10.5 ODBO ........................................................................................................................ 187 5.6.1 Search ....................................................................................................................... 238
4.10.6 Python ...................................................................................................................... 188 5.6.2 Text Analysis .......................................................................................................... 240
4.10.7 Node.js ..................................................................................................................... 190 5.6.3 Text Mining ............................................................................................................ 242
4.10.8 Go .............................................................................................................................. 192 5.7 SAP HANA Streaming Analytics .................................................................................... 243
4.10.9 ADO.NET .................................................................................................................. 193
4.10.10 Ruby .......................................................................................................................... 194
5.8 Summary ................................................................................................................................. 246
4.13 SAP HANA Interactive Education ................................................................................. 206 6.2 User Management .............................................................................................................. 251
4.13.1 Deployment Options .......................................................................................... 207 6.2.1 Implementation Scenarios ................................................................................ 252
4.13.2 Getting Started ..................................................................................................... 208 6.2.2 User Types and User Groups ............................................................................. 254
6.2.3 Authentication ...................................................................................................... 256
4.14 Summary ................................................................................................................................. 210
6.2.4 Authorization ......................................................................................................... 261
6.3 Data Privacy and Protection ........................................................................................... 268
6.3.1 Data Masking ......................................................................................................... 268
5 Advanced Analytics 213 6.3.2 Data Anonymization ........................................................................................... 270
6.3.3 Encryption ............................................................................................................... 271
5.1 Roles and Tools ..................................................................................................................... 215 6.4 Auditing ................................................................................................................................... 278
5.1.1 The SAP HANA Data Scientist .......................................................................... 215
6.5 SAP HANA XS Security ....................................................................................................... 281
5.1.2 Tools ......................................................................................................................... 215
6.6 Additional Security Considerations and Concerns ............................................... 281
5.2 Predictive Analytics and Machine Learning ............................................................ 218
5.2.1 Application Function Library ............................................................................ 220 6.7 Summary ................................................................................................................................. 282
5.2.2 Predictive Analysis Library ................................................................................. 220
5.2.3 R Integration .......................................................................................................... 222
5.2.4 External Machine Learning Library ................................................................ 225
5.2.5 Automated Predictive Library .......................................................................... 227
10 11
Contents Contents
4.10 Client Interfaces ................................................................................................................... 181 5.3 Spatial Data Processing .................................................................................................... 228
4.10.1 SAP HANA Client Installation ........................................................................... 181 5.4 Graph Data Processing ...................................................................................................... 232
4.10.2 SQLDBC .................................................................................................................... 183
5.5 Series Data Processing ....................................................................................................... 235
4.10.3 JDBC .......................................................................................................................... 183
4.10.4 ODBC ........................................................................................................................ 184 5.6 Text Analytics and Search ................................................................................................ 237
4.10.5 ODBO ........................................................................................................................ 187 5.6.1 Search ....................................................................................................................... 238
4.10.6 Python ...................................................................................................................... 188 5.6.2 Text Analysis .......................................................................................................... 240
4.10.7 Node.js ..................................................................................................................... 190 5.6.3 Text Mining ............................................................................................................ 242
4.10.8 Go .............................................................................................................................. 192 5.7 SAP HANA Streaming Analytics .................................................................................... 243
4.10.9 ADO.NET .................................................................................................................. 193
4.10.10 Ruby .......................................................................................................................... 194
5.8 Summary ................................................................................................................................. 246
4.13 SAP HANA Interactive Education ................................................................................. 206 6.2 User Management .............................................................................................................. 251
4.13.1 Deployment Options .......................................................................................... 207 6.2.1 Implementation Scenarios ................................................................................ 252
4.13.2 Getting Started ..................................................................................................... 208 6.2.2 User Types and User Groups ............................................................................. 254
6.2.3 Authentication ...................................................................................................... 256
4.14 Summary ................................................................................................................................. 210
6.2.4 Authorization ......................................................................................................... 261
6.3 Data Privacy and Protection ........................................................................................... 268
6.3.1 Data Masking ......................................................................................................... 268
5 Advanced Analytics 213 6.3.2 Data Anonymization ........................................................................................... 270
6.3.3 Encryption ............................................................................................................... 271
5.1 Roles and Tools ..................................................................................................................... 215 6.4 Auditing ................................................................................................................................... 278
5.1.1 The SAP HANA Data Scientist .......................................................................... 215
6.5 SAP HANA XS Security ....................................................................................................... 281
5.1.2 Tools ......................................................................................................................... 215
6.6 Additional Security Considerations and Concerns ............................................... 281
5.2 Predictive Analytics and Machine Learning ............................................................ 218
5.2.1 Application Function Library ............................................................................ 220 6.7 Summary ................................................................................................................................. 282
5.2.2 Predictive Analysis Library ................................................................................. 220
5.2.3 R Integration .......................................................................................................... 222
5.2.4 External Machine Learning Library ................................................................ 225
5.2.5 Automated Predictive Library .......................................................................... 227
10 11
Contents Contents
12 13
Contents Contents
12 13
Contents Contents
9.4 On-Premise SAP HANA ..................................................................................................... 350 10 Training and Support 381
9.4.1 Appliance ................................................................................................................ 350
9.4.2 Tailored Data Center Integration ................................................................... 351
10.1 Training .................................................................................................................................... 381
9.5 Hardware Technologies ................................................................................................... 352 10.1.1 SAP Education ........................................................................................................ 382
9.5.1 Intel Optane Persistent Memory .................................................................... 353 10.1.2 openHPI and openSAP ........................................................................................ 391
9.5.2 IBM Power Systems ............................................................................................. 355 10.1.3 SAP HANA Academy ............................................................................................ 396
9.6 Operating System Platforms .......................................................................................... 356 10.1.4 SAP Developer Center ......................................................................................... 399
9.6.1 SUSE .......................................................................................................................... 357 10.2 SAP Services and Support ................................................................................................. 400
9.6.2 Red Hat .................................................................................................................... 358 10.2.1 SAP Digital Business Services ........................................................................... 401
9.7 Infrastructure-as-a-Service Providers ........................................................................ 360 10.2.2 SAP Support ............................................................................................................ 401
9.7.1 Amazon Web Services ........................................................................................ 360 10.2.3 SAP Help Portal ...................................................................................................... 405
9.7.2 Microsoft Azure .................................................................................................... 362 10.2.4 SAP ONE Support Launchpad ........................................................................... 408
9.7.3 Google Cloud Platform ....................................................................................... 362 10.3 SAP Community .................................................................................................................... 411
9.7.4 Public Cloud Providers ........................................................................................ 364
10.4 SAP Events .............................................................................................................................. 413
9.8 Migration ................................................................................................................................ 364 10.4.1 SAPPHIRE NOW ..................................................................................................... 413
9.8.1 AnyDB to SAP HANA ............................................................................................ 365 10.4.2 SAP TechEd .............................................................................................................. 413
9.8.2 Software Update Manager Database Migration Option ........................ 366 10.4.3 CodeJams and SAP Inside Track ....................................................................... 415
9.8.3 Custom Applications ........................................................................................... 367 10.4.4 SAP HANA Operation Expert and Developer Summit .............................. 415
9.8.4 Third-Party Applications .................................................................................... 368
10.5 User Groups, Alliances, and More ................................................................................ 416
9.9 High Availability and Disaster Recovery ................................................................... 368 10.5.1 SAP User Groups ................................................................................................... 416
9.10 System Replication ............................................................................................................. 371 10.5.2 Customer Engagement Initiatives .................................................................. 417
9.10.1 Configuration ........................................................................................................ 371 10.5.3 SAP University Alliances and SAP HANA Database Campus .................. 417
9.10.2 Multitier and Multitarget .................................................................................. 372 10.5.4 HanaHaus and the Innovation Center Network ........................................ 418
9.10.3 Active/Active Read-Enabled System Replication ....................................... 373 10.5.5 SAPinsider Magazine and Conferences ......................................................... 418
9.11 Network Administration and Landscape Management .................................... 374 10.6 Summary ................................................................................................................................. 419
9.11.1 Network Administration ................................................................................... 375
9.11.2 SAP Landscape Management ........................................................................... 376
9.11.3 SAP Solution Manager ........................................................................................ 378 The Author ............................................................................................................................................. 421
9.12 Summary ................................................................................................................................. 379 Index ........................................................................................................................................................ 423
14 15
Contents Contents
9.4 On-Premise SAP HANA ..................................................................................................... 350 10 Training and Support 381
9.4.1 Appliance ................................................................................................................ 350
9.4.2 Tailored Data Center Integration ................................................................... 351
10.1 Training .................................................................................................................................... 381
9.5 Hardware Technologies ................................................................................................... 352 10.1.1 SAP Education ........................................................................................................ 382
9.5.1 Intel Optane Persistent Memory .................................................................... 353 10.1.2 openHPI and openSAP ........................................................................................ 391
9.5.2 IBM Power Systems ............................................................................................. 355 10.1.3 SAP HANA Academy ............................................................................................ 396
9.6 Operating System Platforms .......................................................................................... 356 10.1.4 SAP Developer Center ......................................................................................... 399
9.6.1 SUSE .......................................................................................................................... 357 10.2 SAP Services and Support ................................................................................................. 400
9.6.2 Red Hat .................................................................................................................... 358 10.2.1 SAP Digital Business Services ........................................................................... 401
9.7 Infrastructure-as-a-Service Providers ........................................................................ 360 10.2.2 SAP Support ............................................................................................................ 401
9.7.1 Amazon Web Services ........................................................................................ 360 10.2.3 SAP Help Portal ...................................................................................................... 405
9.7.2 Microsoft Azure .................................................................................................... 362 10.2.4 SAP ONE Support Launchpad ........................................................................... 408
9.7.3 Google Cloud Platform ....................................................................................... 362 10.3 SAP Community .................................................................................................................... 411
9.7.4 Public Cloud Providers ........................................................................................ 364
10.4 SAP Events .............................................................................................................................. 413
9.8 Migration ................................................................................................................................ 364 10.4.1 SAPPHIRE NOW ..................................................................................................... 413
9.8.1 AnyDB to SAP HANA ............................................................................................ 365 10.4.2 SAP TechEd .............................................................................................................. 413
9.8.2 Software Update Manager Database Migration Option ........................ 366 10.4.3 CodeJams and SAP Inside Track ....................................................................... 415
9.8.3 Custom Applications ........................................................................................... 367 10.4.4 SAP HANA Operation Expert and Developer Summit .............................. 415
9.8.4 Third-Party Applications .................................................................................... 368
10.5 User Groups, Alliances, and More ................................................................................ 416
9.9 High Availability and Disaster Recovery ................................................................... 368 10.5.1 SAP User Groups ................................................................................................... 416
9.10 System Replication ............................................................................................................. 371 10.5.2 Customer Engagement Initiatives .................................................................. 417
9.10.1 Configuration ........................................................................................................ 371 10.5.3 SAP University Alliances and SAP HANA Database Campus .................. 417
9.10.2 Multitier and Multitarget .................................................................................. 372 10.5.4 HanaHaus and the Innovation Center Network ........................................ 418
9.10.3 Active/Active Read-Enabled System Replication ....................................... 373 10.5.5 SAPinsider Magazine and Conferences ......................................................... 418
9.11 Network Administration and Landscape Management .................................... 374 10.6 Summary ................................................................................................................................. 419
9.11.1 Network Administration ................................................................................... 375
9.11.2 SAP Landscape Management ........................................................................... 376
9.11.3 SAP Solution Manager ........................................................................................ 378 The Author ............................................................................................................................................. 421
9.12 Summary ................................................................................................................................. 379 Index ........................................................................................................................................................ 423
14 15
Preface
Welcome to this introduction to SAP HANA. Since its fi rst release as an in-memory
compute engine in 2010, SAP HANA has quickly evolved into SAP's flagship product.
In fact, SAP HANA created a whole new product category, defined by the industry
analyst firm Gartner as hybrid transaction/analytical processing (HTAP) or as translyt-
ical by its competitor Forrester. Next-generation database, NewDB, and hybrid data-
base (HDB) were some of the names used internally at SAP before Vishal Sikka, SAP's
chief technology officer (CTO) at the time, decided to call the new technology after its
founder : "HAsso's New Architecture" {HANA} (we'll get into th is story in Chapter 1).
With in a few years, the SAP HANA database evolved into a complete in-memory plat-
form with its own built-in application server, text analytics, application and business
functions, predictive analysis, big data and Internet of Things (IoT) connectors, spa-
tial processing, a graph database, and much more.
Although SAP no longer presents itself as the cloud company powered by HANA- the
tagline has evolved into the experience company powered by the intelligent enter-
prise- the in-memory platform is still at the core of its products. From SAP S/4HANA,
to the SAP HANA Data Management Suite, to the SAP Cloud Platform- all is "po\',rered
by HANA." To further democratize in-memory computing, SAP HANA is now being
optimized (at the time of writing, summer 2019) to ru n in the cloud as SAP HANA
Cloud Services.
17
Preface
intelligent enterprise? What are the differences between SAP HANA extended applica-
tion services, classic model (SAP HANA XS), and SAP HANA extended application ser-
vices, advanced model (SAP HANA XS Advanced)? What is CDS, short for core data
services, and do we mean CDS for SAP HANA or CDS for ASAP? Those are two different
flavors, but it could also reference Core Data and Services vvhen used in the SAP Cloud
Application Programming Model.
Sounds confusing? If you'd like to get a grip on the SAP HANA technology and its
related product names, acronyms, and marketing lingo, this book is for you. By the
time you finish reading this book, we promise the previous paragraph will be per-
fectly clear. While we v.ron't go down to the code level, we will open the box, flip it
around, give it a good shake, and get to know SAP HANA inside out.
Personas
Software product managers use personas to represent the different ways people use
a product. The administrator, for example, is responsible for operations: monitoring
performance, making backups, provisioning new users. The developer writes code in
an integrated development environment (IDE). The job roles, responsibilities, and
tools used typically are quite different for each persona, although in some cases over-
lap may occur, for example, with DevOps (we'll cover all the terminology and con-
cepts throughout the book). In smaller organizations, the data integration architect
persona and the administrator persona might be the same person and simply repre-
sent a different hat that he or she puts on depending on the task at hand. In larger
organizations, security architects and data center operations may work in separate
teams, perhaps even housed in different buildings, with strictly defined responsibili-
ties.
The SAP HANA platform is comprehensive. The platform's documentation covers
well over 10,000 pages (not counting the cloud edition). Using personas helps us to
divide functionalities and responsibilities up since the roles typically are quite
18
Preface
distinct. In addition, using personas also safeguards against the constant change
inherent in the software industry. By the time this book is in the online store, new
featu res will have been added, product names may have been changed (again), and
older components may no longer be supported. What's unlikely to change any time
soon, however, are the roles of developers and administrators. Sure, the focus may be
on machine learning this year where it was IoT last, but overall, personas are a safe
bet.
Who, then, are the main protagonists of our story?
Chapter Overview
Our introduction to SAP HANA will proceed as follows:
• Chapter I: Introduction
We'll start off with the project manager, a general stakeholder that could be any-
one involved at a high level with the SAP HANA project but without any specific
technical involvement. Since Chapter 1 is about business, we'll be brief and get to
the point quickly. We'll explain what SAP HANA is; what its key capabilities are
(covering application development, advanced analytical processing, data manage-
ment and database management); and what its key benefits are. We'll look at cus-
tomer stories and use cases and listen to industry analysts. When you run a
business, you'll want to know about the road ahead and other aspects of the deal,
which we'll address in our discussion of road maps, licensing, and maintenance.
• Chapter 2: Technology Overview
In Chapter 2, we'll provide an overview of the technology, which will require a bit
more space. In this chapter, we'll cover in-memory database concepts; system
architectures (services and processes, memory and persistence, distributed sys-
tems, data tiering); editions; and deployment options (on-premise, cloud, hybrid).
While perhaps the most important chapter, if you're completely new to SAP
HANA, you might be a little ovenvhelmed by all the product names and technolo-
gies. Our advice is to do a quick read the first time, not necessarily making a full
stop at every acronym, then get to know the personas and optionally return to the
chapter again later. However, a clear picture of the SAP HANA architecture and its
evolution will help you understand how all the pieces fit together. Even if you
won't have a technical role, you'll need to communicate and relate to the work of
the different SAP HANA personas, and this chapter will give you a solid foundation
in that vocabulary.
19
Preface
• Chapter 3: Administration
In Chapter 3, we'll meet our first persona: the SAP HANA administrator. We'll cover
hov.r this role is defined and what tools can be used. We'll cover both command
line interfaces (CLis); the GU!s; and browser-based tooling like workbenches, stu-
dios, and cockpits. You'll learn how to configure system parameters, analyze per-
formance and address resource management, and make backups and perform
recoveries. In this chapter, we'll also describe how to install and update compo-
nents and applications; what is called, in SAP HANA terminology, platform lifecy-
cle management and application lifecycle management. \IVe'll cover how to
administer the database, the application server, and the platform as a whole.
• Chapter 4: Application Development
With our system up and running, we can then turn our attention to the developer
persona. The SAP HANA developer persona has two profiles: the information mod-
eling profile and the application development profile. Both the information mod-
eler and the application developer will require a good understanding of SAP HANA
as a relational database; of SQL; and of SQLScript, the language extension to code
business logic. With SAP HANA extended application services (SAP HANA XS),
both classic and advanced, you'll have an application development platform
where you can use the SAP HANA Deployment Infrastructure (HDI} to turn arti-
facts into containerized runtime objects. If this sounds a bit abstract to you, don't
worry! We'll explain how this all works and loop in ABAP Managed Database Pro-
cedures (AMDP}, OData, Info rmation Access (InA), CDS, JSON document stores,
SAP HANA-as-a-service, and an enterprise SAP Cloud Platform-as-a-service. We'll
describe the available client interfaces, including the usual suspects ODBC and
JDBC, but also Python, Node.js, .NET, and others. We'll end the chapter with the SAP
HANA Interactive Education (SHINE} demo model and the SAP HANA, express edi-
t ion.
• Chapter 5: Advanced Analytics
Chapter 5 is about advanced analytics (advanced, because the SAP HANA modeler
already covers standard business analytics). The advanced analytics persona is
more often called today the data scientist. In this chapter, we'll address machine
learning and predictive analytics. and cover the Application Function Library
(AFL), the Business Function Library (BFL), the Predictive Analysis Library (PAL),
the External Machine Learning (EML) library, and the Automated Predictive
Library (APL). We'll explain how SAP HANA integrates with Rand with TensorFlow.
We'll describe spatial processing with SAP HANA, the built-in graph database,
(time) series data, text analytics. text search and text mining, and streaming ana-
20
Preface
lytics for complex event processing (CEP). Advanced analytics processing technol-
ogies are integrated with the platform and can interact directly with business
transactions but also with data, structu red and unstructured, from any external
source connected to SAP HANA. The processing technologies complement each
other, which provides a clear illu stration of the whole beyond the sum of its parts.
• Chapter 6: Security
We'll turn our attention to the security architect in Chapter 6. However, in prac-
tice, this role will rarely be limited to just SAP HANA and instead probably involves
other platforms like SAP NetWeaver and the applications running on them. The
security architect is responsible for designing a secure and compliant platform so
you can innovate with confidence. In Chapter 6, we'll cover user management,
roles and privileges, and authentication with the Lightweight Directory Access
Protocol (LDAP), the Security Assertion Markup Language (SAML), JSON web
tokens (J\l\l'fs), single sign-on (SSO). and Kerberos. We'll address encryption in-
flight and at-rest, certificates, root keys, public key infrastructures (PK!s), and
secure store in the file system (SSFS). We'll look at the auditing infrastructure and
also cover some SAP HANA-specific functionalities like data masking and data
anonymization.
• Chapter 7: Data Integrat ion
The role of the data integration architect is to design the data integration process
and map out how to connect SAP HANA to other data sources. As with the security
architect, the data integration architect's responsibilities are often part of a wider
role. Data integration is an important aspect of a position as an SAP HANA solu-
tion architect or as an enterprise architect. In Chapter 7, we'll cover the SAP HANA
Data Management Suite, enterprise information management (EIM) and ETL, data
integration and data quality, federation with SAP HANA smart data access (SDA),
and data synchronization with remote locations and mobile sources. We'll also
address in this chapter the different replication technologies an d how SAP HANA
connects and interacts with big data and IoT.
• Chapter 8: Data Architecture
The two most important topics in data architecture are da ta tiering and data distri-
bution. Data tiering is compared to temperature, with frequently accessed hot data,
warm data, and cold data. Data distribution is particularly relevant in multiple-
host, scale-out systems. Data tiering and data distribution are related, and the role
of the data architect is to provide the best design. If you need to scale ou t for capac-
ity or for reasons of availability (the domain of the data center architect), data place-
ment must be designed correctly. Data partitions must be properly distributed, and
21
Pref ace
tables must be logically related, and since they are often queried together, tables
must also be physically close to ach ieve the best performance.
• Chapter 9 : Data Cent er Arch itecture
The data center architect is responsible for fitting SAP HANA into the corporate IT
infrastructure (or landscape, as often called in SAP terminology). Of course, this
task also involves secu rity. data integration. and data architecture, so you'll need
to collaborate closely '"'ith other departments. In Chapter 9 we look at sizing, tech-
nical deployment, virtualization, and tailored data center integration (TDI). The
data center architect must be familiar with the latest hardware innovations like
persistent memory. We'll describe different platform architectures, operating sys-
tems, and infrastructure-as-a-service (IaaS) providers (also known as hyperscalers)
and address migration and migration services, network administration, and land-
scape management. Business continuity, or if you prefer, h igh availability and
disaster recovery, should be an important concern for any data center architect.
We'll look at this topic in detail and inclu de SAP HANA system replication with
read-enabled, hot-standby systems.
• Chapter 10: Training and Support
We'll end our introduction to SAP HANA with a chapter about the many options
available for training and support. You'll learn about cou rses offered by SAP Edu-
cation as well as no- or low-cost options like openSAP, tutorials from the SAP Deve-
loper Center, and hands-on videos from the SAP HANA Academy on YouTube.
Concerning support, we'll cover the most important services related to SAP HANA
and address topics like how to get a license. search the knowledge base, or create
an incident report (su pport ticket). To conclude this chapter, we'll address oppor-
tunities to get together with your peers, virtually in an SAP Community or in real
life at conferences and meetups.
Text Boxes
To make the onboarding process smoother and more effective, we've created boxes
to focus your attention on specific themes: technology backgrounds, code snippets,
references for more information. relevant SAP Notes, and recommended tutorials.
22
Preface
Technology Background
In this box, we' ll provide context and background information about t he topic of the
paragraph. Although this book is an introduction, we have a lot of mat erial to cover,
and thus, fo r lack of space, we'll mostly dive st raight in with the assumption t hat the
reader is already fam iliar w ith topic. When we're using terminology in the paragraph
you aren't fam iliar w ith, you might want to read this section first.
In addition, these boxes may contain techn ica l f oot notes, under-the-hood perspec-
t ives, and similar topics.
Code Clinic
In this box, we'll provide code snippets to illust rat e th e topic, fo r example:
Learn More
In t his box, you' ll find references to t he officia l documentat ion for the SAP HANA
platform on the SAP Help Portal, publicly (and freely) ava ilable to read and download
at https://help.sap.com/hana.
We may also include references to SAP Community in t his box.
SAP Notes
Know ledge base articles and SAP Notes are important sources of information. Offi-
ci al release notes are published as SAP Not es as are errata for the document ation.
Many notes have been written by SAP Support containing FAQs, how-to's, and ot her
relevant related information. If you're new to SAP technology, working with SAP
Notes can be a bit intimidat ing. The number is overwhelming and, at times, you
might get lost in a daisy chain of references. Guided Answers from SAP Support can
help you st ay on track. In t his book, we'l l only list the most relevant resources, while
the SAP Notes will take you further to additiona I refe rences.
A support account (S-user) is requ ired to access knowledge base articles on the SAP
ONE Support Launchpad.
23
Preface
Tutorials
Nothing beat s hands-on exercises when you want to learn new material. In this box,
you'll find additional references to t utorials available on t he SAP Developer Commu-
nity to get started. To continue, you can use the Tutorial Navigator to find many oth-
ers.
If I'm not mistaken, I was introduced to SAP HANA in the summer of 2010. With my
colleagues of the SAP BusinessObjects demo team, we had just finished working on
Experience SAP World Cup Football (remember the vuvuzelas?) and had taken up
with the harbormaster at the KahZlvig Sailing Centre in Aarhus, Denmark, to work on
the next project, the SAP 505 World Sailing Championship (with Hasso Plattner par-
ticipating). We had brought with us a number of brand-new Apple iPad devices
(enterprise mobility was all the rage that year), and we were asked to start 'A'Orking
with the new SAP HANA appliance to replace the SAP Business Warehouse Accelera-
tor for SAP BusinessObjects Explorer. To be honest, I don't recall if we succeeded then
and there (a little bit challenged by the location). But soon enough we did, and sports
analytics was "powered by HANA".
Experience SAP
Watch former SAP co-CEO Jim Hagemann Snabe explain how you can use in-memory
computing for better decision-making while looking at beautiful vintage reports
made in SAP Crystal Reports from 2010 at http://s-prs.co/v488400.
A little later, our team switched from Innovation Marketing to Products and Innova-
tion, and we were challenged to come up with new ways to provide technical enable-
ment. implementation, and adoption support for SAP HANA. Inspired by the motto
of the Khan Academy- "free, world-class education for anyone, everywhere" - we set
out to create our own tutorial videos. Published first on the SAP Technology YouTube
channel and later to its own, t he SAP HANA Academy videos have been viewed over
8 million times.
Writing this book has provided the opportunity to continue this endeavor with the
challenge to distill a vast amount of information into a concise and comprehensive
24
Preface
introduction to the SAP HANA platform. I hope you'll enjoy this introduction to the
wonderful world of SAP HANA, and I would like to thank SAP PRESS and Megan Fuerst
in particular for making this book a reality.
A special thanks also to my colleagues from Experience SAP and the SAP HANA
Academy: Julie Blaufuss, Joe King, Jamie Wiseman, Tahir Hussain Bahar (a.k.a. Bob},
Philip Mugglestone, and Alexis Guinebertiere. In one shape or another, we've been
working together as a team since SAP HANA was still a university prototype. It has
been a privilege.
Bedankt to my partner Karin and to Carmen, Laetitia, and Sebastian (the Next-Gens).
Thank you for your understanding and support while I took on a second job for the
duration of this book.
Today, more than anything else, software shapes the \Vorld we live in. Without devel-
opers, there would be no software, so I would like to dedicate this book to the SAP
HANA development teams and product managers, past and present.
Sincerely,
Denys van Kempen
25
Chapter 1
Introduction
We basically defined the foundation of a radical system-the radical-
ity was no redundant data. Never store data twice... that was the start
of HANA.
- Dr. Hasso Plattner
In this chapter, the shortest of all, we'll address you as a chief information officer
(CIO), who is too busy to deal with the fine print or the full pitch and just wants the
executive summary. What you'll get out of this chapter is a working definition of SAP
HANA; a list of its main characteristics, key benefits, use cases, and customer stories;
and a view of the road ahead. All in a nutshell, so you can get back to work quickly.
In this first chapter, we'll examine our subject, make a first acquaintance, and ask
some impolite questions. What are you? What benefits do you have? Ho'" can we use
you? To get a good view of what lies ahead, we'll look at the roadmap and listen to
what the industry analysts have to say. We'll also describe several deployment
options and consider release and maintenance strategies.
A short answer to the question ''What is SAP HANA?" can be found in the SAP HANA
Master Guide, the guide used by IT professionals when planning an installation of
SAP HANA system landscapes:
"SAP HANA is a modern, in-memory database and platform that is deployable
on-premise or in the cloud."
Let's evaluate the first part of the phrase: SAP HANA is a modern, in-memory data-
base. Modern, because SAP HANA is being contrasted with the traditional disk-based
27
1 Introduction
28
1.1 What Is SAP HANA?
Learn More
For the SAP HANA M aster Guide and t he Feature Scope Descript ion for SAP HANA, see
the SAP HANA platform edit ion documentation on t he SAP Help Portal.
The SAP HA NA Master Guide is the guide SAP recommends as a starting point for on-
premise installations. The Feature Scope Descript ion for SAP HANA is a more recent
guide and documents, for each of t he services (database, integration, application)
and all the options, exactly what is included.
SAP HANA
On-Premise I Hybrid I Cloud
In-Memory I Multicore
~6d
Integration App lication
Predictive
Services Spatial Services
Streaming
Graph
Replication or
Virtualization Search
<J C> Seri es
Develop and
Run Applications
Database Services
Different diagrams have existed over time, and by the time you read this book, this
version may well have changed. However, the main ingredients are likely to remain
the same. In the illustration we find the follovving:
• SAP HANA is a business data platform.
• SAP HANA is available for on-premise, cloud, and hybrid deployments.
• A single data copy, combining OLTP and OLAP, all in-memory.
• The database services at the core are surrounded by different types of analytical
processing technologies.
29
1 Introduction
• You can connect SAP HANA to any data source using data integration and data
quality services for provisioning.
• Application services make the platform accessible to custom, SAP, and third-party
applications.
• SAP HANA features in-memory computing and real-time analytics.
30
1.2 Key Capabilities
......
Q il!Ji
. ...... . Q Q
Presentation Presentation Presentation
Business Logic
-- 111111
--
- -
- Control Flow Logic
-
......
il!Jl
111111
Business Logic
-- -~Iii~- ••••••
....--·-
......
~
~
-·-
Business Logic
-·- ••••••
Calculation Logic
Datastore Data store Data store
On the SAP HANA platform, code pushdown dictates that, whenever possible, busi-
ness rule processing should occur inside the database. As a result, SAP HANA not only
puts the clerk next to the records (in-database processing) but also, one could say,
puts the records inside the clerk (in-memory database). In other words, not only is
the calculation (business) logic executed on the data tier but now also the entire data
tier is stored in-memory. In this way, with the data and the processing logic located
closely to the processing units, response times can be orders of magnitude faster.
31
1 Introduction
The same applies to graph processing. In a graph database. the data resides in nodes,
and relationships are formed in edges {nodes, edges, and other graph-specific tech-
nologies are covered in Chapter 5). That's how Facebook, Amazon, or Netflix make
suggestions about whom to make friends with and what to buy or watch next. On the
SAP HANA platform, again, you can perform graph processing in-memory and com-
bine it with business transactions. In addition. you can also combine graph with spa-
tial processing and business transactions, and vice versa.
Predictive analytics uses algorithms to make educated guesses about the fut ure. As
forward-looking as this sounds, predictive analytics goes back to the dawn of the
computer age and includes all sorts of statistical techniques from data mining and
other fields. Today, the technology is again in the limelight for machine learning and
artificial intelligence (Al), used everywhere, including healthcare, marketing, logis-
tics, social networking. and financial services. You can run a wide range of predictive
algorithms on the SAP HANA platform, bundled in the Predictive Analysis Library
(PAL), either on its own or combined with spatial and graph processing. These algo-
rithms are executed as an application function, which you can think of as a database-
stored procedure written in a more sophisticated programming language to handle
the required complex computations. Besides the application functions used by pre-
dictive analytics, SAP HANA also supports many business functions like depreca-
tions, forecasts, net present value, and other commonly used functions by SAP
business applications. The same application function technology is also imple-
mented to execute machine learning TensorFlow functions.
Another technology integrated with the platform is event stream processing, also
known as complex event processing (CEP) in more general terms. For SAP HANA, this
capability is called SAP HANA streaming analytics and is used to manage. for example,
the data generated by Internet of Things {loT) devices. Series data processing can be
used for time series analysis and forecasting. For text search. analysis. and mining on
structured and unstructured data, text analytics processing is included with the plat-
fo rm.
We'll explore all these technologies in more detail in Chapter 5, but for now, v.re'd
like you to appreciate how the whole is greater than the sum of its parts. Not only
can you enrich your business data with each of these analytic processing technolo-
gies on the SAP HANA platform, but you can also combine technologies and match
event streams with spatial data or graph processing with predictive analysis. You
won't need to manage separate environments since all these technologies run "in-
memory" on a multicore computing platform.
32
1.2 Key Capabilities
33
1 Introduction
SAP HANA runs on the latest processor architectures. which powers the performance
of the in-memory database. The latest certified Intel Xeon Platinum 8280 processor
(Cascade Lake), for example, contains 28 cores, and configurations of up to 32 proces-
sors are supported. 896 processor cores enable some serious MPP. Non-uniform
memory access (NUMA)-awareness and single instruction multiple data (SIMD) sup-
port enhanced MPP.
Not comfortable with the terminology? No problem-we'll cover hardware topics in
Chapter 9 together with other concepts like multitenancy, for example, which pro-
vides the agility for virtualization and cloud-enablement. The SAP HANA platform
offers a choice between different hard•vare and software technologies for on-premise
deployments. SAP HANA also supports different infrastructure service providers in
case of cloud deployments (or any hybrid approach). High availability and disaster
recovery capabilities deliver the req uired business continuity, which will also be cov-
ered Chapter 9.
Now that you've seen how SAP defines SAP HANA and we've addressed some of its
characteristics, let's look at the key benefits. Tech nically, how SAP HANA is defined
and described has changed little over time. For sure, with each release adding many
new features and functionality enhancements, the platform matures (in addition to
the inevitable fixes and corrections, just as important but commercially a more deli-
cate topic). If we consider, for example, the high availability and disaster recovery
support provided by SAP HANA system replication today (circa 2019, the time of writ-
ing), this feature is almost unrecognizable compared to how it was initially imple-
mented from a technical point of view. Yet, from a commercial point of view, as a
beneficial characteristic providing business continuity, system replication has not
changed.
How SAP HANA is marketed, thus, is another story. Its business benefits reflect the
concerns of the day. For any product to be successful in the long run, it needs to move
with the tide. When big data was the mot du jour, functionality in this domain V1ras
obviously highlighted. vVhen next the oohs and aahs were directed to the IoT, SAP
HANA was put on stage. In 2019, at the time of this writing, the buzzwords are AI and
machine learning, and no doubt, by the time you're reading this book, there will be a
new kid on the block. The only constant is change. In this context, we'll briefly
34
1.3 Key Benefits
describe the key business benefits as currently identified and highlighted in solution
briefs and other marketing material.
35
1 Introduction
36
1.3 Key Benefits
different hardware partners. most of them household names. For cloud deploy-
ments, certified infrastructure-as-a-service (IaaS) platforms are offered by all the
major global vendors and some regional ones to boot. You can deploy SAP HANA as
an appliance-that's how it all got started, with preconfigured hardware and software
engineered to work together- or opt for a more DIY approach: tailored data center
integration (TOI), relying on certified configurations and certified engineers. In the
cloud, you can go for a fully managed service either on a public or a private cloud.
Another alternative is to bring your own license (BYOL) and take care of system man-
agement yourself.
The different deployment options are shown in Figure 1.3, along with the fourth cate-
gory of hybrid deployments, which could be any combination of on-premise and
cloud. For example, you may already run a number of SAP HANA systems in your
data center, b ut fo r a new proof of concept (PoC), you may want to avoid investing in
more hardware. a capital expenditure (CapEx); instead, you could leverage SAP
HANA-"as-a-service" and just pay fo r actual usage. With SAP HANA Cloud Services,
announced at SAPPHIRE NOW 2019 (currently under development at the time of
writing, summer 2019), you should expect a lot more focus on the advantages of
hybrid deployments.
---- ----
111111
- 111111
- •
Appliance Tailored Data Center Integration (TDI)
37
1 Introduction
If facts and figures interest you, we recommend consulting SAP annual reports and
similar publications like the SAP corporate fact sheet (http://s -prs.co/v488401). The
April 2019 edition. for example, mentions how SAP HANA, with more than 30,000
customers. is the market-leading platform for real-time computing. New release
webinars and roadmap presentations also typically start with a "State of the Union,"
listing accomplishments in terms of the number of customer licenses and deploy-
ments. For real-time real results, vve recommend checking the SAP website regularly
for th e latest information.
Learn More
Figure 1.4 shows Hasso Plattner in action. You can watch replays of keynote high-
lights on the event website http://s-prs.co/v488402.
38
1.4 Finding Customer Stories and Use Cases
Home Agenda ..., ASUG Sms1ons "' Show Floor Exhibitors Venue & FAQs ..., On Demand ..., ~
SAP has published a smorgasbord of customer stories on the SAP website. In fact, so
many, that they've added a tool to help you find the right one, aptly named the SAP
HANA Finder (http://s-prs.co/v488403, as shown in Figure 1.5). You'll find stories
about application platforms, business intelligence, data warehousing, enterprise per-
formance management, human resources, manufacturing, marketing, predictive
analytics, sales, service, and supply chains, to name a few. All industries are repre-
sented; in particular, consumer products, healthcare, high tech, professional services,
and utilities are well covered. You'll find stories about companies of all sizes, large,
midsize, and small, and of course from all regions and the largest economies. The for-
mat is either a video testimonial or a reference PDF for you to download or share.
39
1 Introduction
Filter
0
- O Learn How AES Big Sky Creates a Platform for Future
Innovation (90·seconds version)
,..,..._.
SoluUon Cl\ange )'Otlt business models and platforms t() meet customer demand. Hear
hOw AES B11 Sky LLC used SAP S/4HANA and SAP MaxAttentlonservlces to
create a platform that drwes It to become an inte.Jl!gent MterPflse and help meet
its objectNes .ndecreas1ng carbon 1ntens.1ty,
0 Industry
"
I All ln<Mtril• j •' '
Cont«t Us
0 Company Size
fa Otto Group; How Is Germany's Biggest Online Retailer
Transforming to an Intelligent Business Model?
All Compeny SiZH OiSOO\l'tt how Otto Ct04.lp ~tcd its t"'nsitJOn to SAP S/4HANA with help
' from SAP S/4HANA Adopbon Startet" Enpgoomtnt. Find cM how Otto C..0\4> is
0 Region/Country now 1n 11 po$lliCln to support its suatogy tor growth bywnpl9m1nt1n1 innovat1w
technologies such as madwle lurrwis and loT.
All Counltles
For live references, you can visit one of the many SAP events where customers are often
invited to come on stage and talk about their stories. These events are also great places
to interact with peers and learn from their experiences. In addition, for customer-to-
customer (member-to-member) stories, consider contacting your local SAP user group,
which could also provide another viewpoint and serve a source of learning. We'll cover
user groups in more detail in Chapter 10.
The SAP HANA use case map tool (http://s -prs.co/v488404) presents five typical use
cases with key capabilities listed and an explanation of the business benefit that can
be achieved by implementing SAP HANA. For example, the use case Exploit Analytics
in Insight-Driven Applications answers the question, "Are you looking for deeper
insights from all your data to drive business performance?" Various aspects of SAP
HANA's advanced analytics features are explained and illustrated with a number of
customer stories.
40
1.5 Industry Analysts
SAP is not the only company publishing SAP HANA use cases and customer stories.
You can also find case studies for SAP HANA and other SAP products on the websites
of IBM, Amazon Web Services {AWS), Microsoft Azure, Accenture, or Deloitte, to name
a few. Of course, in those publications, the role of the SAP partner will be highlighted
with less focus on SAP HANA itself as a solution. However, learning about different
points of view is always beneficial.
41
1 Introduction
skyrocketing to the "Peak of Inflated Expectations", crashing all the way down to the
"Trough of Disillusionment'', crawling up on the "Slope of Enlightenment", and end-
ing on the "Plateau of Productivity". Hype cycles have existed for big data, for cloud
computing, blockchain, AI, the IoT, you name it. For Gartner, HTAP is an architecture
and not a product or a market. So, no Magic Quadrant exists for HTAP. Note that
other analyst firms use the term hybrid operational/analytical processing (HOAP) and
translytical databases. Time will tell which term will stick.
Learn More
Gartner is a global research and advisory firm founded in 1979 and well known for
t heir technology research and the Gartner Magic Quadrant, but they also cover many
other functions. For more information, visit https://gartner.com/.
Good news about Gartner Magic Quadrant for SAP product s is generally available
from the SAP News Center. Sea rch for the SAP HANA tag or for Gartner.
Learn More
For more information about Forrester and t he Forrester Wave, visit goforrester.com.
For the Forrester Wave report on SAP HANA, see "The Forrester Wave: Translytical
Data Platforms, Q4 2017."
The International Data Corporation (IDC) is a subsidiary of t he International Data
Group (IDG). For more information, visit https://www.idc.com/.
42
1.6 The Road Ahead
At the time of writing (summer 2019), the most recent version of the SAP HANA road-
map, unfortunately, goes all the way back to December 2018. We'll quickly recap what
it contains and supplement this material with what was more recently announced at
the SAPPHIRE NOW 2019 conference.
For SAP HANA, recent and planned innovations are listed for the following topic
areas: database management, data management, application development, and ana-
lytical intelligence. This organization roughly maps to our administrator, integrator,
developer, and data scientist/advanced analyst personas for features and functions,
with the security architect, the data architect, and the data center architect merged
with the administrator. Recent innovations cover the SAP HANA support package
stack (SPS) 03 release from 2018 and the SAP HANA SPS 04 release from 2019.
In Chapter 2, we'll cover these developments in detail when we look at the new func-
tionalities introduced with the latest releases.
43
1 Introduction
The product direction and product vision sections are expressed more in terms of
business benefits and concerns carefully crafted marketing material. the same as
found in "solution briefs" and other marketing "collateral." Here, the enablers are
listed (act, innovate, accelerate, achieve) with benefits (confidence, intelligence, sim-
plicity, compliance).
The themes of the SAP HANA roadmap are:
• Act with live intelligence
Referencing the single data copy, analytics on live transactions, multimodel in-
memory processing and connectivity to any data source.
• Innovate with confidence
Enforce compliance and trust and rely on SAP expertise in business content on the
one hand and leverage existing skills and open standards, removing barriers for
new innovations on the other.
• Accelerate with simplicity
Support all data, run all workloads, manage at scale, connect at speed, secure
access, and lower TCO with simplified app development and management. A dif-
ferent angle to view the one dataset, all workloads, one platform benefits of sim-
pler architectures and IT landscapes for faster time to results and lower costs.
• Achieve cloud freedom
Hybrid and multicloud data platform.
As early as 2013, when SAP created a single development organization, it was an-
nounced that, for the development of line of business (LoB) applications, a cloud-first
approach would be taken. This approach impacted the technology stack a bit later,
with the release of SAP HANA 2.0 SPS 03 in April 2018, when "cloud-first" was applied
to the SAP HANA platform as a delivery model. Since then, new features are released
first for the SAP HANA cloud edition, or in full, the SAP Cloud Platform, SAP HANA
service. These new releases occur at regular intervals (incrementally). Once a year, the
features are then bundled for the next SPS release of SAP HANA on-premise (we'll de-
scribe the cloud edition of SAP HANA in Chapter 2). How a cloud-first approach im-
pacts future developments of the SAP HANA platform is not easy to distill from the
latest SAP HANA roadmap, if at all, bounded as the document is with disclaimers and
other legal restrictions. For a look ahead, let's review what was presented at the latest
SAPPHIRE NOW 2019 conference.
44
1.6 The Road Ahead
Learn More
For information about SAP roadmaps and additional resources like t he roadmap
webinars, visit sap.com/roadmaps. A search tool can help you find t he roadmaps for
SAP HANA a nd related products like SAP HANA smart data integration (SDI) and SAP
La ndscape Management.
Solut ion briefs and other marketing material, col lectively known as "collateral," are
published on t he SAP website under Products.
Figure 1.6 shows the new SAP HANA Cloud Services, which aims to bring the perfor-
mance of in-memory computing to the cloud. The big challenge ahead is how to man-
age the explosion in data volumes (175 zettabytes by 2025, according to one count).
With SAP HANA Cloud Services, you can "experience intelligence," with SAP HANA
serving as a single gateway to all your trusted data in real-time, regardless its origin.
Data Ecosystem
Partners and data providers
...._.........
Metadata Management
Centrally managed data Business Applications
models and semantics Business outcomes from
performi ng data
45
1 Introduction
Learn More
SAP HANA Cloud Services were under development at the time of writing {summer
2019).
For the latest information, visit http://s-prs.co/v488405.
1.7.1 Licensing
The SAP HANA license for on-premise installations and for bring your own license
(BYOL) public cloud deployments is a simple signature file that you can obtain using
a self-service license key application on the SAP Support website. Most of the func-
tionality comes with the platform and does not require additional licenses for techni-
cal activation. However, as mentioned earlier, for productive usage, several different
editions and licensing options are available:
• SAP HANA, standard edition
Includes most database, integration, and application service features.
• SAP HANA, enterprise edition
Extends SAP HANA, standard edition, with advanced analytics processing services
like spatial, graph, and text processing, as well as predictive analytics and stream-
ing analytics, plus big data integration and replication technologies.
• SAP HANA, express edition
Special version with free license for development. This edition includes all the fea-
tures from SAP HANA, enterprise edition, except for high availability and disaster
46
1.7 Licensing and Maintenance
recovery (system replication), multitier storage (SAP HANA dynamic tiering), and
other enterprise features that require more complex server environments.
• SAP HANA, runtime edition
Special version for use with SAP applications.
All these editions can be deployed either on-premise on in the cloud with different
options at our disposal. Editions and options are described in Chapter 2, with SAP
HANA. express edition covered in detail in Chapter 4.
Learn More
For general information about SAP licensing, not specifically related to SAP HANA,
see the SAP Licensing Guide.
For information about license keys and access to the license key application, visit
http://s-prs.co/v488406.
Learn More
General information about software maintenance is published on the SAP Support
Portal. Detailed informat ion is provided by the Product Availability Matrix (PAM) at
http://s-prs.co/v488407, where you'll find the details about the release to customer
47
1 Int roduction
(RTC) and general availability (GA) dates for a particul ar p roduct. SPSs are list ed with
lin ks to the SAP Notes with re lease information and upgrade paths. Also included are
lin ks to t he docu mentation and t o t he software down load center.
Whether you deploy SAP HANA on-premise or in the cloud will depend on your busi-
ness requirements, budget, and available resources. What is more important: full
control or elasticity? What is more cost effective? Performance, scalability. adaptabil-
ity, and system management efforts are also considerations you'll need to factor in.
These requirements will be different for each business case, which will often involve
a mix of requirements. Because SAP HANA supports multiple cloud infrastructure
providers for cloud deployments, supports both pu blic and private clouds, and pro-
poses several hardware partners for certified on-premise configurations, a mix-and-
match approach with hybrid deployments may provide the best results.
To help you define the most suitable system landscape, see the deployment best
practices map shown in Figure 1.7.
Deployment Model
I
' i,
On-Premise Cloud
I
'
Appliance TOI Public (laaS) Private (SAP HANA
Enterprise Cloud)
Sizing
Technical Deployment
To help you choose between on-premise and cloud deployments, different business
scenarios are shown. The appliance offering, for example, is recommended if any of
the following scenarios apply:
48
1.8 Summary
Learn More
You can explore the different deployment options on the SAP HANA product website
under the Implement • Deployment. In this section, you'll also find a linkto the Land-
scape Definition Guide for SAP HANA - Best Practices for a Successful Deployment
(2019).
For informat ion about SAP's release and maintenance strategy and for a link to the
PAM, visit the SAP Support Portal Home under Maintenance.
For t he SAP's "Release and Maintenance Strategy" document, visit http://s-prs.co/
v488408.
1.8 Summary
We started this chapter by defining SAP HANA and examining its key characteristics
as a database and as a tool for data management, analytical processing, and applica-
tion development. We addressed key benefits, TCO, different business cases, real
results, and customer stories. For quick one-pagers about solutions, we pointed to
the relevant solution briefs and data sheets, and for competitive analysis, we pointed
to the material published by industry analysts. For the return on investment (ROI)
study, we described the SAP release strategy, licensing, maintenance, and roadmaps.
In the next chapter, we're going to change roles and swap our business attire for a stu-
dent outfit for an overview of the technology. You'll learn about in-memory database
concepts, system architecture, editions, releases, and deployment options.
49
Chapter 2
Technology Overview
We always overestimate the change that will occur in the next two
years and underestimate the change that will occur in the next ten.
- J. C. R. Licklider
To capture the innovations introduced with each new release, different themes have
been used over time. SAP HANA started in 2010 as a "high-performance analytic
appliance" enabling real-time analysis for businesses. Then, it evolved into a "real-
time data platform". Text analysis, business and application functions, spatial and
graph engines, application services, and a native development environment are
some of the innovations we can mention to illustrate this transformation.
The "platform for all applications" was the theme of the 2014 release when big data
and Internet of Things {IoT} were the topics of the day, and SAP added SAP HANA
smart data integration {SDI), SAP HANA smart data quality (SDQ), SAP HANA smart
data streaming (SOS}, and SAP HANA dynamic tiering.
To stress data center readiness, the next release theme was "running mission critical
applications with confidence". Now opened up to the data center, SAP HANA was no
longer only available as appliance but also provided a choice in processor architec-
ture and operating systems as well as a large number of certified configurations from
an ever-growing number of hardware partners. The addition of virtualization and
cloud-first deployments underlined SAP's commitment to openness and flexibility.
For the next few releases, the "What's New?" theme centered on "innovate modern
applications, accelerate insights, and simplify IT", in sync with the "Run Simple" cor-
porate strategy. SAP HANA 2.0 was introduced as the "next generation platform for
digital transformation", and SAP HANA as the "business data platform for the intelli-
gent enterprise" with "intelligence, agility, efficiency" highlighted for the latest
release.
51
2 Technology Overview
Weaving a list of hundreds, and later thousands, of added and changed features and
functions for each release into a single theme, in line with corporate messaging and
marketing requirements, is the challenge faced by SAP HANA product management.
In this chapter, we'll open the SAP HANA box and look at what's inside. We'll provide
a high-level overview of in-memory database concepts. offer a short release history
of the product, and provide an overview of the system architecture of the SAP HANA
database and platform. We'll look at some of the available editions and options. and
investigate their functions, features, and capabilities. We'll end this chapter with the
SAP Cloud Platform, SAP HANA service and the cloud deployment options. If the new
terminology in this chapter overwhelms you, we recommend you keep calm and
carry on. Once you've been acquainted with the SAP HANA personas in the subse-
quent chapters, all the parts will start to fit together.
All computing happens in memory. You power the system on, an operating system
gets loaded from disk, and once the system is up and running, programs process data
in memory with data coming in from storage or the netvvork as input/output (I/O).
Shut down the computer, and all data is stored onto disk again. So, what makes in -
memory computing any different from computing in memory? To answer this ques-
tion, we must briefly review some database history, consider the hardware price/per-
fo rmance ratio over time, explore numerous database industry workarounds to
mitigate slow hard disk drives, and uncover the synergies obtained when combining
different technologies.
52
2.1 In-Memory Dat abase Concepts
53
2 Technology Overview
The next issue was with calculations. If you need a sum or an average. you must scan
all rows, which requires time and compute resources-expensive in multiple ways.
The solution? Store results as aggregates, by time dimension or by geography at dif-
ferent levels of granularity. Side effects? Aggregated data does not represent current
time but some moment in the past and must be updated at regular intervals, for
example, with a nightly batch job. Acceptable, again, because without aggregates, you
couldn't have sums and averages in the first place-too expensive in the early days of
the database.
But aggregates came at a price as well, since calculating and querying aggregates on
an enterprise system required a great deal of compute resources and impacted trans-
action processing. The solution? Store aggregates in another system for analytics and
use a number of standard operations, such as extract, transform, and load (ETL) to
massage the data as required. ETL defines what data you want from your system of
record, how you want to model the data, and maybe how to combine the data with
other data sources. An entire software industry grew up to accommodate this need.
In the 1980s, the price of memory, processors, and storage had come down to a level
that made this evolution possible. You could store a lot of data in these systems,
which we called data warehouses. Most successful business intelligence (BI) compa-
nies were acquired by larger software companies during this period. Any side effects?
Yes, in terms of data duplication, reporting time delays, and complexity. Data ware-
houses, already transactional data copies. were often duplicated again in data marts,
one for each function or region, creating data silos. Particularly in the client/server
years, this duplication was quite common. The hardware required to store all data in
a single system was either not available or otherwise prohibitively expensive.
2.1.2 SanssouciDB
Around 2006, research started at the Hasso Plattner Institute (HP!} in Potsdam on a
blueprint for a new in-memory enterprise database system, called SanssouciDB
(French for NoworriesDB and named after the summer palace of Frederick the Great,
King of Prussia). For SanssouciDB, the database architects went back to the dravving
board. What if Vire store all data in-memory? You'd no longer need separate data ware-
houses. And with all data in-memory and multiple processors working on the data in
parallel, known as multicore parallel processing (MPP}, calculations can be made "on-
the-fly," and aggregates are no longer needed. Research has revealed that a significant
part of enterprise data concerned all sorts of aggregates. Removing redundant data
54
2.1 In-Memory Database Concepts
greatly reduced the size of the database, which made storing the complete enterprise
database in memory even more feasible. We'll return to this topic \¥hen we describe
SAP HANA database sizing.
Another significant consequence of real-time calculations is that the code in business
applications to generate, maintain, and manipulate aggregates was also no longer
needed, which reduced complexity and simplified the code. For this reason, the first
application specially developed for SAP HANA was released as Simple Finance, in line
with the "Run Simple" campaign aimed to reduce complexity everywhere. Later, these
applications were tagged with "4/HANA," like SAP S/4HANA and SAP BW/4HANA.
By storing data as an index, in columnar format and not in rows. data could be com-
pressed significantly, further reducing the memory footprint required. Built-in
partit ioning, minimal projections (avoiding SELECT *) and code pushdown from
application tier to the database layer, combined column and row store, and the
insert-only principle, are some of the many ideas and innovations that came out of
this research project.
Technology Background
Columnar storage was nothing new. Sybase IQ dating from 199S, is an early exam-
ple. SAP acquired Sybase in 2010, and Sybase IQ would be integrated with the in-
memory platform as SAP HANA dynamic tiering. With columnar storage, because of
compression, a lot more data could be stored. However, data changes were problem-
atic, as the data needed to be sorted again. For this reason, column-based databases
were mainly used in on line analytical processing (OLAP) environments. Text Retrieval
and Information Extraction {TREX), the search engine used in SAP NetWeaver, also
uses columnar storage. For data changes, a delta store is ma intained, merged later at
intervals with the main store for permanent results.
In-memory row stores were also not new. TimesTen, another well-known example in
the database industry, dates from 1996 and was developed at Hewlett-Packard labs
in Palo Alto. The database was acquired by Oracle in 200S and is still on the market.
The same year, SAP acquired Transact in Memory, a startup company for the P*TIME
in-memory row store database, originally developed in 2002 at Seoul National Uni-
versity in Korea.
What made SanssouciDB, and later SAP HANA, so unique was the combination of
in-memory row store and columnar storage to create a new enterprise database
SS
2 Technology Overview
system. For the persistence layer and cl ient interfaces, SAP MaxDB technology was
leveraged. Like so many of the protagonists of our story, SAP MaxDB also originally
started as a database development research project, this time from the Technical
University of Berlin.
Development at SAP on this new in-memory compute engine started in 2009, and
the product was launched at the annual SAPPHIRE NOW conference in Orlando in
2010 by Has so Plattner and SAP chief technology officer (CTO) Vishal Sikka. After we
cover system architecture in the next section and explain the different editions and
options, we'll return to 2010 as the starting point for a brief release overview and see
how SAP HANA has evolved from an in-memory compute engine to a complete real-
time enterprise data platform and foundation for the intelligent enterprise.
Learn More
For those interested in the genesis of the in-memory database, we recommend the
book In -Memory Data Management, Technology and Applications (second edition,
2012) by Hasso Plattner and Alexander Zeier and the 6-week "In-Memory Data
Management" course from openHPI, also by Hasso Plattner.
For a concise introduction to SAP HANA and its technologies (parallelism, row and
column store, compression, partitioning, and tiering), seethe 1-hourcourse "An Intro-
duction to SAP HANA by Dr. Vishal Sikka" from openSAP, as shown in Figure 2.1.
"
M"'\-\-)-cove ~11el111-,
/
'if> - c~ u~ ~.:; \,.'-" '11 .'"' f"v-<1v.-.61
?. \~ \)•""""' (p\ v.""" V""V' S.~e~
+
- - S" \~ <;S D
y<... ~lt.-.+ ~v~~
p
3 . c; CO ~~/s/co'<e; (,~~
I "l.·s;-•S M '))-t }s. (ccY('
. 1 Y\.\Y"'-o~ WA
~ \\.~J,,., ""1
I'
,.5: y:
Figure 2.1 openSAP Course: "Introduction to SAP HANA by Dr. Vishal Sikka "
56
2.2 System Architecture Overview
SAP SAP
Business HANA
Suite XS
.
SAP
Busi ness SAP HANA
SAP HANA
Suite
I SAP HANA
I
I
L-------
IReplication I
Dat a M art (Sidecar) Application Server Native Development
For the SAP Adaptive Server Enterprise (SAP ASE) database, this architecture even
resulted in a separate product, the SAP HANA accelerator for SAP ASE. Of course, with
57
2 Technology Overview
this implementation, we're not leveraging the benefits of a single data copy, with its
online transaction processing (OLTP) and online analytical processing (OLAP) com-
bined and its multiple advanced analytical processing capabilities. In fact, this archi-
tecture resembles to some extent the way that one of the predecessors of SAP HANA,
the SAP Business Warehouse Accelerator, was used for the SAP Business Warehouse
(SAP BW). However, the benefits of this architecture come \Vith low risks and high
gains. Using SAP HANA as a data mart leaves production systems completely
untouched, without interruption and without interference. BI, on the contrary, can
enjoy much better response times, to provide "analytics at the speed of thought."
With most analytics and reporting tasks now executed on the data mart, the system
of record might even be able to focus better on its task.
The second "classic" implementation scenario is SAP HANA as database for an appli-
cation server. Prior to the release of SAP HANA, an SAP NetWeaver application server
would connect to any other database (AnyDB). After SAP HANA was released, SAP
development worked around the clock to bring all business applications into the in-
memory platform. These applications would now be "powered by HANA" in phase 1,
and after significant redesign, these applications would take advantage of the single
data copy, application and business functions, code pushdown, and other advantages
we'll describe in more detail in this section. Eventually, "powered by HANA" would be
replaced with the notation "4/HANA," with SAP S/4HANA and SAP BW/4HANA being
the best-known examples.
A third major implementation scenario \vas not part of the original in-memory pro-
totype design but was a logical extension. Now that you have a single data copy, sur-
rounded by analytical capabilities, why not attach a lightweight application server to
the platform to benefit from all the processing power? This argument for "native"
development, as it is called, on the in-memory platform, attempts to maximize pro-
cessing on the data tier. Native development uses the SAP HANA extended applica-
tion services (SAP HANA XS) architecture (described in Chapter 4, Section 4.4).
58
2.2 System Architecture Overview
Manage Services v c ©
HOO
Service (9)
• daemon
SAP HANA starts with the daemon process. The daemon is the first process to start and
serves as the watchdog ensuring that any service not in the Running state is auto-
matically restarted.
Technology Background
Anyone with a little knowledge in Unix or Linux system administration will be fami l-
ia r with daemon processes, w hich are equiva lent to a service on t he Microsoft Win -
dows platform. Daemons are background processes and do not require a user to log
on (which would be an interactive process). Unlike in Windows, however, daemons
always run in the context of a specific user account. For SAP HANA, this user is
named <sid>adm, t he software owner and operating system administration account.
The system identifier (SID) serves as an alphanumerical identifier, like ABC or HOO,
and is also used on SAP NetWeaver systems.
59
2 Technology Overview
• nameserver
The second service started is the nameserver process. This process keeps track of
the topology: which service is running on what host, TCP ports, roles, and the sta-
tus of the service with resource usage, corresponding to what's shown in Figure
2.3. In addition, the name server also knows where table data resides and where
you'll can find the different partitions, which are particularly relevant fo r distrib-
uted systems, the term used for multiple-host, scale-out environments. For distrib-
uted systems, the name server steps in to activate an instance in standby role and
orchestrates the reallocation of data during host auto{ailover, which is when one
of the hosts in a multiple-host, scale-out environment ceases to respond.
Somehow, the name server also manages to find time to act as the database engine
for the system database. This database is always present in a tenant database sys-
tem, which we'll discuss further in Section 2.4.1, where it stores telemetries and
metadata about tenant databases and other processes.
Finally, the name server manages system replication for high availability and
disaster recovery configurations (see Chapter 9, Section 9.9).
• indexserver
The actual database row store and column store engines run under the covers of
the indexserver process. In early SAP HANA systems in single-container database
mode, the index server is the database. In the current tenant database architec-
ture, each index server corresponds to a tenant database. Knowing which SQL port
your tenant database index server process listens to is important for connectivity,
as you'll also need to provide a host name and port number when connecting to
the database. On a running system, the indexserver process will always consume
the most resources (CPU and memory).
Technology Background
The origina l name of the indexserver process goes back to SAP Net Weaver's TREX
engine, where we also encountered t he daemon and nameserver processes. TREX uses
columnar storage; indexes, that is, not regu lar tables (hence the name).
60
2.2 System Architecture Overview
This sharing is also the case for the preprocessor process, which provides services
for text analytics (search, analytics, and mining). The daemon, preprocessor, nam-
eserver, i ndexserver, and compileserver processes are always included on any SAP
HANA system. The st at isticsserver, xsengi ne, and webdispatcher processes found
on older SAP HANA systems are now mostly embedded in the system and tenant
database processes.
• scriptserver and diserver
Depending on the configuration, you may also find a number of additional pro-
cesses like the scr ipt server and the di server listed in the SAP HANA cockpit
shown in Figure 2.3. The script server executes function libraries for the Applica-
tion Function Library (AFL) and the Business Function Library (BFL). Before you
can start working \l\lith the Predictive Analysis Library (PAL) or the External
Machine Learning (EML) library, you'll first need to activate a script server for your
tenant database.
The diserver provides the SAP HANA Deployment Infrastructure (HD!) for the
database and converts design-time artifacts into runtime objects. This service and
process is associated with the SAP HANA extended application services, advanced
model (SAP HANA XS Advanced) architecture. With the SAP HANA XS Advanced
runtime installed, you'll also find the xscontroller, xsuaaserver, and one or more
xsexecagent processes for the orchestrator; the User Account and Authentication
(UAA) service; and the different deployed runtimes.
• docstore
Shown in Figure 2.3 and also a development topic is the document store, a NoSQL
JSON repository provided by the doc store process.
• dpserver, streamingserver, and esserver
The dpserver is added when you install SAP HANA smart data integration (SDI),
which adds an ETL-type data provisioning technology. SAP HANA streaming ana-
lytics adds the streamingserver, and SAP HANA dynamic tiering adds the esserver
(ES stands for "extended storage"). These services all provide additional capabili-
ties that we'll describe in Section 2.4.l.
• computeserver
New for the latest release SPS 04 release of SAP HANA 2.0 is the computeser ver, an
elastic compute node server, similar to the indexserver process but without per-
sistence and thus only used to execute read-only queries and procedures.
In Chapter 4, Chapter 5, Chapter 7, and Chapter 9, we'll describe in more detail topics
like SAP HANA XS Advanced, HD!, AFLs, provisioning, and extended storage.
61
2 Technology Overview
Learn More
The different server components (processes) are documented in the "Server Compo-
nents of t he SAP HANA Database" chapter of t he SAP HANA Administration Guide.
SAP Notes
Additional information can be found in the SAP Note 2477204 - FAQ: SAP HANA Ser-
vices and Ports.
62
2.2 System Architecture Overview
Learn More
Concepts and configuration tasks related to persistence and memory are docu-
mented in the SAP HANA Administration Guide:
• "Memory Usage in the SAP HANA Database"
• "Persistent Data Storage in the SAP HANA Database"
SAP Notes
Additional informatio n can be found in the following SAP Notes:
• SAP Note 1999997 - FAQ: SAP HANA Memory
• SAP Note 2400005 - FAQ: SAP HANA Persistence
• SAP Note 2700084- FAQ: SAP HANA Persistent Memory
63
2 Technology Overview
In Chapter 8, Section 8.5, and Chapter 9, Section 9.9, we'll describe in more detail the
topics of data distribution and high availability, respectively, including system repli-
cation for disaster recovery support {Chapter 9, Section 9.10).
Technology Background
The common industry term for scale-out, multi-node systems is a cluster. The reason
an SAP HANA scale-out system is called a dist ributed system and not a cluster comes
from the reuse of SAP NetWeaver terminology.
An SAP Netweaver system consists of m ultiple instances: centra l services (SCS),
database, and primary application server (PAS). Together, t hey form the application
server that hosts SAP business applications. You can run these services on a single
(big l) system or distribute the load across multiple servers. The latter case creates a
distributed system. An SAP NetWeaver dist ributed system does not provide high
availability and is not a cluster because each server is still a single point-of-failure
(SPOF). For high availability, you'll need to use cluster technology from a hardware or
software (operating system) vendor.
When you add the TREX search engine component to an SAP NetWeaver system, you
can install it on single host or on multiple hosts for load balancing and high availabil-
ity. When you install TREX on mu ltiple hosts, this component of your SAP NetWeaver
system is technically now a cluster. However, in SAP terminology, this distinction is
not made, and the SAP NetWeaver system is still called a distributed system.
This interpretation of distributed syst em has con t inued with SAP HANA. The SAP
HANA documentation consistently references scale-out systems as multiple-host.
distributed systems, but sometimes in biogs or documentation f rom hardware and
software partners, you may see t he terms multi-node SAP HANA systems or SAP
HANA clusters when ref erencing distributed systems. This dist inction is important
because, as w ith SAP NetWeaver, you ca n also use vendor-provided hardware and
software to create a cluster. In this case, we would use SAP HANA syst em replication.
In other words, you can run SAP HANA as a distributed syst em and as a cluster at the
same t ime for additional high availability and disaster recovery services.
64
2.2 System Architecture Overview
65
2 Technology Overview
Learn More
The best place to learn more about developing native applications for SAP HANA
using t he SAP HANA XS Advanced framework is t he Developer Information Map on
the SAP Help Portal. This guide will help you find the right documentation, whether
by developer journey, by guide, by task, or by scenario.
SAP Notes
Additional information about SAP HANA XS Advanced can be found in SAP Note
2596466- FAQ: SAP HANA XS advanced.
66
2.3 Editions
Unlike SAP HANA dynamic tiering, SAP HANA native storage extension is included
with SAP HANA and works with any application. Data tiering is described in more
detail in Chap ter 8, Section 8.4.
2.3 Editions
Over time there have been different editions of and options for SAP HANA. In part,
these distinctions are technical (platform edition versus cloud editio n, for example),
and in part, these distinctions are about licensing (standard versu s enterprise edi-
tion).
In this section, we'll briefly explain the different editions of SAP HANA.
67
2 Technology Overview
68
2.3 Editions
also the case for technologies usually described as "advanced analytical processing"
like series and hierarchies.
SAP HANA Dynamic Tiering SAP HANA Acce lerator for SAP ASE
SAP HANA Accelerator for SAP ASE SAP HANA Streaming Ana lytics
EIM, SAP HANA dynamic tiering, the SAP HANA accelerator for SAP ASE, and SAP
HANA streaming analytics are products that you'll need to download, install, and
configure. In some cases, these solutions will require an actual license before they can
be used. Most of the other enterprise features are included 'vith the platform edition.
As a reminder, both the standard and the enterprise (commercial) editions are (tech-
nically) platform editions. The standard edition includes spatial and graph capabili-
ties, predictive analytics, etc., except you'll need a license for (productive) usage.
Technically, the SAP HANA license only restricts the amount of memory, and even
this limit can be defined as a soft or hard limit. The active/active read-enabled system
replication option is also not technically controlled by a license.
What is included in each edition has changed over time. The very first SAP HANA
enterprise edition, for example, bundled the software needed for ETL-based and
trigger-based replication-SAP Data Services (with SAP BusinessObjects) and SAP
69
2 Technology Overview
Learn More
The Feature Scope Description document can be read or downloaded from the SAP
Help Portal for t he product or service:
• Feature Scope Description for SAP HANA
• Feature Scope Description for SAP HANA, express edition
• Feature Scope Description for SAP Cloud Platform, SAP HANA Service
70
2.4 What's New: Support Package Stacks and Revisions
For on-premise SAP HANA, from the start, this approach was implemented as well
with a steady flow of revisions released every couple of weeks initially, with an SPS
twice a year as a milestone marker. Superstition or not, after release SPS 12, SAP
decided to stop innovating on the SAP HANA 1.0 code branch and start fresh with SAP
HANA 2.0. More recently, in 2019, SAP communicated that the innovation would now
come cloud-first in the SAP HANA, cloud edition, officially named SAP Cloud Plat-
form, SAP HANA service. Looking at the release notes for the cloud edition where
updates are labeled \l\lith year-month identifiers (no longer with a revision or SPS
number), we've come full circle, and SAP HANA has truly become timeless software.
Technology Background
Support package stacks (SPS) were introduced for SAP NetWeaver to simplify system
maintenance, lower costs, and accelerate innovation. Each SAP NetWeaver system
contains multiple components, and managing them was a time-consum ing and
error-prone activity.
TREX is an example of such an SAP NetWeaver component that is included in differ-
ent SAP products, one of them being t he SAP BW Accelerator, w hich was packaged as
an appliance (in other words, preinstalled software on predefined hardware) and
released in revisions, a concept taken from manufacturing.
The revision/appliance release approach was used for SAP HANA as well, but as the
SAP HANA appliance comprises m ultiple components, you'll also see the concept of
the SPS applied, albeit a bit differently compared to SAP NetWeaver systems.
The release interva l fo r the SAP HANA 1.0 SPS was twice a year. With each SPS, new
functiona lity was enabled, and the revision counter was updated to t he next decade.
For example, after SPS 04, (revision 40) corrections were released in revisions 41, 42,
43, etc., at regular bimonthly interva ls until the next SPS 05 was released, and t he
revision counter was updated to 50 to sync the numbers. Starting with SAP HANA 2.0
SPS 02, the release interval was changed to once a year.
Although you sometimes read about release 2.4 to reference the longer and idiosyn-
cratic 2.0 SPS 04 format, this practice is not used in official SAP publications. Note
also that only since t he 2.0 release has t he 1.0 label been ret roactively applied to
older releases. Older materia l will not include t his marker and simply refer to SAP
HANA SPS nn.
71
2 Technology Overview
Technology Background
SAP has a standardized process for int roducing new solutions to the market, called
the SAP Early Adopter Care program ("ramp-up" previously). The softwa re is released
to customer (RTC}, so there are no beta versions, but th is program rest ricts these
releases to certain customers wit h extensive support from SAP. The fi rst release after
the RTC program is GA (general availability).
SAP HANA ramp-up started in November 2010 with the results announced at SAP-
PHIRE 2011. GA was June 2011 (with SPS 02).
SAP Notes
The very first SAP HANA revision release note dates from November 2010: SAP Note
1S33048 - SAP IMCE 1.0 Revision 0 for SAP HANA 1.00 (together with SAP Note
1514967 - SAP HANA: Centra l Note for t he appliance). SPSs are released at the appli-
ance level, for example SAP HANA Appliance Software SPS 03 release note. After t he
la unch of the t ailored data center integrat ion (TDI) program (see Chapter 9, Section
9.4.2) with SPS 06, in the name of the release note, "Appliance Software" changed to
"Platform".
72
2.4 What's New: Support Package Stacks and Revisions
For this reason, you'll find information (data) modeling 1vith SAP HANA studio well
documented early on, 1.vhich was also reflected in the initial SAP HANA trainings.
For developers, SPS 04 introduced a repository and delivery units for application life-
cycle management, together with SQLScript for scripted calculation views. The UI
toolkit for Information Access (InA) provided the building blocks for developing
search-based applications. You had to import the delivery unit yourself and enable a
new xsengine process. Early on, R integration enabled the embedding of R scripts for
SAP HAN1\ database executions. Both developments pointed to the future, when SAP
HANA would mature from a database appliance to a full-fledged in-memory plat-
form.
73
2 Technology Overview
• BACKINT SDK for SAP HANA, an application programming interface (AP!) for
third-party backup tools
• Data volume encryption
• Separate network zones
• Password blacklists
• Performance monitoring tools like the Plan Visualizer
For development, the AFL was introduced for the BFL and the PAL. Vvith full-text and
fuzzy search, you can now perform text analysis as an in-database process.
SAP HANA was added to the platform, and InA changed to the UI development toolkit
for HTMLS (SAPUIS). SAP HANA XS added server-side JavaScript programming, sup-
port for OData and XML for Analysis (XMLA), offered a web server serving static con-
tent from a repository, and featured a web application development environment
with a new development perspective fo r the SAP HANA studio as principal IDE (for
novv).
Concepts like runtime objects and design-time artifacts were documented, and new
roles were added. For the first year, SAP HANA XS application development was only
available in ramp-up as an SAP-led project solution for preapproved customers and
partners.
74
2.4 What's New: Support Package Stacks and Revisions
75
2 Technology Overview
SAP HANA server. Improvements were m ade to modeling, native development, and
spatial enhancements. The River Definition Language (RDL) and Rapid Development
Environment (ROE) were also introduced with this release to simplify enterprise
application development, soon to be discontinued as a standalone project and mor-
phed into the SAP Web IDE, a single web development environment for both SAP
HANA on-premise and for the enterprise SAP HANA platform-as-a-service (PaaS}-
SAP HANA Cloud Platform (with "HANA" later dropped from the name).
76
2.4 What's New: Support Package Stacks and Revisions
77
2 Technology Overview
was an important driver in the tooling area, and these online and offline tools wo uld
soon be merged.
78
2.4 What's New: Support Package Stacks and Revisions
79
2 Technology Overview
80
2.4 What's New: Support Package Stacks and Revisions
For high availability and disaster recovery topics, continuous improvement added
multitarget system replication, invisible takeover for the client, and secondary time
travel capabilities, enabling you to fix logical errors and human mistakes. On the sys-
tem administration side, fallback snapshots for tenant databases, fast database reset,
and system database restore were added.
For data integration, the ability to create a remote source for Google BigQuery data-
bases and the latest Teradata, Oracle, SQL Server, and DBZ releases (at the time) was
added. Integration of blockchain was enabled by leveraging an SAP Cloud Platform
service.
As with every release, a long list was issued of new and changed featu res for SQL-
Script, including a MapReduce operator and user-defined libraries, and for SQL state-
ment support, SQL functions, and system views. The same applies to algorithms
added to the PAL, which now also includes a model evaluation and parameter selec-
tion tool, and the new GraphScript extensions and spatial methods.
For native development, the Python runtime is now supported, and new features
were added to CDS, the HD I-in particular to the SAP \.Veb IDE (Git integration, calcu-
lation views, CDS, flowgraphs, and annotation modeler) and the database explorer
(graph workspace viewers, table types, background activities, code analyzer, debug-
ger, and remote sources). Shared business authorizations enable you to create ana-
lytic privileges in SAP HANA based on the authorization objects used in SAP
S/4HANA, SAP BW, and other ABAP-based applications.
For the first time since the launch of SAP HANA, development and product manage-
ment could work for a full year on a single release. The innovation pace had not
exactly slowed down-the list of new and changed features only grew- but now
changes are introduced annually and not twice a year (that is, for the on-premise edi-
tion). Just vvhen the concept of timeless software seemed further away than ever
before, cloud priority brought it back on the table again: Innovation without disrup-
tion remained as valid as 10 years before. For the next release, new features were
released, almost on a monthly basis, to the SAP HANA cloud edition, the database
behind the SAP Cloud Platform, SAP HANA service in the Cloud Foundry environ-
ment.
81
2 Technology Overview
Center and SAP's product development resources affirming SAP HANA as the heart
and soul of SJ.\P.
With this release, we learned that the development focus has been on three areas:
• Intelligence
Intelligence references the intelligent technologies already mentioned and also
the familiar hybrid transactional analytical workload and SAP HANA as platform
for advanced analytics with in-database, in-memory processing of spatial, graph,
series, and text data and event streaming.
• Efficiency
This single platform also drives efficiency, simplifying IT landscapes at a lower
TCO also provided through the use of persistent memory (Intel Optane DC) and
native storage extensions for data aging.
• Agility
Agility comes with support for multiple cloud providers, on-premise landscapes,
and its combination (also referenced as hybrid), extended recently with hyper-
converged infrastructure (HCI), which brings cloud computing back home to the
enterprise. New spatial clustering options and further enhancements to data
anonymization are also results from this focus.
Apart from these three recurring themes, the democratization of in-memory com-
puting is now also stressed: SAP HANA is for everyone.
Learn More
For the latest announcements about SAP HANA, visit the SAP News Center at http://
s-prs.co/v488409.
For system management, a new configuration framework has been introduced for
system properties (INI files), workload management and SQL Plan Stability, and
memory management, including a fast restart option that leverages the persistent
memory implementation but by using the tmpfs file system instead. New as well are
application-time period tables to extend the functionality to manage historical data,
complementing system-versioned tables and changes to table management for par-
titioning and data aging.
82
2.4 What's New: Support Package Stacks and Revisions
For high availability, as with every release, system replication has been improved and
enhanced once again, this time with takeover handshakes, fallback snapshots, time
travel extensions, multitarget configurations, and session recovery, plus some minor
enhancements to backup and recovery capabilities.
For security, new and improved features were introduced for auditing, data ano-
nymization, and client-side encryption, to name but a few, and many new feat ures
were released as well for the SAP HANA cockpit and the SAP EA Designer tool.
For previous releases, we've only mentioned the most relevant new fu nctionalities. To
give you an idea of the scope of the innovations and the volume of new functionality
introduced, let's walk through a more complete list just on the topic of development.
Learn More
With each new SPS release, usua lly, the product management and documentation
teams at SAP publish a blog on the SAP Community porta l. If you want to be
informed about when new biogs are posted, just follow the SAP HANA tag (or follow
the authors).
The SAP HANA SQLScript reference lists 37 new and changed features including auto-
commit data definition language (DDL) control, anonymous block plan caching, new
code analyzer rules, and other items that may require a certain fam iliarity to be fully
appreciated.
The same is true for the PAL, which includes some architectural changes, including
nine new algorithms and nine changed algorithms. T-distributed stochastic neighbor
embedding is new, for example; you might want to check out the other new algo-
rithms as well.
For graph processing, SAP HANA now has several new and changed features for
GraphScript extensions, for openCypher support, and for the graph workspace
viewer.
For spatial processing, SAP HANA spatial services now has over a dozen new meth-
ods, a new "zero tolerance" exact computation paradigm, and a reduced memory
footprint of up to 50% benefits in-memory representations of geometries in planar
spatial reference systems.
83
2 Technology Overview
For client interfaces. su pport for 1Pv6 and Microsoft Windows Server 2019 was added.
New connection properties and statement attributes for the SQLDBC driver, new
ODBC tracing options for hdbsqldbc _cons, and forced statement routing to a site for
active/active read-enabled system replication have also been added. New cursor class
methods are supported for Pyt hon as are a new driver for Node.js and nev,r methods.
Prepared statements can be cached on first use and closed prepared statements can
be cached. New JDBC connection properties, methods, AP! support, and trace options
have been added. Additional fu nctionalities include new nochop option fo r the hdbsql
command line tool, a new driver session variable, a new driver for Microsoft .NET
Core, and new machine learning APis for Python and R, plus support fo r client-side
encryption of the decimal data type.
Concerning SQL and system views, 45 SQL statement were changed, and 11 new ones
added. Nine SQL functions were altered, and fo ur new ones have been added, for
example, ALLOW_PRECISI ON_LOSS. For system views. 52 statements have changed, 28
added, and 1 removed. In addition, application-time period tables are now supported,
and the statement for client-side encryption to support key rotation and the ARIA-
256-CBC block algorithm has been changed, while new and changed views support
anonymized views. Changes to hints, inline annotations, partial rollback, and colla-
tion specification have also been made.
Space does not allow us to elaborate further on what's new for the SAP Web IDE, the
HD!, SAP HANA XS Advanced development, text search, hierarchy functions, the
EML, and SHINE, but the list goes on and on. SAP HANA has been on an impressive
innovation journey.
84
2.5 Deployment Options
On-Premise
Corporate Data Center
TOI (DIV)
Appliance
SAP HANA Ent erprise Cloud SAP Cloud Platform (PaaS) laaS
SAP HANA
Neo (SAP) Cloud Found ry
(laaS) I SAP HANA (BYOL)
I
SAP Applicat ions
SAP HANA
Service
SAP HANA
Service
I SAP Applications
I
SAP Services SAP HANA,
Ex press Edition
2.5.1 On-Premise
As described earlier, SAP HANA was initially only available as an appliance. Choice
was limited in the early days, and the available appliances were presented in different
sizes like T-shirts. Not every customer was pleased by this almost one-size-fits-all
approach, so a new program was launched to address this problem. To stick with the
clothing metaphor, the program was called tailored data center integration (TDI), and
customers could look for Certified Appliances and Certified Enterprise Storage in the
SAP HANA hardware directory (http://s -prs.co/v488410). Today, the directory lists a
great number of possible configurations, now including Certified laaS Platforms for
cloud-hosted environments from IaaS providers.
85
2 Technology Overview
offers computing services either at your own corporate data center or from a p ublic
cloud provider that is only available to a restricted audience. Both types offer the
same benefits, like scalability, elasticity, and self-service. In other words, no IT depart-
ment required, flexible and adaptable- start and stop as desired, create or terminate
on-demand- and without any capital expenditure, \Vith the ability to scale from
minute to massive (and back again) in little time, pay-as-you-go. Although a smorgas-
bord of different services are provided by these cloud providers, we generally distin-
guish between IaaS and PaaS offerings:
• IaaS: Provides the virtual machines, storage, network, and related services (fire-
walls)
• PaaS: PaaS provides the m iddleware (database, application server, and related ser-
vices)
To deploy SAP HANA in the cloud, you'll choose among different options depending
on how much yo u want to control (and do yourself) or ho\v much you need just a
database-as-a-service (DBaaS), which we'll cover in the following sections.
86
2.5 Deployment Options
87
2 Technology Overview
Technology Background
When introduced together with the SAP HANA Enterprise Cloud at the SAPPHIRE
NOW conference in 2013, the name "HANA Cloud Plat form" and t he acronyms HCP
and HEC ca used some confusion at the time (and maybe still do) since not everyone
is famil iar with public and private clouds or wit h the various service models (laaS,
PaaS, etc.). In 2017, HCP was renamed as SAP Cloud Platform.
Th is enterprise PaaS solution enables you to bu ild and ext end business applications.
As mentioned earlier, think of PaaS as the database/application server part. The
cloud platform project was started in 2009 to bring SAP Net Weaver to t he cloud. The
name chosen was "NetWeaver-on-demand," or Neo, and this name is still reflected
in t he URL for t he plat form: hana.ondemand.com, as the software development kit
{SOK) client command line tool, and in t he name of one of t he SAP Cloud Platform
environments (Neo, t he other being Cloud Foundry).
Learn More
For a product overview, the key benefits and capabilities, business cases and cus-
t omer references, plus the ava ilable business services, see t he product page for SAP
HANA Enterprise Cloud.
88
2.5 Deployment Options
between ru nning SAP HANA on-premise or using the SAP Cloud Platform, SAP HANA
service.
Alter by Area:
S.srch Q All v
M 'mm
"""""' Total
Figure 2.6 SAP Cloud Platform, SAP HANA Service: SAP HANA Cockpit
How exactly you're charged for the service will depend on the service plan, on the
SAP HANA edition (standard or enterprise), and on the environment where SAP
HANA is running: Neo or Cloud Foundry (see Chapter 4, Section 4.9.1). Figure 2.7
89
2 Technology Overview
shows the SAP Cloud Platform cockpit, where you can create subaccounts for the dif-
ferent environments.
Ne-11 Subaccount
,, IIl If ID If ID
Learn how global a~unts and subaccounts relate to each other and find recommendations for setting up your atcount model
Learn More
For the documentation, see SAP Cloud Platform SAP HANA Service on the SAP Help
Portal.
The SAP Cloud Platform, SAP HANA service, has its own feature scope description
document distinct from the SAP HANA platform. This document lists which features
are included in t he sta ndard and enterprise ed itions for bot h t he Cloud Foundry and
Neo environments.
Tutorials
To learn more about the SAP Cloud Platform, SAP HANA service, try t he hands-on
tutorials from the SAP Developer Cent er or watch the tutorial videos from t he SAP
HANA Academy channel on YouTube:
• SAP Developer Center, Tutorial Navigator
• SAP HANA Academy: SAP Cloud Platform, SAP HANA service
90
2.5 Deployment Options
Solution A ~;:~
---
------- -------------~~-'_ns_t_an_c_e_~
Solution B I
-- ... _...... Microsoft Azure
~--
Solution C
--- -- ~-----~---..i Instance
-~ ~----~
~ ........ Instance I
Solution D
....................................
Compared to the traditional on-premise delivery method, vvith SAP Cloud Appliance
Library you can reduce the deployment time from vveeks to minu tes by skipping sev-
eral steps, such as hardware and infrastructure setup, the installation of the operat-
ing system and SAP software, mandatory and time-consuming configuration
activities, and solution validation at the end. All you need to do in the SAP Cloud
Appliance Library is to link your library to a cloud infrastructure provider (AWS,
Azure, GCP, etc.) and create an instance. Initial startup will take some time to copy t he
image and deploy the solution, but all subsequent start ups will be fast.
Although you would of course benefit most from the SAP Cloud Appliance Library
solutions that took experts weeks to install and configure, you'll also find basic solu-
tions like the SAP HANA platform and the SAP HANA, express edition. If you sign up
91
2 Technology Overview
for an openSAP course (see Chapter 10, Section 10.1.2}. you may find that a SAP Cloud
Appliance Library solution has already been prepared, so you can enhance your edu-
cation with hands-on exercises on your o~vn private training system.
Figure 2.9 shows the different solutions available in the SAP Cloud Appliance Library.
With a single click, you can start creating the instance. v;hich in basic configuration
mode only requires you name the instance and provide a master password. In
advanced mode, you can change network configurations, virtual machine templates,
and other technical details.
SAP SOL Data War*"ousJng (Devt lOPtr EID Amazon V\'eb Services.
edition) ti.tk rosott Azure, 0 Activated create IMtance •••
SAP SE I Sep 13, 2018 Goog\e Cloud Pla~f0tm
SAP Model Company lor Fashion and Vertical .a All'lazon 'A'eb servkes,
Business V2 with CAA add·On t-.bcrosott Azure. e Available Creatt lnsQOCt
-·
SAPS.E I sep 4 , 2018 Google Cloud Platf0tm
-·
SAP HANA, Platform Edldon 2.0 SPS03 4 1;111•
h.iiCrosott A.lure , • AvaHable Create lnstal'ICe
-
SAP SE I Aug 13, 2018 Googlt Cl.oud PlatfOfm
SAP Busi ness One 9,l . vets.Ion tor SAP EID Mazon Y..'eb Strvicts.
HANA PL4 h.t icrosott Azure, e Available Create Instance •••
SAP SE I '-"I 8. 2018
-
Google Ct.ood Pt.fltf«m
92
2.6 Summary
Learn More
To learn more about the SAP Cloud Applia nce Library, see the SAP Community page
SAP Community for the Cloud Appliance Library and the SAP Cloud Appliance Library
portal itself at http://s-prs.co/v488477.
Tutorials
Tutorials are available at the SAP Developer Center and the SAP HANA Academy that
cover how to sign up to SAP, create accounts, and create solution instances.
2.6 Summary
Congratulations! You've made it to the end of this overview chapter. We've covered a
lot of material, but now you can confidently tackle the rest of the book. In this chap-
ter, we reviewed the history of databases and the genesis of the in-memory platform.
We described system architectures, various processes and services, memory and per-
sistence, scale-out configurations, databases and application servers, and data tier-
ing. We clarified SAP HANA editions and options and then briefly paused at the
different SPSs released since 2010 to get a complete picture of how continuous inno-
vation created the in-memory platform as it exists today. Finally, we explored the
deployment options, in particular for the cloud, and introduced the SAP Cloud Plat-
form, SAP HANA service.
In the following chapters, we'll focus on the different personas working with the plat-
form, for instance the administrator, the developer, and the data center architect.
We'll start \Vith the administrator in the next chapter, as we turn to the topic of SAP
HANA administration.
93
Chapter 3
Administration
If one thing goes wrong, everything else will, and at the same time.
- Peter Drucker
To "administer" means to "serve." At least, that is the origin of the word. We serve the
end user (or to use the terminology more common at SAP, the business user). The
goal of the business is to make money (corporate missions and visions aside), and
your business users will be busy trying to achieve this goal. Your systems need to
support the business user by automating business processes and repetitive tasks, so
your business users are free to innovate and think of new ways to make money. The
system will need to do its job, and to ensure that your system works in optimal form,
you'll need an administrator, not to serve the machine, but to make sure the machine
serves the business.
In this chapter, we'll introduce you to the topic of SAP HANA administration, describe
the role of the administrator persona, and look at some of the tools that are used.
We'll cover typical administration topics like system configuration, resource man-
agement, backup and recovery, performance monitoring and analysis, and security.
In addition, we'll also address administration activities associated with SAP HANA
extended application services (SAP HANA XS) and look at lifecycle management,
both for the platform and for applications. Some of the responsibilities of the admin-
istrator persona, as defined by SAP HANA product management, touch on those of
the security architect, the data integration architect, the data architect, and the data
center architect. In these cases, these topics will be covered in subsequent chapters.
95
3 Administration
96
3.1 Role and Tools
Depending on your organization and how the SAP HANA platform will be used. your
administrator may also get involved for system maintenance. Executing server and
client updates, adding additional components, and configuring the overall system
landscape all need to be managed, generally referred to as platform lifecycle manage-
ment. But the platform also contains the runtimes for hosting applications {"powered
by HANA"}, so you'll also need to pay attention to the lifecycles of applications.
Besides application installation, configuration, and updates, application lifecycle
management also covers transporting content from development to production in a
managed, staged approach.
3.1.2 Tools
The principal tool for system administration for SAP HANA 2.0 is the SAP HANA cock-
pit, a web-based tool that integrates both application and platform lifecycle manage-
ment tools. In addition, or as an alternative, other tools are available to administrators
to address specific requirements. We'll discuss each in the following sections.
97
3 Administration
0 x
4cadm@mo-lcaae8fcb. mo :/usr/sap/H4C/HOB96>
4cadm@mo-lcaae8fcb.mo :/usr/sap/H4C/HOB96> HOB
sage : /usr/sap/H4C/HOB96/HDB { startlstoplreconflrestartlversionlinfolprocladminlkilllkill-<sig>lterm
)
kill or kill-9 should never be used in productive environment!
4cadm@mo-lcaae8!cb.mo :/usr/sap/H4C/HDB96> sapcontrol -nr 96 -!unction GetProcessList
I
30 . 05 . 2019 13 :19 :59
tProcessList
K
ame, descript ion, dispstatus , textstatus, starttime, elapsedt i me, pid
dbdaemon, HOB Daemon, GREEN, Runn i ng, 2019 05 30 12: 59 :08, 0 :20 : 51 , 3059
dbcompileserver, HOB Compileserver, GREEN, Running, 2019 05 30 12 :59 :22, 0 :20 : 37 , 3247
dbdiserve r, HOB Depl oyment Infrastructure Server, GREEN, Running, 2019 05 30 12 : 59 :24, 0 :20 : 35 , 3289
dbnameserver, HOB Nameserver, GREEN, Running , 2019 05 30 12: 59: 09, 0 :20 :50, 3080
dbpreprocessor, HOB Preprocessor, GREEN, Running, 2019 05 30 12 : 59 : 22 , 0 : 20 : 37, 3249
dbxscontroller, HOB XS controller , GREEN, Running , 2019 05 30 12 : 59: 24 , 0 : 20 : 35, 3291
dbxsexecagent , HOB XS Execution Agent, GREEN, Running, 2019 05 30 12 :59 :24 , 0 :20 : 35, 3293
dbxsuaaserver, HOB XS UAA server, GREEN, Running, 2019 05 30 12 : 59 : 24 , 0 : 20 : 35, 3296
4cadm@mo-lcaae8tcb.mo :/usr/sap/H4C/HOB96>
4cadm@mo-lcaae8tcb.mo :/usr/sap/H4C/HOB96> HOB info
SER PIO PPIO \CPU VSZ RSS COMMAND
4cadm 10184 10183 0 . 1 15260 4168 -bash
4cadm 10370 10184 0 .0 13204 1848 \ /bin/sh /usr/sap/H4C/HDB96/HDB into
4cadm 10401 10370 0 . 0 26824 1624 - \_ po tx -u h4cadm -o user :8, pid :8, ppid : 8, p
4cadm 3051 1 0 .0 21856 1788 sapstart pf•/usr/sap/H4C/SYS/profile/H4C_HOB96_m
4cadm 3059 3051 0 .0 203396 34192 \_ /usr/sap/H4C/HDB96/mo-lcaaeBfcb .mo . sap . corp/
4cadm 3080 3059 12 . 8 8265656 6191568 \ hdbnameserver
4cadm 3247 3059 0 . 7 1669284 316848 ,- hdbcompileserver
4cadm 3249 3059 O. 5 1873796 306444 \ hdbpreprocessor
4cadm 3289 3059 0 . 4 1651000 266744 \: hdbdiserver
..
•• /' ,.,. e - - -..
..., l'i:::i1 .,.. . .c.
-. '• . . ..
r· , "' ·~1
Learn More
If you're new to Linux and would like to learn more, look at t he SAP on Linu x topic in
the SAP Community, where you'll find relevant links, SAP Notes and knowledge base
articles, t he latest biogs, and Q&As on t his topic.
SAP HANA runs on SUSE Li nux Enterprise Server {SLES) and on Red Hat Enterprise
Linux {RHEL), wh ich we'll discuss f urther in Chapt er 9. Both SAP software partners for
the operating system provide excellent t raining opportu nities and documentation.
To lea rn more, visit :
• http://s-prs.co/v488472
• http://s-prs.co/v488473
98
3.1 Role and Tools
term inal (hdbsql), which is a command line tool used, for example, by the installation
program to execute installation scripts.
To effectively work with the tool, you should keep a copy of the command line refer-
ence at hand or familiarize yourself with the help menu, since like most command
line tools (vi , for example), hdbsql is not particularly user friendly. However, to auto-
mate script executions (housekeeping and backups, often in combination with the
Linux cron scheduler), hdbsql can be quite useful. The complementary tool hdbuser-
store enables you to put the connect string including passv1ord in a key stored safely
in the user store file. Alternatives for hdbsql are the SQL console in SAP HANA studio
and the database explorer (included in the SAP Web IDE and the SAP HANA cockpit),
which we'll discuss next.
Learn More
You won't fi nd the hdbsql command line reference in the Reference section of t he
SAP HANA platform documentation on the SAP Help Portal; instead, you'll need to
refer to t he SAP HANA Administration Guide.
Those familiar with SAP MaxDB command line tools will enjoy an easy learning curve
since both the SAP HANA interactive terminal and t he SAP HANA user store originat e
from th is database and share ma ny of its flags and options.
At the outset, the focus for SAP HANA development has been the core in-memory
computing engine and not on peripherals like tools for development and administra-
tion. Since Eclipse already provided a development environment for SAP NetWeaver
Application Server for Java (SAP NetWeaver AS for Java), SAP development decided to
create another plugin to add the required functionality for SAP HANA. Although the
large number of menu items and perspectives related to Java development brought
some clutter to the hdbstudio plugin, general familiarity with the Eclipse IDE among
developers made the learning curve small, and SAP HANA studio quickly became an
accepted and broadly used tool. Other SAP development tools, like ABAP Develop-
99
3 Administration
ment Tools (ADT), SAP Business Warehouse (SAP BW) modeling, and the SAP Cloud
Platform software development kit (SOK) followed this direction and were also pro-
vided as Eclipse plugins.
SAP HANA studio is bundled with other SAP HANA components on the installation
media. However, as a plugin, you can also add it to a regular Eclipse installation using
the SAP HANA tools website (http://s-prs.co/v488414).
Figure 3.2 shows hdbstudio with the Systems view on the left and the administration
perspective on the right. Additional perspectives exist for development and model-
ing.
Development for SAP HANA studio ended with the last SAP HANA 1.0 support pack-
age stack (SPS) 12 release in May 2016. SAP HANA studio is still included with the SAP
HANA 2.0 releases but lacks the corresponding user interfaces (Uls) for the latest func-
tionality. In 2017, a deprecation note was published for the repository, SAP HANA XS
(the original implementation of the built-in application server), and related tools like
SAP HANA studio. SAP HANA studio is no longer supported for use with the latest
SAP HANA cloud edition (SAP Cloud Platform, SAP HANA service for the Cloud
Foundry environment).
·-.
d·
fo SytteMS tl ~ 0 I I S'YSTEMOMHAO tl
hdbstudio - System: SYSTEM08@1HA0
: gg '1' .EI
... 0
!If· lil I !S e ~ 0
rfi SYSTEMOB@HAO (SYSTEM) ie- ~uv.I: 6lO • Seconds fa •
;Ji- ·
mo·lc331b341.JnO.sap.c«pOO L.,t Update: M.y 2 7, 2019 1:11:24 PM (9>
• {5SYSTEM086'HAO !SYSTEM)
.. (lt.c.~ioo ls.vie'"1 Hosts Aed i$111bUtion Sys~•m RepbbGn J Hol.1: <All> 'l} ~Wet-: <All> __;!) IC Ho
• 19-Centent
A«i... HoSI Pot1 StMc• ... 0t11ll Slt tl Tlm<t Proe••• 10 CPU 1.wnocy UMd MtmOtY (MB)
.. 8ii>ubk I! mo·fc:33M61.mo.sap.corp )()()10 compilestr.,... May 27, 2019 11 :OS:<M AM 3300 I II I 1,310
• fl sap 8 IYIO•fC:337bl61 .tnO,tlC).cotp 30000 $tmot'I M1y17, 1019 t1:0C~OAM 3075 0
.. , , lytltm-loul
!I mo·ft337b361,mo.up.eorp )()()01 Nmes.erve1 mMter May27, 2019 t1:0C:60AM 3095 !====ii"===· ..: 4,035
• &;Provisionrtg • 1,5-47
• mo· fc337bl6, ,mo,,ap.c0tp 30002 prop1oc.''°' M•yl7, 20,911:()5:04 AM 3302
~ Sf!W1 0111 ACCHs
l!!!I mo·fc3:JM61,mo.f.ap.<:Otp )0006 wobdispata,.r May 27, 2019 t 1 :()6:23 AM 3871 1,656
'9RemO(e Sources '
.,, 12tSKurlty
tl sec:urity
• ff ~n .I
"' liJRoles 'I
O it.tfT!s sflected
"
Learn More
SAP HANA studio is documented in the administration, modeling, and development
guides for the SAP HANA platform, which you can read or download from the SAP
Help Portal.
100
3.1 Role and Tools
SAP Notes
For additional informat ion, see t he fol lowing SAP Notes:
• SAP Note 2073112 - FAQ: SAP HANA Studio
• SAP Note 2465027 - Deprecation of SAP HANA extended application services,
classic model and SAP HANA Re pository
• SAP Note 2693731 - Statement on SAP HANA Studio and SAP Cloud Platform, SAP
HANA Service
For SAP HANA 2.0, the SAP HANA cockpit was completely redesigned and integrated
the functionality of the offline cockpit and SAP DB Control Center to provide the fol-
lowing abilities:
• Monitoring and administration of SAP HANA system landscapes (aggregate mon-
itoring)
• Monitoring and administration of individual SAP HANA systems and tenant data-
bases, including resource and service management (start/stop), resource usage
{CPU, memory, disk), alerts, and system properties
• Performance monitoring and analysis, including expensive statements, threads,
sessions, blocked transactions, hints, SQL plan cache, and the SQL Analyzer
101
3 Administration
Learn More
The SAP HANA cockpit has its own area separate f rom t he SAP HANA platform on t he
SAP Help Porta l (SAP HANA Cockpit, where you'll find the What's New guide, t he
Installation and Update Guide, Administration Guide, and the guide for the Database
Explorer.
102
3.1 Role and Tools
A good introduction to the SAP HANA cockpit is provided by the openSAP course
"Introduction to SAP HANA Administration." Visit the https://opensap.com/ website
for updates.
SAP Notes
For additional information, see the followi ng SAP Notes:
• SAP Note 2380291 - SAP HANA 2.0 Cockpit Central Release Note
• SAP Note 2433181 - SAP HANA 2.0 Cockpit Revision and Ma intenance Strategy
103
3 Administration
SAP HANA XS Advanced Admin Tool and SAP HANA XS Advanced Cockpit
For administering both SAP HANA XS, classic model and SAP HANA XS, advanced
model application server runtimes, you'll use the SAP HANA XS Admin tool and the
SAP HANA XS Advanced cockpit, respectively. As the runtimes are different, the func-
tionalities provided by the tools differ as well, but both include menus to configure
certificates and the Secure Sockets Layer (SSL}, for example. We'll describe both tools
in more detail in Section 3.4.
DBA Cockpit
Basis administrators can use the SAP NetWeaver-based DBA Cockpit tool for database
administration (often described as AnyDB in SAP publications}. With the DBA cock-
pit, you can stop and start databases, configure system parameters, schedule back-
ups, monitor operations, and troubleshoot performance issues. Support for SAP
HANA was provided early on, and for some time, the DBA Cockpit was the only tool
you could use to schedule backups. The advantage of using this tool is at the same
time its main disadvantage: The DBA Cockpit works great for generic database func-
tionality but less so for specific feature support.
Learn More
The DBA Cockpit for SAP HANA is documented in the SAP NetWeaver documentation
on the SAP Help Porta l.
SAP Notes
For add itional information, see SAP Note 2222220- FAQ: SAP HANA DBACOCKPIT.
104
3.2 Syst em Administ rat ion
Now that we've previewed the tools used by the administrator, let's dive into the sys-
tem administration process. The most important administration activities concern
system configuration, performance monitoring and analysis (troubleshooting},
resource management, security, and backup and recovery. We'll cover each of these
activities in the following sections.
105
3 Administration
studio have a view to configure system parameters, as shown in Figure 3.3 and Figure
3.4, respectively.
.._ Cl
Conf9,Jtlllon , .
XUflgil'lt 111'11 v
s.a~
........., v ""'
,... v
m
Parameter• (8) ,,,. ...... .,..,.... T........... v.w ca-. Hl*'Y
OEFAULT
·- lS(SAPSV$TEM)Gf
Edit~VMle
""""' ...,.,
®
0 WOl'W"l)O(lbi:e DEFAULT
• Cl\.ulge Uye1
a •· Sy«ern: ~HAO Holt mo·f<Jllb361.mo.up.cocp~•ncc OOCOM«tt'Ci Us.tr. D8A System lk.qc Cu~tom ~em· SAP HANA Studio x
file Eck NIVi9'(t Piojt<t RA.lt'I W.-.dow Http "
to ~ems t3 • 0 II HA~- !:! oo 8
:tll · l ti!l ll · •~ EI ~ • l!i. HAO@H/\0 (OBA) l.HtUpd.tt: Jul ll,Z01911:U:llAM~ I Ct> lnttrV•t ~
v 1l,, HAOOHAO (DOA)
> a.. c~ OwMtw Landsc•pe Alerts PerformMKe VolumtsJ conligurmon ~ttm ...fom1ation~Dw~sis Flies Tr1ce~rlbon q;
) . . (Otlttnt
x
··-
> Qt. Pt1Msioning
> Qt. SKurity
lSJ HAOOHAO(SYST"q
........ Systtm Hcxt • mo·fc3J7bl61.mo.-
) [) •ttriibul:~lnl
> ~ SV$T(MO$CH4( (C0<KPfT.A0MIN) ) Ii (.C~NO'.lnii
) 13 di~ttvtt.ini
> [j dornore..ini
•
) [il d~tfYO,ini
) ll HStMf,ifii
) I) CXt<VlOf.ini
) Ii) 9lc1Ml.ini • •
) Ill Sldtntl\'U.ini
) [j mu"idb,ini
• •
) Ii ldfyn<""""'.lnl
) [il KriplStfWl'.ini
> (il sutisticsstl\'ttJni
) (j Wtaming$0Vt:t.ini
) (il x:scontrolltt.-,i
v lj Ueft9l~
) [ J application_<ont.aititr
• •
>[)
.,.,
comm11t1ic.ttion
) ( ) 9t0<oding
.........
v ( J hetP'tf'Vtr
•
~tnpo11 ""'
JUSAPSYSTEt.1)08
106
3.2 System Administration
Although both editors enable you to view and change parameters, with t he SAP
HANA cockpit, you can take a snapshot of a configuration (for example, to establish a
baseline just after the initial installation), compare parameters with other databases
and with snapshots, add comments, and view the parameter change history.
To manage multiple resources, the SAP HANA cockpit also provides Manage Land-
scape functionality on the homepage, shown in Figure 3.5, where you'll find the tiles
for creating Configuration Templates. These templates enable you to define a default
configuration for tenant (or system) databases for specific environments or applica-
tions. You could create, for example, a template for training databases or a template
for an SAP BW/4HANA database. Another example could be a corporate password
policy applied to all databases.
With the Compare Configurations tile shown in Figure 3.6, you can compare system
parameters across systems or with a template snapshot. This same functionality is
available for a specific database in the system configuration view, but in this case,
you can more easily compare all the databases in your landscape.
Home
·-
·-
I ~Mt11s1-..s
1
Ho fffOl.R:a ft91$1eted lfo tesoufteS fe91*red
[!;!;!
Manage landscape
<-
=,
SAP eanywatcn
Alen
($-UH< requhd)
107
3 Administration
-
xs,engint.ini(4) v
Pa1Jmt1tr ltyO<
¢
-
Source Valle Targtl Valut
0.
DATABASE
INt
moxthreads SYSTEIA ¢ 10
WOl'kt1poobil• SYSTEIA ¢ s
Learn More
To learn more about each of the parameters, the name of the INI fi le, its purpose,
default value, and whether a system restart is required, consult the SAP HANA Con -
figuration Parameter Reference. You can read or download this guide from the SAP
Help Portal.
SAP Notes
For additional info rmation, see the following SAP Notes:
• SAP Note 2186744- FAQ: SAP HANA Parameters
• SAP Note 2600030 - Parameter Recommendations in SAP HANA Environments
108
3.2 System Administration
System Overview v c ®
HAO@HAO s.."" o.....,.
v
100 Total 0
.. Threads
.. •
.. Disk Usage
0
20
I Disk K>: S40761
Total Uuge
Data
47.61 GiB -
3.95 Gi8 •
116.73 GIB Monitoring
Monitor perfonnanoe
..,,.
U>g 2.02 GiB '
• 12.se
..
1J:J6
Ttaee 16MM8 Monitor system health
Monitor table U$8ge
Open blocked trans.actions
Monitor netwoni;
..,.,.
·--
Mita PS CONNECTION_IO A.$ "Con~ 10", SC1.VAL... ...dy Troubleshoot unresponsive systems
""""'Enabled Plans
Total
Manage full system information dumps
Total Yalld Plan•
~
The performance monitoring tools display charts and statistics for a large number of
KPls, so you can start to analyze the historical performance of the system with sup-
port of additional tools (or apps), such as the following:
• Thread s
Each task executed on the SAP HANA server, like the execution of a SQL statement,
is performed by a thread. With the Threads app of the SAP HANA cockpit, you'll
find all the relevant information for each thread active on the system, for example,
the action it is performing, for which service, duration, and more, as shown in
Figure 3.8 (sourced from the SYS.M_SERVICE_THREADS monitoring view). From
the Threads app, you can navigate to the Sessions and Blocked Transactions apps
for additional analysis.
109
3 Administration
® c
~
v Summary
Top 5 Users
•I
i
I
-
System o...view
RtsOIM'oe Olrtetoty
Home
at
-
Tr•nsM:lloos ......,.
St.itemetts hreads by Type
.......
I 010
,,
v Th <adft>® v H v -
Thread Clltn9
TrWIHC:lion
""" - c.. ...,.,.. ll --
300434 300434.1.112$
10
3749 3793
30003 - ...
TtvNd Med'IOd ExeoAePrep¥ed
TlwNdo..al
SELECT "'THREAOO "HOST" AS HOST. "'THREADS" "1'0RT" AS PORT. "'THREADS" "&RVICE_NAME" AS SERVICE_NAME. ~s· "HIERARCHI'" AS HERARCHY."THREADS" "CONtlE(
S mG•fc3371>361 30003 lndtxstt\'tf 3004.34 3004.)4.'·1128 3793 3975 3749 JobWO!t¢W
• Sessions
A session corresponds to a database connection. The Sessions app shows the activ-
ity for each session, connection details, session status, transaction status, and
more. Around 30 different values can be selected that are sourced from the M
CONNECTIONS system view.
• Blocked Transactions
Also called transactionally blocked threads, these transactions are waiting for each
other transactions to complete because they need to acquire a record, table, or
metadata lock. The data is sourced from the M_BLOCKED_TRANSACTIONS system
view. The app looks identical to the Sessions app and the Threads app, which is
shown in Figure 3.8.
• Monitor St atements
The Monitor Statements app. shown in Figure 3.9, displays the currently active SQL
statements, statements stored in the SQL plan cache, and statements identified as
expensive statements. each as separate view. When selected. you can navigate
from the SQL statement to the SQL Analyzer tool (shown later in this section in
Figure 3.11).
110
3.2 System Adm inistration
~1onll0< Statements v ® c
1 1 1590
O\ERVIEW ACTIVE STATEMENT SOL PUH CACHE EXPEN~ STATEMENT
SOL Plan Cacnes (2511590) v... o..... 61 Save/I.£ v Conlgure 0..r .. PllnCachct ©
su........ Slrlng Staetmtm H•sh """'*Ol>io T•ble Typt Pllft 10 Al•- Execution Counl Total Curt
I((
( "• 1 ol 64 > »I
• Expensive Statements
One of the views of the Monitor Statements app (also directly accessible from the
SAP HANA cockpit System Overview page). Expensive statements are statements
1.vhose execution time is above the configured threshold. The app supports further
analysis for possible causes. The data is sourced from the M_EXPENSIVE_STATE-
MENTS system view. Expensive statements can also be traced to a file for even
more detail.
• SQL Plan Cache
SQL statements must be compiled before they can be executed on the database
server. During the compilation process, authorizations are verified, and execution
plans are calculated, together with a number of other operations, all of which
require CPU cycles and memory. To avoid repeating the same process over and
over again, the result of the compilation is stored in the SQL plan cache. The sec-
ond time an identical query is executed, the execution plan is taken from the
cache, which saves unnecessary processing. About 50 different characteristics are
recorded for each statement, sourced from the M_SQL_PLAN_ CACHE_OVERVIEW
and M_SQL_PLAN_CACHE system views.
To further support your analysis, you can use the Workload Analyzer tool, which is
based on thread samples taken on the system, as shown in Figure 3.10.
111
3 Administration
Workload Anatysis v c ©
LattS- ( > .!. .! @ El V m (!
•••-~cl11t1>11.-.--.... 100
oaiv f'fo•
o ~UMd ao
o u~~Urrll
o-
U ~ T~
..===============================
Q w~nv.o. 40
0 Adho9~
-~ll7bl6 t .-.. .. 20
O CPV
0 u-.."""" 0
01:28 01:29 01:30 01:31 01:32 01:33
Prtmary Dimension
·-·--
-- ...
4CPUCort•
(t6)
(OA)
. , ........ w.ii <O•l
(02)
ThtNd State . ,..._.Witt, (0 ,,
State Lock
---
---
~IP ~5 01:29 :15
Seoondary Dimension
ThtNO Typt
nv... .......
ThtNd S111i. ~(~ · '
--·
S&ele Lock
Stelef'Mnt Hash
DetlbeMUW
The app displays system resource usage in the upper part of the screen, with the fol-
lowing four views:
• Top SQL Statements
Shows information about the statement, such as last execution time, the execu-
tion count, and the result set count (for SELECT statements). You'll also get the
statistics for execution time and preparation time (the compilation) in microsec-
onds.
• Background Jobs
Shows information about operations, like the delta merge, when the main mem-
ory segment of the table (sorted records) are merged with the latest updates
112
3.2 System Administration
If an issue arises that originates in a SQL statement, you can leverage the SQLAna-
lyzer tool, shown in Figure 3.11, which presents a Plan Graph for each statement and
shows the different executions steps with the number of rows returned and costs.
COlUMN
JOIN
__..
""'°"-CCM l,NON_CO.\......,.._c,
0 • CAC><E
...
- c .•1.u
._
·- -~ -IJ
..........
_
.• ...
_ e . . .,.u
•_ c : . ; ...,,
._ ... •
•_svs_oo_AON_1,.. tl'll>
3&$3.1 72,50$1 C1fW7CI0:40180000000 fa3Tt>301.tnO.Mp.oof'p:
Ob2f4 30007
......
HASMJOIN 3853.1 72.5081 tc337b361..mo.up.corp:
30007
..,,,,. ..
~ ..-..-.... ----------~
113
3 Administration
Additional tabs then provide more information about operators, the tables involved,
and compilation summary, and if possible, recommendations are made to optimize
the query in question.
For distributed systems, the System Hea Ith app provides an overview of key statistics
on each worker and standby host, and critical alerts are displayed, while current pro-
cessor, memory, disk usage, network, and disk input/output (I/O) is presented with
links to drill down into the particular host, as shown in Figure 3.12.
Hosts (6) las:t 10 minutes.. Data From: Jul 13, 2019, 8:42:09 PM HKT; ·Last 24 hours. Fi ter by Host
CPU(%!
No C>o1a
0 0 0 41 0
Nttwort VO _ _.,__,\,.
. . . __,__J____,,__J ~ ~ No 0.0.
St•tementa
- - - - - - - - - - - - - --' ______, ~J.J.. No C>o1a
To monitor multiple resources and what's called aggregated health, the SAP HANA
cockpit also provides a Mon itor Landscape dashboard functionality on the SAP HANA
cockpit homepage, as shown in Figure 3.13. With this functionality, you can see at a
glance the status of your systems, review any alerts, and drill down to the specific sys-
tem through the SAP HANA cockpit.
To improve system performance, you can use Plan Stabil ity and Statement Hints.
114
3.2 System Administration
_ _
1 Resources 10 Resources 7 Resources
.... 6 7
Not Running
3
Nol Running
.... 3
1 2 1 3
Ruvllng with Issues Running wth tssues Running wlh ISSUM Running with ls.sues
Streaming Systems HANA 1.0 SPS 12 MULTI-HOST System DBs Administration Help
4 Resources 2 Resources 9 Resources 5 Resoul'C8$
_
4 2
Not Running Not Running
2 [gJ
NotRurving
.... 2 Running~ tssuet
3 2
Running wlh lswtS
Manage Landscape
To capture a baseline of system performance, you can use SAP HANA's capture and
replay. With this set of tools, you can record {capture) a particular workload on a
source system and replay this captured workload on a target system, this time with-
out the applications, as shown in Figure 3.14. This functionality can be quite useful if
you need to make changes to hardware or softvvare configurations and want to know
beforehand the potential consequences of these changes on system performance
and response times. A detailed report can be generated from the replay task, listing
all SQL statements with performance statistics (execution count, faster, slower,
failed, skipped, elapsed time, and so other characteristics) and results comparison.
(Does the same statement return the same result set, or in other words, are we com-
paring apples with apples?} The load shown in Figure 3.15 displays the most import-
ant counters for resource usage.
115
3 Administration
Sample
,, ,..
-
00:01 :52 11.35 M8
., 1.29K
1.86K
0
0
., 285
406
_...... ......_
Capture lnfonnat1on Taroet System lnlonnation
.,_...,.
,,.OCIS! Size
886 03'byles
s.
1.858
0
....
40$
-0..
SlalMll!ltC T,,_
"""' •
.....,,.,
l001l I
.....
l>Nba5e Sy ll ~L.
~""
~
.... ... o
Companson Repclf1 v
Sample
Complrilon Type CIPui• to~
~ 10 15'631881012'29
-- .,_,......,.,
~ CP\J
100
"
-C-.Wo<ldold····- -
c:J S,-CP\J
1:1 -·
0 """""' \!sod
~
BO
......
~::::::::::::::::~~==::::::==:::~~:::::=·:...: ..::··:;::::::J • CAJ
-
m -
o•
•~CA.I o•
~Thr•lds
•~"* • n•ua
mTo!allhre.ct.
...,,,_ • $1111 •11 11.,.'tle
~ CP\J
0 ........ CP\J
.. · ~.,,.,_'
·~TWuch:'
. TOlll""* ll8
O """"'YUMd
~ s..........
~ --
m ~Tlwo;)ds
rJ Totl&TIYHC!t
116
3.2 System Administ ration
If error messages, issues, problems, or other challenges arise, you can activate a SQL
trace or an expensive statement trace to get more information about certain issues.
Tracing will leave a written trace of all actions on a file . A SQL trace will include infor-
mation about statement preparation (compilation) and execution plan. When trac-
ing expensive statements, the output is filtered, as mentioned earlier, and will only
include the same statements found in the Expensive Statements app on the SAP
HANA cockpit (or SAP HANA studio), this time with much more detailed information.
To view trace files, the SAP HANA cockpit will open the database explorer, sho~vn in
Figure 3.16, which can connect to the server file system to load the trace files in a
viewer. SAP HANA studio will only display the text file in Notepad or Text Edit.
Trace files can be difficult to decipher. Some trace files are not intended for general
consumption at all, like the kernel profiler. To activate this trace, you'll need the SAP_
INTERNAL_HANA_SUPPORT role. An alert active will warn you when a user has this role
assigned, and you can only grant this role to one user at a time.
.... + c ~-mo-lel37'b361.ll'IO... )(
• CJ HAOOHN>(mo-4337Wi61) IJI 2111· 12•21 " : Uil8.1t1ll9 I ~lttJtillf't• <•t.1loc.ct(lts6t) : S.ttl!C \'If lt•tl .$tlC.$ · - """"''ty...,,.
t Mll •l.1 •11 M l lf t .... SJ?.41, I Ftltll) rtleftCtOf").CH(•iM> I OotlttT~iwtSUtl1t1Ct ! fN(l(iJolc - , ........~tStMlttl<t 5'U4 a O.,f, 1111..
~ CatMog
,.. l!tll •ll •1l ":lt:4'.SJM3• I Flltll) flllfft(\Of"),C#(MU.) l ~lt.IT~pvtSt•tl•ttcti ft'l(l(iJ\I - lN'Ol.ICll!WtSU'tltttci 5641: lOG; ~
• Datal>Uot Olagnosck Ats 1•1 l!tl•• ll •1l tl9 : lti .... S1)4.ll l Flltll) fUefactor,.cjllO(Mtl<I) l Oelt1T~St.atl1tlc1: t,.1<1(11\1 - f~SU'tlttl<t SoUit: (Af,
• mo-ld31b361.ll"IO.ilfP.COI l"l 1tlt•ll •1l " : U: .... SJbl_,.. I Flltll) flldtC\Ot'),<#(MiM) l hlttT~P\l{Stttl.ttltt: frl(ltiJ\c - lhrou""'1tStatl1t1<1 S7U; lOG
I . . rll·ll · JI M:l'l:". -t1$ I Sf'notc1_ $t1M11p -.y.t•lc--..cc(•JJU) : $epeflt Info •flid•I, cl--.,1...:JWUJ)
1... Jell·ll·11 M : ze:.., , ""'°', I M ....l<•Jt-. . UllJ1,.•tl.w..cc{-.) : ll:lo6t- • IV•tlon ttMtltd: S.Uifi(.llT_USIQ'__, -:D, C.C::Wli lllll_(DU,M_I
ISi Mll· ll· l:l M 1H:M."'6lff I $oonll<•.St-. . ™'•"•tl•. <<(tM3") ! lb.6t- 11lv•tlon ft..liMcl: _,..JllGMTI(lll', SfeouJ.US.tU:JW, JOllO
1Sl Mll •ll •l:l M 12t:'9."6UJ: I $oonllt1Jt-• ~t._..1tet".1t-.Ct(..,).I) l IOo6t- •l&l'ttlc_. 1t1tw1: 1M.'illl'l.JUW110lll, S.f~_l.IS.fiG(J"'''. I
IS.I2tll•ll •l:l " : 2':'9, ,...7)7 I SINlct_st_.t. . ~1-.>l'~let"_t.t-.Ct(ll&41) : ""t10fl tll'YlCt 1t ~.
0.
ISA .lell•ll• l:l '912tut.Ultlt t $..l~l!wt ~s....1.eo1 .c...tl2tM) I S-Hillt C:W"""" •-..Olio•""''°"'! ), ~,_, .... lot jlOti•llfl! "
ISS 2tll•ll •l:l M:M:ll,UlllS"' $..l"'flOUil ~~1Atbol .c:...tl211S) : l(ll f: &M:ll:l.I' CMT4 ~to.,._. 1"9t0¥11.-ll1ty of tl\t ditt..to.tt
lst 2tll• ll •l:l M : 2t:ll,»ll1l I SINtta.Stwt. . tf'-IQC.t<(llS-") l 0. •lttl¥1tlflC; - l - ,..,...t. lac ltlolff.....l,.
lS1 .lell•ll •l:l '9. lllll.U.,_.I I •11141> t llXl"411ldo..-...,. , c:Pft(l13"1) ; ,.,.1.t•t-1 tt.,.td "1U. 0!01- )
ISi 2tll•ll •l:l " : M:ll,4711.J) I t,,_1(08\U't t r;a.cl((lftt.-t,c:pp(lll.11) : UM-I'll-•, SUt-tb:JKt.IUClfll~l111S.J»S1
2tll•1l•l:l M !2tUl.•111J) I $oonlltt_st-. . <•U!.ot:.tt(llMl) I S.tll-"C ._ 1t1tl1tlc1 ,_.,. ...Clll"tty "°""
1M IJ) llll·ll·U "':le:11.lJ1171 I »o1;oolnt $1YfpOl~tl911l.cpp(tltM) ; $...-.point Clll'....,.l llYfpOIAt "•nloo.; J, ,..1t1,.t ,.HO lot pOlltlon
tr.l )) l'lll·l1·11 M:19:11.,1~1 "'S.W-lnt \.lwpolQl911l.c19(t1tll\) : llOlf: MOU.II' QAl4 - to,,.._, rK-H'i0btllt7 of llW d•I .....••
16J Jlll·l1·ll . ,. ;ie:11. 1JJlt7 I r .....:.COOtt•rt Jra<l(-t••t.<pp(11117) : ~-·· St•t-lfqoc11tlo<1t~11•1MJJIH
1r.1 ltll·ll·ll 1': 21:11.IJ)I... I~ 1$$o<1-.a.(ff("'-ll) ; XS M.""-' 4091 not tlll1t, <"*'""
dffNlt cO<l't. .t
IW letl·IJ · Jl M:l9:11.1111tt I)($$(--.. xss.c-.a.cf1P(M7l4) : cr1~t1Wt••tSch-..Vft'1!on: c:.....tt.,. r 1 po-1ltCN")' lllf•wll cont1nt • • •
Ir. Jetl·l1·11 . ,: ;ie:11. q1M1 l 11'.KfCOOttfrt l t'loCl(-tl•t.<pp(11117) : ~t'll-•, Stat_U_tlont!1444'1J7•t"9JJl)I
IM ltll·ll·ll 1': 21:11 ....MSI I •1110! ; 1u1;1..e.,xs..._.cpp(IUM) : Ct't*ll'S)lsl.OISc......-
161 letl·l1·1-1 M:Je:l4. WSJ76 I froK.C:OOtt1rt f r1<.C-t1•t.cpp(l lll7) : V..t'll-•, s1..t - t t u..11tlC<11-J7fll4JJISI
16* 2tll•ll •21 M : 2t:l4, ,.SM9 I SINl<•..St-• $)1,..,.,..,..(((tlotM) : °"°""'...
1•11 S'l'1.M_U._~_uix...l . tot l'l<~•t•
tit 11) Mll• ll •U MtM!,,_,,.,$.46 i S....-..ic:1.St-... 1y......,,C<(l).I))) I ~ftillC i"""'x '°"
M.ltS.l<ll.6AAIW;f_UllX._)_
11' 2tll•ll •l:l M:M:l•,,,,... i ery,to ~t~(lltJ'TJJt1.S-1ct.(l'!l(lll•S) l .._.,_... - kt)' (Jl(tll•M~tl•IS.t-. plMordJ~
111 JIJ Hll• ll •U M:M1ts,lll7tJ I C:rypto ~ttlllt'YPll~lC•.C#(llllS) l '*-•tH - Uy (ll(:•ll-fS.lS-1-, Plt<ordlOoli's.€.St""' f@
Technology Background
In Chapter 2, you encountered the three building blocks of the in-memory comput ing
engine: TREX, P*TIME, and SAP MaxDB(liveCache). Messages in t he t race fi les remind
us of this legacy.
117
3 Administration
In addition to the documentation, how-to articles and other knowledge base articles
published on the SAP ONE Support Launchpad can serve as great sources of informa-
tion. Particularly helpful are the Guided Answers. By answering a number of ques-
tions, you'll be guided to relevant notes and knowledge base articles with more
information about the issue. For each component, like the database engine (HAN -DB),
application services (HAN-AS), SAP HANA studio (HAN-STD), or lifecycle management
(HAN-LM), there is a specific code. To find information in the knowledge base, search-
ing by component code provides a convenient shortcut. Incidents (support tickets)
are also tagged by component code. To collect diagnosis information, you can use
SAP HANA cockpit, SAP HANA studio, or the command line. Diagnosis information
will be returned in an archive (ZIP), which can be attached to the incident.
Learn More
General system monitoring topics are documented in t he SA P HANA Administration
Guide, which you can read or download from t he SAP Help Portal.
For information specific to performance issues and t roubleshooting, see the follow-
ing guides on t he SAP Help Portal:
• SAP HANA Troubleshooting and Performance Analysis Guide
• SAP HANA Performance Guide for Developers
SAP Notes
For add itional information, see the following SAP Notes:
• SAP Note 2000000 - FAQ: SAP HANA Performance Optim ization
• SAP Note 2000002 - FAQ: SAP HANA SQL Optimization
• SAP Note 2669621 - FAQ: SAP HANA Capture and Replay
Many more FAQs are available, all carefully written and highly recommended.
118
3.2 System Administration
and read performance from the storage subsystem when redo log entries are flushed
from the log buffer to the redo logs? Using solid-state drive (SSD) technology typi-
cally provides better performance. For very large databases (VLDBs}, loading all the
data into memory at system startup can take a considerable amount of time when
using a slow storage subsystem. Persistent memory, or the fast restart option, makes
use of the different characteristics of the main and delta memory areas of the colum-
nar table and can significantly reduce system restarts. Of course, more traditional
approaches like partitioning data volumes are also available.
Probably even more important for a resource to manage is memory. To support the
system administrator with memory resource management, the SAP HANA cockpit
includes the following tools:
• Memory Usage
This tile on the System Overview page, as shown in Figure 3.17, provides an instant
update about used and resident memory statistics. From this screen, you can nav-
igate to the Monitor Performance, Analyze Workloads, or Analyze Memory His-
tory apps.
System OveMe\v v
.. ""'-
. h*UMd~
" Total
tM>nll.or la ble usage
Open blOOk.e-d 1.ransac1i0os
• 10 IS t.iQnJtor nerv.'Of1C
...... 12' IS
••
1 0
0 0
~ Running with 1Ssues
Threads
0 0 Related Al8ft5
119
3 Administration
• Monitor Performance
App displaying graphs and statistics for all resource counters. Preconfigured
graphs (presets) can be selected, including for memory, and custom charts can be
created.
• Analyze Workloads
App displaying statistics for all resource counters, not only memory, with focus on
SQL statements, background jobs, and threads, as shown earlier in Figure 3.11.
• Analyze Memory History
App displaying memory statistics over time, as shown in Figure 3.18. The top graph
shows a timeline graph with quick selectors to select the last 6 or 4 weeks, 7 days or
24 hours, and a calendar for custom selection. Top consumers, memory compo-
nents and allocators, tables, and out of memory events are shown in the vie,vs on
the bottom pane.
~1e1110Jy Analysis v
Jul
..., last~ server ltne
t~ 2011. tat:tl AM
12.27 from. 7 1.1. 19 12 27 To 71S.19 1227
-
4S tl)M8
Hott~~
11 (I.IS M8
9023 M8
I
OM•
9 47 Tables
1.863 3A Sys1em
·-
. ....
·-freeMo
21856 SysAem
•.
Figure 3.18 SAP HANA Cockpit: Memory Analysis
However, to make sense of the numbers, your administrators will need a sound
understanding of memory management concepts, and knowledge base articles (for
120
3.2 System Administration
example, 1999997-SAP HANA Memory FAQ) are important assets. In the Learn More
and SAP Notes boxes in this chapter and throughout the book, the most relevant
knowledge base articles have been listed, but many more are available. Together with
the how-to articles and the Guided Answers on the SAP ONE Support Launchpad,
knowledge base articles are essential resources when working with SAP HANA.
A comprehensive alerting infrastructure will inform your administrators about
resource issues long before these issues become critical. The Alerts tile is displayed
on the Syste m Overview page in the SAP HANA cockpit, shown in Figure 3.17, which
displays high and medium alerts for different categories (Backup, Availability, CPU
Usage, Configuration, Diagnosis Files) or KP!s (Ava ilability, Performance, Capacity).
From this page, you can navigate to the Alerts app, as shown in Figure 3.19, which dis-
plays all alerts triggered for the current system with more detailed information like
next scheduled run for the alert, its intervals, alert checker description, and a pro-
posed solution.
lis-> cq
Host physical memory usage n
U.. Rt.- Jill 1S 20tt ~
- 7
Inactive seMCes low s
LM1 Ruro .M tS 20tt
--..
Delta merge (mergedog)
configuration
e
U11 Rull "'1s 201t
¢ CW, lhe newr~s)d be noliStd lbolJI alttts is.sutd by Hs 1f.trtcNck.0t The dtfd r~s)MI not
121
3 Administration
You can configure each alert and define the thresholds, scheduling properties, and
email recipients. From this app, you can also manually trigger an alert run, for exam-
ple, to double-check whether the proposed solution actually solved the issue.
More recent is the integration of SAP HANA cockpit with SAP EarlyWatch Alert for
proactive monitoring, introduced with SAP HANA 2.0 SPS 03. This service for SAP
Support is covered by the maintenance agreement and provides you with an over-
view of KP Is and alerts on a weekly basis. From the SAP Ea rlyWatch Alert tile on the
Landscape Overview page, you can navigate directly to the SAP EarlyWatch Alert Solu-
tion Finder, as shown in Figure 3.20.
System 10;
cSJ E.nr•t Sysi•m ID
Alert Rating
v fnt., AIM RMinl v
Alert Category.
v Entff Aft<t C~tegory NllJH v
A /)
Wt ft(~ th.It yov uplftd• your systtm. For rtMr~ons that 1ppty to yovr sys.tem d\rina cus.tomtt-spteific
f'l\llnte-nanct, Sff suppon sap eomtma1n.~~ fOf SAP rtt..Hs and SAP BuslnHSObt«fs rit!eases bas.ct on SAP
0v
Net\'kaver, SAP offers customef·spec.lflc malrtenanc:e after the end ot rnahstream malnttnanee. For mote infonnation
about the m.&a"lt~nu phases offered fOf SAP and SAP &Si~s softw.are, see support.541p.eomfm.aintenane.
In Octoi. 2014, SAP an~ne.ci • mainttn.Met txtens.lon for SAP Bus.intn Suitt 7 core *J)p(QtiOn ret•asn to 2~.
If you are R.WV'llng a tetevant release, see SAP Note 1648480 for mote details and apptlca.ble res.trictloos
0 • 0 & • • • • • • 0 • • • • • • • A 0 0 • & - 0 • 0 • A
~ ow-c.--r~
~ Sh.o1r1• YOUI f-l'Cl'db;;ick Aboul I~ L.1urchp;ld St.:ilw. Term!; of U!IC' Copynp,ht .ind Tr.tdc-m.-irk.•, Lc-p_.-il Oi...~lo:wr1i Pnv;1cy f°llCPi';i 09().16015:, 2
122
3.2 System Administration
peak load. By defining at what stage the system should start to queue requests, you
can avoid the system becoming overloaded. For both workload management and
workload admission control, the SAP HANA cockpit has applications to configure and
manage workloads.
Learn More
Resource and workload management is documented in the SAP HANA Administra-
tion Guide, which you can read or download from the SAP Help Portal.
For SAP EarlyWatch Alerts, visit http://s-prs.co/v488476.
SAP Notes
For additional information, see t he fol lowing SAP Notes:
• SAP Note 1999997 - FAQ: SAP HANA Memory
• SAP Note 2100040 - FAQ: SAP HANA CPU
• SAP Note 2400005 - FAQ: SAP HANA Persistence
• SAP Note 2445867- How-To: Interpreting and Resolving SAP HANA Alerts
• SAP Note 2222250 - FAQ: SAP HANA Workload Management
3.2.4 Security
While the security architect-the topic of Chapter 6-will mainly focus on a sound
design of the security infrastructure, your administrators will still need to monitor
critical security settings and take care of routine operations.
The Authentication tile on the System Overview page of the SAP HANA cockpit shows
the current status of the pass,vord policy, single sign-on (SSO), and the last time the
password was changed for the SYSTEM user, as shown in Figure 3.21. A well-documented
best practice is to disable this database's super user account and implement the prin-
ciple of least privilege (Po LP). In other words, you'll create, for example, a user admin-
istrator with only the required system privileges to create users and also create a
backup administrator for performing backups instead of using a single administrator
with both sets of privileges combined. Granting only what is required to perform the
required tasks avoids having a single hacked password compromise the security of the
entire system.
123
3 Administration
Backup Enayplion
Root key ctienged on
•·#••>
0ec 21, 2018, 9;17;33AM
Notice how, with the SAP HANA cockpit, you can easily create users and manage priv-
ileges and roles together with certificates using Security Assertion Markup Language
(SAML), SSO, and Lightweight Directory Access Protocol (LDAP). Security in SAP
HANA is described in more detail in Chapter 6.
Learn More
More recommendations for users, roles and privileges, network configuration,
encryption, audit ing, trace and dump files, and other topics are documented in the
SAP HANA Security Checklists and Recommendations guide.
124
3.2 System Administration
ourselves to the most important aspects. How can you make backups and perform
recovery tasks for SAP HANA systems?
Backup
Making backups using the SAP HANA cockpit is a simple task. Select the backup type
(complete, differential, or incremental) and the destination (a file or third-party
backup solution) and then execute, as shown in Figure 3.22.
mo-fc337b361 .mo.sap.CCfP
t63G8oflf.309
90 Maol80M9
....
:~: Last Successful Ful Backup
Designing a solid backup and recovery strategy, on the other hand, will require more
attention. You'll need to know when to create data backups. Of course, you'll need
backups at regular intervals, but how often is often enough? Then, you'll have to con-
sider exceptional but critical situations: before software updates and after initial
loads or changes that cause an interruption to the log writer.
To automate data backups, you can use the backup scheduler, which is included with
the SAP HANA cockpit Backup app and which is an easy interface for scheduling back-
ups at regular intervals. You can create multiple schedules for complete, differential,
or incremental backups; configure their labels and destinations; define the recur-
rence of backups (weekly, monthly, every tv.ro months, etc.); specify time zones; and
adjust many more parameters to fi ne-tune backups to meet your requirements. Dif-
ferent calendar views display how backups are scheduled for the database, as shov"n
in Figure 3.23. Log backups are automatic by default and don't need to be scheduled.
125
3 Administration
Backup v c (!)
Backup Schedules + 0
v Today < August 2019 >
I
,.,,.
~tus:
ReeurTenc:e (UTC):
~......,,.. monlh
Blclwp Type'
~· o...&.(IQ.Ip
For a quick point-in-time recovery (PITR) database restore, you can complement data
backups with data volume snapshots-with caveats. Some questions to ask include
the following:
• How do system and tenant database backups relate to each other?
• What should you consider when working with dynamic tiering or system replica-
tion?
• What is the effect of release compatibility?
• What should you consider when working with the BACKINT SOK for SAP HANA?
• How do you manage encryption root keys for data and log backups and also for
data volumes?
• What is the recovery point objective (RPO), and what is the recovery time objective
{RTO)?
You'll need to design your backup strategy 'llvith these questions in mind.
Recovery
What good is a backup if you cannot recover the data? When it comes to recovery,
you should keep the following considerations in mind:
126
3.2 System Administration
• Recovery requires downtime. The database must be shut down. During the recov-
ery process, neither users nor applications can access the database.
• When you need to recover an entire SAP HANA system, the system database must
be recovered first before you can start to recover the tenant databases (one by
one). However, you'll only need to recover the system database if that database has
been corrupted. If only tenants are affected, you won't need to recover the system
database, which can remain online together with all the unaffected tenants.
• You cannot recover a tenant database of release SPS 04 to a system running on
SPS 03.
The human factor is also something to consider. Stress might start to play a role. How
failsafe are your procedures? The more you can automate, the more predictable
recovery will be.
Especially, when working within service-level agreements {SLAs), your administra-
tors will need to practice different recovery scenarios regularly, including the follo\v-
ing cases:
• Data volume corruption
• Log area unusable when recovery is no longer possible, only restore
• PITR to correct logical errors
• Recovery with system replication
You should also know ho'"' to work with the hdbbackupcheck and hdbbackupdiag com-
mand line tools to validate your backups.
The hdbbackupcheck tool, shown in Figure 3.24, allows you to perform a number of
checks on a backup set. With the backup diagnostic tool, you can perform a more
extensive analysis of a backup set, although this tool is more likely to be used for sup-
port cases. On the recovery side, you can use a Python script called recoverSys . py to
perform a PITR for system database, which allows you to recover databases on the
command line until a particular time stamp and which also includes remote recovery
capabilities.
Code Clinic
For an example of remote recovery, see t he following:
ssh haladm@serverl23456 "HDBSettings .sh recoverSys . py
--command=\ "RECOVER DATABASE UNTIL TIMESTAMP '2019-07-14 15 :00 :00' \ '"'
127
3 Administration
Options : I
-h : display this usa9e information
- v : display th• h••d•rs of the backup
-i <backupid> : cheek whether the backup has th• backup id •~citied
-p <directory> : use this directory for the 109 tiles
- • <•bid> : e xtern3l back'u p id tor 3 l»ickint call
--backintParam.Fil• <filename> : use parAmeter tile specified tor a backint call
--dw:tp : dw:np contont of tho bockup (109 ~nd topol09y ba;ckup only}
ha0ad.~8mo- fc337b361 . rao : /hana/shared/HAO/HOBOO/ba.ckup/data/DB_HA0> hdbbackupcheck - v 2019_05_31_08_ 20_ 33_databacku
p_O_ l
Ch•ck backup ' /hana/sh•r•d/RAO/HDBOO/backup/data/DB HA0/2019 OS 31 08 20 33 databackup 0 l '.
Destination of Type : file , Version : 10 - - - - - - - - -
Destination header information :
O.tabaseld : 7c17b4lf- 81Sc- 654b- 9d5c- 3914S8f964fS
Interna lStar tTime : 1559290833246 I 2019- 0S- 31T08 : 20 : 33+00 : 00
CurrOestlnformation : (FIL£)(/usr/sap/HAO/HOBOO/backup/data/DB_HA0/2019_05_31_08_20_33_databackup_O_l]
backupid: 1559290833208
Ser vice Name : indexserver
NumberOfVolumes : 2
HostName: mo-fc337b361 . mo . sap.cor p
Volumeld : 0
Dest id : 1
NumberOf Des t : 1
SI D: HAO
Databa seName : HAO
Hanaversion: 2 . 00 . 034 . 00 . 1539746999
Hanaweekstone : 0000 . 00 . 0
Architecture : lit tle endian
s r cPoolinformation(O) : (TOPOLOGY) Backupid : 1559290833208
SrcPool i nformation(l) : (OATABACKUP_ INFO) Backupi d : 1559290833208
srcPoolinformation{2) : {SSFS) Backupid : 1559290833208
DstPoolintormation{O) : [ FIL£) [/usr/sap/HA0/HDB00/backup/data/DB_HA0/2019_0S_31_08_20_33_databackup_0_1J
Sourc• header information :
srcType : 4
sourcetnfori:N:tion : [TOPOLOGY] v
Learn More
Backup and recovery is documented in the SAP HANA Administration Guide, which
you can read or download from the SAP Help Portal.
128
3.2 System Administration
SAP Notes
For additional informat ion, see t he fol lowing SAP Notes:
• SAP Note 1642148 - FAQ: SAP HANA Data base Backup & Recovery
• SAP Note 2444090 - FAQ: SAP HANA Backup Encryption
• SAP Note 1730932 - Using backup t ools with Backint for HANA
129
3 Administration
• Development
Finally, some responsibilities of the administrator will be related to development
and the application server runtime, topics we'll return to in the last two sections of
this chapter.
Depending on how responsibilities are defined for the different job roles, these tasks
may also require considerable attention from t he system administrator. In brief, sys-
tem administration is a demanding topic and requires significant study and experi-
ence for successful execution.
Learn More
Aside from the SAP HANA Administration Guide, the SAP HANA SQL and System Views
Reference is also a valuable resource on the SAP Help Porta l.
The administration of related technologies, such as SAP HANA dynamic t iering, SAP
HANA stream ing analytics, and SAP HANA smart data integration (SDI), to name but
a few, is documented sepa rately on the SAP Help Portal.
SAP Education offers courses and certification about SAP HANA administration,
including the fo llowing:
• HA200-SAP HANA 2.0 - Installation and Adm inistration
• HA201- SAP HANA 2.0- Using Monitoring Performance Tools
SAP Notes
For additiona l information, the follow ing SAP Note lists recommended tasks in the
areas of administ rat ion, monitoring, and housekeeping:
• SAP Note 2400024- How-To: SAP HANA Admin istration and Monitoring
130
3.3 SAP HANA Lifecycle Management
but also concerns migrating (or transporting) development content to test, quality
assurance, and production environments.
Both platform lifecycle management and application lifecycle management are
potentially system administration activities. In larger enterprises, application lifecy-
cle management typically will be a separate function, in particular, when the DevOps
approach is favored, in which case application lifecycle operations will be more or
less integrated into the development organization. When SAP HANA is acquired as an
appliance, platform lifecycle management activities might require the involvement
of the hardware partner. For the SAP Cloud Platform, SAP HANA service, platform life-
cycle management activities fall under the responsibility of SAP, including some of
the more traditional system administration tasks, like backup management. Yet, if
you opted for just the infrastructure and already have an SAP HANA license, you
might well have to install SAP HANA and perform updates. So, cloud deployment
itself does not liberate the system administrator from all platform lifecycle manage-
ment duties.
What's important about lifecycle management for the platform and for applications?
We'll vvalk you through key tools and processes in the following sections.
131
3 Administration
not used because the SAP HANA appliance does not include a graphical environ-
ment. A common security best practice on Linux platforms is to only install the
software that is needed. Agraphical environment may be convenient on a desktop
client but has no purpose on a database server. (Another Linux server security best
practice: only install essential components.)
• Web
For one-offs, we recommend using the web interface with the familiar SAP Fiori-
based UI shown in Figure 3.25. The vveb interface is integrated with the SAP HANA
cockpit administration tool and is the only approach that allows you to connect
directly to the Softwa re Downloads area of the SAP ONE Support Launchpad, so
you can download, extract, and update software all in a single workflow.
•
I
* bl+
Remove Host Roles Uninstall Download Upload/Extract
Components Components Components
Help
132
3.3 SAP HANA Lifecycle Management
a.nor.. HormMIOl'I Ttcnnal Release WiorrnDcn SAP Soft...,. OowNoad ewi:or Syslom Dela
: Dotailli Oei. FW.-i ~ ~ Sl.wortP'act• Staeb
1
Details for Product Version SAP HANA PLATFORM EDITION 2.0 Essential Information
Oftlcl.. Hime: SAP HAHA. pl•llofm Odllion 2.0
Proclui:t: SAP HAHA PLATFORM EOfTION
Prock.tel C•tito«Y ' UN: r~ PIMIOml > SAP tw.IA
Type ot PfocNc1 Vetalon.: Standllcne
AoiMeM ~: Slan61rd
C4.irl'9nt S&aol1,11; UIYWltleltd av.-..
SAPHAHARM*-•: 0 Rffdv
~-
........... ~,.,..
,. ~ ~.. 1n•onneli0n
Figure 3.26 Product Availability Matrix: SAP HANA Platform Edition 2.0
133
3 Administration
Related Product Versions: Graphically shows options for upgrades and add-ons
by product version, listing all the different SAP applications "powered by HANA."
The Upgrade To and Required Product Versions boxes are empty for the SAP
HANA platform edition 2.0.
Support Package Stacks: Released SPSs with release data and links to the release
notes.
• Technical Release Information
The actual matrix with support information about the SAP HANA database, SAP
HANA client, SAP HANA studio, AFL, and other components fo r the operating sys-
tem, databases for SAP HANA smart data access (SDA), web bro,vsers for SAP HANA
cockpit, etc.
• SAP Software Download Center
Links directly to the location where you can download either the complete media
set or the latest updates for specific components, as shown in Figure 3.27. Since the
SAP HANA platform is only one of 1,700 products listed on the PAM, creating
shortcuts for specific products that you need to download is a great timesaver.
ID ~fVWc: Pkk~ ~ M l8rlff than 4 GB wll be padced In tn ltdM. ~ Is spUl inco • G8 J)a!U, /IJ,l &tdWts flffd tO be ~IO&ded and unpack!KI, fi>t" mote de~ on
rnW:hplnnlrc lf'ld how to •XU.CC tht muW.pM ..... artl'Wrt on UNIX s.. $AP Note 896535.
°"""'°"'
R~t~lfllo
0
IM08_SERYER20_036_o-800020Jl.$AR
R~ 2.00.036.0 (SPSOJ) ror HANA 08 2.0
0 .... 285$970 l<8 22.0L2019 22.01.2019
•
0
IMOBSERVEROBGO.U..O.I00020ll..P1,TAR
~, ~ Pack.«ge IOf SAP HAHA R~ 021 part.fl
0 30000001(8 06,10.2017 06.10.2017
•
(') fOf ~tlon Of'lly
134
3.3 SAP HANA Lifecycle Management
Make sure you bookmark the PAlvl so you can easily navigate to all the other relevant
sites (including the equally essential Product Support Info resource on the SAP ONE
Support Launchpad}.
The SAP HANA platform edition is released in SPSs once a year, with intermediate
revisions in between. The platform edition bundles different components, usually
defined as separately installable units. Components like the SAP HANA server, the
SAP HANA client, the SAP HANA cockpit, SAP HANA studio, or the AFL are commonly
found in most installations. Other components are only used for specific use cases,
like the hardware configuration check tool (described in Chapter 9, Section 9.4.2). and
might only be documented in a referenced SAP Note.
Technology Background
The Software Download Center uses the general terms Installation and Upgrades,
which map to SAP HANA SPS releases, and Support Packages and Pat ches, which
map to SAP HANA revisions.
Under Installation and Upgrades, you'll find the complete media set for the currently
supported SPS releases (one for each arch itecture: Intel/Power). For the latest SAP
HANA2.0 SPS 04 (April 2019) version, t he download is a single 14 GBzip file, as shown
earlier in Figure 3.27.
Under Support Packages and Patches, you'll find a download for each of t he compo-
nents, for each revision, for each supported platform. For example, the SAP HANA 2.0
client fo r 64-bit Windows revision 04 is a small download of 110 MB. Only the latest
patch level is available for download.
Additional com ponents for SAP HANA are somet imes released as an SP. The SAP
HANA cockpit, for example, is bundled with t he SAP HANA platform, but new fu nc-
tionality is released several t imes a year in an SP, which are fi led under Support Pack-
ages and Patches.
Separately licensed components, like SAP HANA dynamic tiering for example, will
have t heir own entry in t he PAM and likewise are also separat ely listed in t he Soft-
ware Download Center.
135
3 Administration
installation. All you need to do is select \ivhich components you want to install,
choose the system type {single-host or multiple-host), define several system proper-
ties like the system identifier {SID) and the installation path {most take on default val-
ues), and enter the password for the super user accounts like the <sid>adm operating
system account (software owner) and the SYSTEMdatabase user.
To perform an installation of a scale-out distributed system of multiple hosts, we get
an extra dialog where we specify the host names, as illustrated in Figure 3.28. To
install multiple components together with the database server (SAP HANA client,
SAP HANA cockpit, AFL, SDA, SAP HANA dynamic tiering, SAP HANA XS Advanced
runtime, etc.), just select the component to install in the component selection screen,
and the installer will take care of the rest. The installation process is optimized to
avoid multiple system restarts, and a typical SAP HANA server installation (even dis-
tributed) should only take a few minutes.
" x
C..001e S\ttcllM Ty,.. O•i11t S}'ttu• l'roptttlt• OtA~t S•M•tt l'tt,..lti•I Ott\111 Ctl'tilct!tl Dtft111 Mt1ttt ,,.,,..,,4
,,.,.rdtl
9 l'Wltl~l.--<HOlt Syltt•
x
- Ho1tn1m.t.: • 1.........., J
••••••••- -l §aMW<dJtr(-':>w) vttl
~ .•c•11.•g:.
- Hl9h.llt..tllt~!l ,ty GtMtp: 0•~1wori:.c-1t.,1 ,___ _ _ _l[!ru
- - - --1 Oat~t St-'by(tt~)
l~
~ T°Ml'it19 Vt.'Ofkoet ( trtended.,st«~ """'k•)
O)'tltrric t"..,W, St.w'ldby (•o.t~_jlOI'. _..~)
Su1-W.~1(•1~
XS Advanc:-411t..-dntWorro. lo:J_-ltrl
XS Acfvanc:•d llt....un. $t..wby (io:s_rt~t
,_
,. """lw• I •••" I c..,..1
136
3.3 SAP HANA Lifecycle Management
Installing the SAP HANA XS Advanced runtime is more time consuming, in particular
when selecting a large number of SAP HANA XS Advanced applications (SAP Web IDE,
the database explorer, the SAP Enterprise Architecture Designer, etc.).
SAP Notes
Maintaining release parity between the database server and components is gener-
ally recommended (and often required). Although an SAP HANA 1.0 SPS 12 client will
connect to an SAP HANA 2.0 SPS 04 system, you'll run into issues when you try to
implement t he latest feat ures, like client-side encryption, ifthe client does not sup-
port it.
For more detailed information, see SAP Note 1906576 - HANA client and server cross-
version compatibility.
As shown in Figure 3.29, with the command line installer, you can generate an instal-
lation template file, which can then be called on the command line to perform auto-
mated installations in batch mode. Passwords are passed using a separate file for
additional security. Parameters specified on the command line overrule those speci-
fied in the configuration file, which enables you, for example, to perform multiple
installations with the same parameter file while simply providing the values that
need to be unique on the command line.
~o-fc331b361:/hana/inseall/SERVER/SAP_HANA_DATABASE #
mo-fc337b36::/hana install/SERVER/SAP_HANA_DATABASE I ./hdblcm --action•install \
> --du.mp_confi9file_template=/trnp/install . rsp
137
3 Adm inistration
To update your system, you'll use the same tools and the same procedures. This activ-
ity will be far more common as you would typically only install a system once and
then update the system many times. If you're using SAP HANA as an appliance or
using a BYOL cloud-hosted system, you won't even perform the initial installation.
Technically, updates and installations are similar processes. A sophisticated design of
the file system, shown in Figure 3.30, separates user data from system data and
enables the quick replacement of a previous installation with a fresh copy. The same
design also explains the similarity between single-host and distributed systems and
why adding and removing hosts to/from a distributed system and performing dis-
tributed installations is simplified.
Every server has a mount point for local files and for shared files. The local mou nt
point / usr/sa p only contains the files specific to that host, mainly log and trace files,
a local copy of the SAP host agent, a list of symbolic links to system executables, and
even the home directory of the software owner <sid>adm. The shared mount point
/hana contains the actual database data and log files and the executables.
vvhen you update SAP HANA, you're simply removing the shared server files and rec-
reating the symbolic links on the host(s). With each installation/update, a local copy
138
3.3 SAP HANA Lifecycle Management
of the platform lifecycle management tool is also included (resident hdblcm) for ver-
sion compatibility. When you perform an update to a new revision, the resident tool
will prompt you for the location of its installation kit.
The web interface for hdbl cm is launched from the local SAP host agent. For this rea-
son, you cannot perform a completely new installation using this tool as no host
agent would be available.
Technically, updating to the next revision and updating to the next SPS release are
the same. Going from the initial SPS 03 (revision 30) to the next update revision 31 is
the same as going from revision 31 to revision 40 (SPS 04) or even going from 1.00.12
(SAP HANA 1.0 SPS 01) to 2.00.30 (SAP HANA 2.0 SPS 03). SPS revisions enable new
functionalities and update the revision counter to the next decade.
Learn More
How to inst all and update SAP HANA with platform lifecycle management tools is
documented in the SAP HANA Server Installation and Update Guide, which you can
read or down load from t he SAP Help Portal.
The SAP HANA Master Guide is the entry point for planning t he installation of an SAP
HANA system la ndscape and is an even better place to st art.
SAP Notes
For related notes and articles on the SAP ONE Support Launchpad, component HAN-
LM-PLT/HAN-DB, see SAP Note 2115815 - FAQ: SAP HANA Dat abase Patches and
Upgrades.
139
3 Administration
SAP HANA XS works with delivery units while SAP HANA XS Advanced works with
software components. For SAP HANA XS, you'll use the hdbalm command line tool,
whereas for SAP HANA XS Advanced you'll use the xs CL!. Both environments have a
web interface for installation and updates.
You'll use the same XSA Application Lifecycle Management product installer to install
or update both SAP HANA components (for example, the SAP Web IDE for SAP HANA)
as any other business application "powered by HANA" that you or your business part-
ner might have developed for SAP HANA XS Advanced or for the SAP Cloud Platform
Cloud Foundry runtime. Figure 3.31 shows the product installer; after selecting the
organization and space, you'll see a list of installed software components and prod-
ucts, along "llVith an installation history.
XSAC_ALM Pl UI (up.com)
GUI kit HALM tor XSA (tt~
-
113 2 AfK 15, 2019, 12:0927 PM by
XSA_AOMIN, Proc.u 10 4207
-.Info
Support Info
XS.AC_SAP_WEB_IDE (up.com)
SAP \Y•b IOE W•b Cliotnc
4 .¢.0 ... l5. 2019. 115allAMby
XSA_AOMIN, Process 10 3403
-Info
Figure 3.31 SAP HANA Application Lifecycle Management
Learn More
Application lifecycle management is documented in SAP HANA Application Lifecycle
Management Guide for bot h the SAP HANA XS and SAP HANA XS Advanced model,
wh ich you can read or download from the SAP Help Portal.
140
3.4 Application Server Administration
Tutorial
For some hands-on exercises, try out the following t utorials from the SAP Developer
Commun ity, wh ich show step-by-step how you can deploy development content
from SAP HANA stud io (using SAP HANA XS) or from the SAP Web IDE (using SAP
HANA XS Advanced) to Git and Jenkins for transport to t est and production systems:
• Continuous Integration (Cl) Best Practices with SAP - SAP HANA Extended Appli-
cation Services (XS), classic model
• Continuous Integration (Cl) Best Practices with SAP - SAP HANA Extended Appli-
cation Services, advanced model (XS advanced) on SAP HANA
SAP Notes
For re lated SAP Notes and knowledge base articles on the SAP ONE Support Launch-
pad, component HAN-LM-APP, see:
• SAP Note 2768258 - Central Not e for SAP HANA Applicat ion Lifecycle Manage-
ment SAP HANA 2.0, XS Classic
• SAP Note 2495800 - Release Notes for XS Advanced Application Lifecycle
Management Product Installer
141
3 Administration
The original SAP HANA XS implementation comes with the system and does not
require any special platform lifecycle attention.
In addition, application lifecycle management tasks, like installing SAP HANA XS
applications, are also often system administration responsibilities, in particular,
when dealing with production systems.
For the system administration tasks described in this chapter, like system parameter
configuration, resource management, backup and recovery, monitoring and perfor-
mance analysis, you'll use the same tools and techniques for SAP HANA XS as for the
SAP HANA database. However, for several application server-specific configuration
requirements, you'll use other tools at your disposal.
Learn More
Administration tasks related to t he SAP HANA XS are list ed in t he SAP HANA Adminis-
tration Guide, which you can read or download from the SAP Help Portal.
To perform system administration tasks related to the SAP HANA XS Advanced run-
time and the deployment infrastructure, you'll need a cockpit, a CLI, and a SQL
prompt. We'll look at each in the follov.,iing sections.
142
3.4 Application Server Adm inistration
""' ..
_.,_
.....
4jfTft!,I
f.if.; •.1.:.•
-
Name ............
111
--- -
6'M8
.......
I> ® Iii
--
~ 0.1 18 M8 I> • Iii
,,. ....
--
f.itt@• ~-· I> ® Iii
'",,,
f.i®§".• ,,. .... I> ® Iii
.._... ..........
--
4itG¢·• 111 6'M8 I> ® Iii
,_...._ ,,. ...
--
4i!\t!t·• 1/1 I> ® Iii
*ll 1.1,:.1 ,,,
--
coctJ>lt-.d"*'uMw: 12&"8 I> ® Iii
•11nr;::.1 ,_....,_,..,. ,,, I> ® Ii
™""
,......
--
f.i@@• codi¥>il..tv:ll>-1YC
'" I> ® Iii
4i!TtHft·• _........... 111 128"8 I> ® Iii
•1r.r.n:.1 codiPl.o&lncl~IVC 111 128"8 I> ® Iii
,_.................. ..........
--
«.irtti@• 111 1<>:24 MB I> ® Iii
4$$¢".• ~-tetetftell'y.....C
'" ....... I> ® Iii
..........
--
f.il@@• ~-
111 $12M8 I> ® Iii
4'!@¢·• coclrOit•ua-svc 111 ,..... I> ® Iii
f.ii· i·i :.• c~149gi11ry.<11> Oii 18 MB I> • Iii
You can use the SAP HANA XS Advanced cockpit to map spaces to tenant databases,
and this tool is where the schemas and other development artifacts will be stored.
You can also use the tool to create users and role collections, enabling you to bundle
different roles from each of the deployed applications. As with the SAP HANA XS
Admin tool, you also use the SAP HANA XS Advanced cockpit for SAML trust configu-
rations and managing the trust certificates used to establish secure connections
143
3 Administration
between the SAP HANA system and SAP HANA XS Advanced applications. Within the
context of a space, you can stop and start applications or add instances to scale up.
Views allow you to monitor applications on resource consumption and in the Ser-
vices view, you can add or configure different microservices.
144
3.5 Summary
Apart from the SQL prompt. no app or user interface for HDI administration exists.
Learn More
As for all administration topics, you'll find security-related concepts documented in
the Security Guide, wh ile installation topics are covered in the Installation and
Update guide, and t he hands-on administration topics are in the SAP HANA Adminis-
tration Guide.
For the SAP HANA XS CU, see the XS Command-Line Interface Reference. You can read
or download these guides from the SAP Help Porta l.
SAP Notes
For related notes and articles on the SAP ONE Support Launchpad, component BC-XS-
RT, see SAP Note 2596466 - FAQ: SAP HANA XS advanced.
3.5 Summary
In this chapter, we introduced you to the SAP HANA administrator persona and
described its role and responsibilities. You learned about the different tools an
administrator might use to perform day-to-day activities, starting with the tools spe-
cific to the SAP HANA platform like the SAP HANA cockpit, the database explorer, the
SAP HANA XS Advanced cockpit, and the platform lifecycle management tool as well
as command line tools like hdbsql and xs. Depending on the extent to which SAP
HANA is integrated into your broader SAP system landscape, your administrator
may also work with the SAP Solution Manager or SAP Landscape Management and
the SAP NetWeaver-based DBA cockpit.
A system administrator will have many different responsibilities, so we described
system configuration, resource management, backup and recovery, performance
monitoring and analysis, and security administration. In addition, we covered
administration activities associated with the different SAP HANA XS and SAP HANA
XS Advanced application server runtimes and explored lifecycle management for the
platform and for applications.
In the next chapter, v.•e'll meet our second main protagonist, the SAP HANA devel-
oper.
145
Chapter 4
Development
In reality, programming languages are how programmers express and
communicate ideas - and the audience for those ideas is other pro-
grammers, not computers.
- Guido van Rossum
This chapter is for those of you working on the SAP HANA project who aren't devel-
opers and for developers with a different background who first want a comprehen-
sive overview. No need to take months off; a couple hours at most will suffice to learn
the essentials ofSQL and SQLScript, analytical modeling, and native development; to
understand the differences between SAP HANA extended application services, classic
model (SAP HANA XS) and SAP HANA extended application services, advanced model
(SAP HANA XS Advanced); to understand where core data services (CDS) and the
SAP HANA Deployment Infrastructure (HD!) fit in; to learn what you can do with a
platform-as-a-service (PaaS); and to find out 11vhere you can learn more.
In this chapter, we'll introduce you to the topic of SAP HANA development and
describe both the developer and the modeler role. We'll take a look at the tools devel-
opers will use, and we'll cover a wide range of development topics. Starting off with
the basics of SQL and SQLScript, and looping in ABAP when discussing code push-
down, we'll proceed with SAP HANA modeling and continue with the native develop-
ment domain '""ith SAP HANA XS and related topics like CDS, HD!, and application
lifecycle management. After a brief description of the NoSQL document store, we'll
then proceed with the SAP Cloud Platform, including the Cloud Foundry environ-
ment and the SAP Cloud Platform, SAP HANA service. Next, we'll describe the differ-
ent interfaces for the SAP HANA client (ODBC, JDBC, Python, OData, and more) and
present the SAP HANA, express edition, with a free developer license. Finally, we'll
147
4 Development
end our journey with SAP HANA Interactive Education (SHINE), the demo and train-
ing model.
Learn More
To fully master the SAP HANA development topic beyond the introductory level,
many resources are avai lable {although you may need severa l months to go through
all the material!). We recommend starting with the Developer Quick Start Guide and
then continuing with severa l guides for both native development and modeling (one
for each tool, more tha n 20 total).
To find your bearings, refer to t he Developer Information Map. The information map
points out what guide you need for each topic when developing SAP HANA XS or SAP
HANA XS Advanced applications.
Both guides are included with the documentation for the SAP HANA platform and
can be read or downloaded from t he SAP Help Porta l.
148
4.1 Role and Tools
model in CDS, design-time artifacts that become runtime objects when deployed
with HD!. For the older SAP HANA XS infrastructure with (code) repositories, develop-
ment works differently, but the concept is much the same. It strictly separates the
development environment from production systems while allowing for a smooth
application lifecycle management process going from development, to test (quality
assurance), and finally to production.
For a native application, you'll also need the business application logic and a UI (likely
SAPUIS to avoid having to reinvent the wheel). Fortunately, for both interface and
logic, you can use JavaScript or Java. In SAP HANA XS Advanced, this approach is
called multitarget application (MTA) development, where the database. the UI, and the
business logic are all considered targets. These targets are developed using the same
IDE but can be deployed separately to different environments or targets, hence the
name. Artifacts that define analytical views can be part of your MTA development
project but are not required.
Apart from analytical modeling and native development, you could also develop an
application in a different development language and connect to the SAP HANA data-
base using either HTTP or the SAP HANA client. For '"'eb access, you can use OData
and the Information Access (InA) service. As client interfaces, ODBC, JDBC, .NET,
Python, Go, and others are available on multiple platforms and architectures. As a
result, you can access the SAP HANA database from any application. The SAP HANA
studio, for example, connects to the SAP HANA database using JDBC whereas SAP
Analytics Cloud connects to SAP HANA using InA.
To develop cloud-native business applications, integrate on-premise with cloud
applications, or extend applications by adding new functionalities, you can turn to
the SAP Cloud Platform. On this enterprise PaaS, SAP provides a large selection of ser-
vices ranging from ASAP runtime environments to blockchain, machine learning,
the Internet of Things (IoT). and more. One of those services is the SAP Cloud Plat-
form, SAP HANA service, and you can use the cloud edition of the database as an
alternative or to complement your on-premise {data center) systems.
With SAP's cloud-first strategy, you must keep an eye on the SAP HANA service for
the latest features and functions. SAP HANA developers can sign up for a free SAP
Cloud Platform trial account to get started and keep up to date. In addition, to learn
how to develop with the latest technologies, build a proof of concept, and even go
into production, developers can take advantage of the free SAP HANA, express edi-
tion.
149
4 Development
4.1.2 Tools
Regardless of whether you develop apps for the iPhone, for the Windows platform,
for Java, or for SAP business applications, you'll need an IDE. An IDE contains the edi-
tors you'll use to write your code (with code completion), debuggers to catch errors,
compilers to build the code (and link to any external library you decide to use), and a
deployer to validate your application in a test environment. We'll walk through your
options in the following sections.
150
4.1 Role and Tools
.,, ...
"' . . Conttne
.. Bl j)\lbliic
"' # systttn•~I
• • Coli.mm;
- ACllVATl.DATA: RSOADg "'
• IB ...
"' 1B bwf.t,.-ch --
·-
-·
().ta'°"'"'....,,
-·----· ··-··--·
---·-·
- AC11Yll: .SQWSQ.OCfTJJ.AC
- ADSOt™: RS'Q.CDSOT71J.,AD:
s
'""°""""""J ·--
-·- - CIUATEOBY: RSOADSO<TQ.Col?o.i 1
"' f! WIN.1
''°""°"" ~- I CRlATEDOH: RSOAOSO\"l'C).C"
• 18 AOSO
flEB
" SI
• 18 AKI
AINX
ALvt
--·-
fltolCSCn (TIJ
··~
·-
--
--
-~-
-- I CUB-lOCLTAOff\Y: RSOADSO(Ti ,
I Df'SCRJPTIOH: RSOA.DSOT{rl)
I l>IR£CJ.UPOATE:RSGtOSO(Tc7,l
~
I GROUP.,HAMbRSGtOSO(TQI.~
-·
w~
• 18 AKO ~
• IB "'"-'
• Ii COEM
fl Bl DESl
·--
--
~-
I INJOAREA: RSOADSC<TO- lMOA
I lASTCHAHGl08Y: lfSCMDsom;
lASTCHANGlOOM: A'SGtDS0(7i
NO_AQ_DElffiON: ~SQ('L"
fl Elf DMOO
• SI ELEM I • •
.=..._
fl fit FBPA
• 18 HAAP
fl Elf HCPR •
......,
Pro.- Y11ut
fl (It IOBJ
N6mit PPJMAAY
• EB lQRY
Llik- SAP8W-
• 18 LSVS P..cL l)'UM'l··-
't IB
et ltSOS°""' Acb... SAPMH
Act•- 2016-0L
•
fl £B SEGR
fl
fl
£B TttC-S
£B TAfN
'"-·-
Cciu- K)IN
"' . , goMtr«td
9i <.lcS<tNtiOS ...... 2
,, i>ffl•tt:
I> tiit Prvmt0n11''19 AppL
S> • Sc<1.1rlly
< •
Figure 4.1 SAP HANA Studio Modeler Perspective
New feature development on the SAP HANA studio IDE stopped ~vith SAP HANA 1.0
SPS 12 (2016) with deprecation announced for SAP HANA 2.0 SPS 02 (2017). However,
as a component, SAP HANA studio is still in cluded with the SAP HANA platform, an d
you can still download the latest version (as a plugin) from http://s-prs.co/v488417.
Learn More
Dedicated guides f or native development and for modeling w ith SAP HANA studio
are available, aptly named th e SAP HANA Developer Guide for SAP HANA Studio and
the SAP HANA Modeling Guide.
SAP Notes
For additional informat ion, see t he fol lowing SAP Notes:
• SAP Not e 2073112 - FAQ: SAP HANA Studio
151
4 Development
152
4.1 Role and Tools
Like you might expect, the SAP Web IDE includes syntax correction and code comple-
tion as •veil as tools for debugging and testing. In addition, graphical editors are avail-
able for CDS data models and calculation vie\vs. The SAP Web IDE integrates with
GitHub as a central code repository. To browse runtime database catalog objects and
execute SQL, the SAP Web IDE integrates the database explorer web application, the
same used with the SAP HANA cockpit for database administration (see Chapter 3,
Section 3.1.2).
MOtO Information
Learn More
The SAP Web IDE is documented in the SAP HANA Developer Cuidefor SAP HANA XS
Advanced, available from the SAP Help Portal.
For information about the SAP Web IDE in general, the topic page at SAP Community
is a great place t o start.
153
4 Development
Tutorials
For some hands-on exercises, try out some of the tutorials on the SAP Developer
Community for the topic "SAP Web IDE", for example, "Tutorial Navigator: SAP Web
IDE''.
Every SAP HANA developer should be fluent in SQL and ideally SQLScript. Although
for convenience and speed, you'll often rely on development tools to generate the
SQL for you, for advanced functionalities, for the latest features, and for trouble-
shooting security or performance issues, you'll need to understand what the SQL is
doing and use SQLScript for what SQL cannot do (or would do poorly).
In this section, we'll describe both SQL and SQLScript as they relate to SAP HANA. In
addition, we'll also cover how SQLScript can be used in ASAP Managed Database Pro-
cedures (AMDP), which, as the name indicates, are ABAP development objects and
SAP HANA procedures at the same time, which enables you to include SQLScript
inside your ASAP objects.
4.2.1 SQL
SQL is the linguafranca of the database, but implementations can differ widely. To
effectively work with SQL in SAP HANA, you'll need a copy of the SQL Reference Guide
on your desk (preferably on the desktop of your computer, as the latest SPS 04 guide
consists of 2,259 pages). In this guide, you'll find the available data types, operators,
expressions, predicates, SQL functions, statements, error codes (all 5,737), and system
limitations (for example, 16,383 table locks, 4,095 tables in a statement, 2 GB SQL
statement length, and 1,945 GB size of all stored procedures combined).
Technology Background
The Structured Query Language (SQL) is as old as IBM's System R, the fi rst relational
database management system (RDBMS), and goes back to the early 1970s. SQL has
been an ANSI/ISO standard since the mid-1980s, and from t ime to t ime, a new ver-
sion is published (called a dialect), the latest being SQL:2016. Most databases are
ANSI-compliant to some extent, most often SQL:1992, which means that you can
run t he same SQL statement on all compliant databases with the same result and
154
4.2 SQL and SQLScript
wit hout errors. In pract ice, databases have vendor-specific extensions to t he SQLlan-
guage t o take advantage of specific features, and SAP HANA is no exception. For
example, t he SQLst at ement SELECT TA .al , TB .bl FROMTA, LATERAL (SELECT bl , b2
FROM TBWHERE b3 = TA. a3) TBWHERE TA . a2 = TB. b2 uses lateral joins and th us wilI only
execute on SAP HANA and requ ires a specific release level t hat supports lateral joins
(SPS 04 or later).
SQL views are used extensively in SAP HANA modeling and present a virtual table as
input for analysis. Through the use of SQL functions, WHERE clause filters, and JOIN
statements, a specific and dynamic result set can be returned when the view is
accessed. Although you can create views at runtime with the CREATE VIEWstatement,
most often views will be defined by the developer as design-time artifacts (Pur-
chaseOrderi tem. hdbview) and deployed to the repository or, in case of SAP HANA XS
Advanced, to an HD! container (see Section 4.6).
Although SAP HANA includes different store types (described in Chapter l, Section
1.2.4) and you can access the database using different clients (ODBC, JDBC, Python,
.NET) and protocols (HTTP/OData), you'll still access the database through the same
SQL interface. This main access gate to the SAP HANA platform is important, and
developers must be familiar with the different functionalities it provides (the most
important of which we'll cover in this chapter). When you interact with the database
using the SAP HANA studio or the SAP HANA cockpit- every action, almost every
click (create a table, change a parameter) is converted into a SQL statement. Every
performance graph or pie chart with table values is the result of a SQL query, which,
again, is the only 'vay to interact with the database. One exception is starting/stop-
ping the database; instead, you'll connect to an operating system process and exe-
cute a sapcont rol command. The same executable is used with SAP NetWeaver
systems, although not every option and parameter is supported as used for SAP
HANA.
Another indication of the importance of SQL is that a new functionality is typically
first released on the database side (the "backend") with only a SQL interface. The
frontend, the client UI (see Section 4.10), is often added later. Lightweight Directory
Access Protocol (LDAP) authentication, for example, was introduced in the first SAP
HANA 2.0 release with a modification for the CREATE USERSQL statement. The corre-
sponding configuration interface in the SAP HANA cockpit arrived later, in a subse-
quent release, and because SAP HANA studio is no longer under development, no UI
exists for LDAP authentication at all. Although a long list and not always easy to
155
4 Development
understand at fi rst. the release notes for changes to SQL and SQL views provide a lot
of information about development priorities.
Code Clinic
Support for additional feat ures (capabilities) is provided through SQL funct ions. For
example, with the full-text LANGUAGE fu nction, SAP HANA returns the language of a
specified column:
SELECT LANGUAGE(CONTENT), CONTENT FROM T;
The JSON VALUE funct ion parses JSON (see Section 4.8):
SELECT JSON_VALUE('{ "iteml":lO}' , ' $.iteml ' ) AS "value" FROM DUMMY;
Series data functions provide functiona lities fo r SAP HANA (time) series. These func-
tions are aggregate functions for ana lytics; security funct ions; spatial fu nctions;
hierarchy functions; functions to perform mathematical operations; and functions
t o work on strings, arrays, dat a type conversion; and more.
For good performance, you'll need good SQL. In SQL, you can sometimes get the same
result in different ways. Sometimes, the response time will be comparable, but some-
times, changing a SQL expression turns a 10-minute query into a split-second
response time. SQL statements are optimized for execution by the SQL parser. Statis-
tics on the database objects (the number of rows, the number of empty values) pro-
vide inputs to the parser to determine the most optimal execution plan. However, in
some situations, the developer will need to provide the parser with additional infor-
mation to come to the best plan. This information are called hints, and you can
include them in your statements.
To analyze SQL statement performance, you can use SQL Analyzer {Plan Visualizer in
SAP HANA studio), the Expensive Statement app, and SQL plan cache, to name a few
applications. More advanced tools are the SQL trace and the Expensive Statement
trace. Trace files can be difficult to read, but tools are available to help you parse the
information, like the SQL Trace Analyzer.
4.2.2 SQLScript
The objective for SQLScript is to embed data-intensive application logic into the data-
base. In a traditional three-tier architecture (see Chapter 1, Section 1.2.1), the middle
tier, the application layer, tends to dumb down the database and executes all the
156
4.2 SQL and SQLScri pt
business logic. For example. the application might perform the following steps:
Select all rows from table A, move to the application server, and then loop through
each row to perform some action. A massive data copy is a common approach with
imperative languages like Java or ABAP, but this approach fails to leverage the (mas-
sive} parallel processing capabilities of SAP HANA with multicore CPUs and all the
data residing in-memory. Code pushdown is required to get the best performance,
and SQLScript makes code pushdown possible.
Conceptually, the language is related to stored procedures and uses a combination of
declarative and (imperative} orchestration logic (loops and conditions}. You can use
the SQL data types available in the database as well as create your own user-defined
types, just as you can create user-defined functions (UDFs} and libraries. Anonymous
blocks and autonomous transactions are supported, as are features like SQLScript
encryption.
Afew key best practices to keep in mind when using SQLScript include the following:
• Break down complex queries into subexpressions: Allows the compiler to recog-
nize patterns and avoid repeating expensive computations.
• Reduce dependencies and avoid cursors (loops}: Maximizes the opportunities for
parallel processing.
• Avoid dynamic SQL: Dynamic SQL is generated at runtime and requires compila-
tion and query optimization for each call. Static SQL is compiled once and can be
executed many times, which results in much faster performance.
To help you write SQLScript code, the SAP Web IDE for SAP HANA includes a SQL-
Script debugger, also available in the ADT for Eclipse.
Learn More
SQL and SQLScript are documented in two reference guides, ava ilable from the SAP
Help Portal:
• SAP HANA SQL and System Views Reference
• SAP HANA SQLScript Reference
SAP Notes
For additional information, see the following SAP Notes:
• SAP Note 2000002- FAQ: SAP HANA SQL Optimization
157
4 Development
Tutorials
For some good hands-on exercises, try out the fo llowing SQLScript tutorial group on
t he SAP Developer Community: "Tutoria l Navigator: Leverage SQLScript in Stored
Procedures and User Defi ned Functions"
To leverage parallel processing and the in-memory database for business applica-
tions powered by SAP HANA, the same code pushdown development paradigm
found in SQLScript has also been also promoted for ABAP development. AMDP are
central to this approach.
AMDP is a framework that enables you to call SQLScript embedded in an ABAP objects.
Figure 4.3 shows an ABAP procedure with between the brackets of the execute_ddl
158
4.2 SQL and SQLScri pt
ABAP function call SQLScript code. The development, maintenance, and transport of
the SQLScript are all performed on the ABAP side.
S... workspace · ASAP - Program ZRS_NATIVE_SOLSCRJPT_(All (A4H) • inKtiYe, IO<Xed - A4H_001_dtvelope<_eo_1 - Ectipse Platf0<m
e :..--
f.tot TOOis Edit ~r<otCodot N.._.tftt Sutc.h Projt<t litilfl Vli"ltow Htlp
(j · bllt:) "- ' i!i Q. l!°I . ~ t Iii t ~ X () @ : . 1> · 0 · .• • g . q. . Gil ,p . · ~ · >- · '>¢> •
IQ Pro:stct~ t! 8 ~ v .,. 0 (l •(:.4HJZR$.NA.1'1Vi.~SC~PT _(~l t?
-
B
C> '5 ~H.001.d«-"doptt'_e,..
"a MJi..001.developef.tn.1 IMH.001. OMLOPf~ t...1 ~ ~ 0-~~:~~~~~~~~~:~~~.:-~::.-.-~~-.."'.~--
" 1) F~...:e P..cUgitt •• Set~P te•t • r.d pcoe:ed~re
"S STMP • ()(\'EL°"EA ..................... ................
1> Ell SEQ,,.GlN • Cre•te te•t t.t>le
• i& SEQ.GW. MAT v try,
1> e& Ci«ion•ry •~t_ret •>exec~te_ddl (
" Qt. SourceCodelilfff)' C•tch cx_aql_exce~1on .
1> 0 GP050Qe'Yu9ft!Ul4SAAHCGHSWO 'CP.v..Tt T:.SLZ zrs_teatprcc_t~( key INT PRIMARY KtY. va.11.le NV'..RCR:..RC2SS> ) • >.
•t&t_ret •>e•eC~te_~pclt.te (
1> 0 Groc:CIRD7VHVZMMBW:VGMWJ.i6U
I> Q CiPIE1JG'f'JEKRZNZOEU>G40lWAQ
'INSERT rNTO ira_testproe_tab VALOES(l. ••teat v• ll.le '' )' ) ,
p Q GP1f~70~ZS.:ICOIC«TNOG89PE1
I>Q GPIGASIMAHZV.CT876f8RISHIXIGI
p Q GP1G8SYl9'RSY20JllHTCC9NVSNCOT
t> 0 GP1RGMlUJ!ONP.H60f'lfMl7tTQH
t> 0 CiPJ.3Yl.NKVVC65Me:P91SIXIKT8X.9
t> 0 GPJf™H9HIOWY/()A.CH37AO'l,_LOA
t> 0 GPJWC8X19ZS2EPC8TI.QmTXSJ a t&t_ret•>e•eCl.lte_ddl (
t>
fl
0
0
CiP3WUZVAUM.8VS4U07UGQl)()([CW
GPlXVKOLHMS).21N7l'OU01P7°'"° .,..
•CR.t;.TE PROC!!OQP.t ir•_tc•tproc( oar tl
• 11£\DS SQ;. Q;>l A :.S ' ' '
zr•_tc•tProc_t•~ > ."
g:: Ovllitlt tt •' J\ • .... v-
0
0
,, 0 ZRS.NAT!Ylsa.scllPT.CAU ·wo·
).
0 CON.NAME
• R(SUlT.T
0 SQURR.,REF
0 CO"-.RU
0 STMT.J'!f <
0 RIS..REF
0 R(SIJlT.TA.8 ,,T~ ~tor>n Tai ~t • D10ti s l:]P~ $:.& • lto'l'l~·t~ Jl~.v.~ IJFtt0~ .-rr~arg.,n.l:>Cf ~
0 ltOW.CHT
!JP
SlAAT·Of-·~lECTION I; [A4HJ ZRS. NATIVf.SQLSCRIPT. CAl l
DI EXlCUTL'f'llTH_TAANSla_TABlE
61 OOCUT(...wtTH.GEN.TtMPTA8LES ........
__J
IJ HMtDLE..SCl. iXCEPTION
DI OUTPUT_RISUlT
Writ.bit
Learn More
A good place to st art is the ABAP for SAP HANA Development User Guide, available
from the SAP Help Portal.
Tutorials
For some ha nds·on exercises, try out some of the tutorials on the SAP Developer Com·
munity for topic "ASAP Development": "Tutorial Navigator: ASAP Development".
159
4 Development
Technology Background
In itia lly, SAP HANA contained different view types (attribute, ana lytic, calculation),
which define dimensions Uoining relationships), aggregations (key figures), and add-
ing complex calculations (virtual table). Calculation views could be created using a
graphical editor in SAP HANA studio, but you could also create SQLScript-based calcu-
lation views. Each view cou ld be executed in a different engine (JOIN, OLAP, SQL/CE),
and if the information model was not designed correctly, suboptimal performance
wou Id resu It.
Design-time development artifacts created in SAP HANA studio (or the SAP HANA
Web-Based Development Workbench SAP HANA XS application) were stored in the
160
4.3 Analytic Modeling
repository under the _SYS_RE PO schema (cont ent). When deployed (act ivated), the
views were saved as runtime objects in the _SYS_BIC schema with t he related _SYS_
SI C schema storing metadata like variables, t ime dimensions, and cont ent mappings
(catalog).
To support SAP HANA XS Advanced native application development wit h CDS and
HDI (see Section 4.5 and Section 4.6, respectively), these different view types were
consolidated into a single type: graph ical calculation views. You'll use the SAP Web
IDE to create them.
Figure 4.4 shows a calculation view in the SAP Web IDE for SAP HANA. In the left pane,
you'll design the data flow of the view from the source tables to the final projection.
~
• Projection
~j x
D •AFM .., ¢
.... »
..
t.. · ~ ., A ....P'lg Cak:ulated COllMT'll'\S (0) Parameaers (0) COUMs(23) Fiiiet ExpteS'!ion
(JI)
•• ... (9
. "" I
y
........_ c;i v •
.._-..,.
v
-
b ·- ·-
lll ·-
G
8
.... v QJ;Plocl~Otte
f PAATNERID
! COMPNNNAME ~
I PARTNERIO
I C.Ot.1PIJ.HYNAMI!
• PMOU<:llO
ti-
re
f PROOUCTIO
~ I TYJ'fCOOE
@) •
....
!'nit,...,..
El • R:EAOMt.md
'1
"
f TYP£COOI!
t hod~lf90'Y
f CUFtRENCY ~ .I PIOO.lt'fCllegO!y
""""""''
' ""'CE
"' ~ ,arr
.. t!U_ercl'WM
I ""'°"
"""""'
· r....-..
~
" f CITY I POSTAl.CQOE
cm
t POStAl.COOE
f STREET ~ I STA£EJ
I 8UILOING
I BUILDING
f COUN'TR'I' ~ • COUNTRY
I REGION
I RfGtON
~ ,mmo
·-
I TEXTIO
I W<GUMlE /--: ' '"'"""""
H-: PAFtTNEFtl:>
Lengfl; to
Figure 4.4 Calculation View in SAP Web IDE for SAP HANA
161
4 Development
In the right pane, for each of the phases, you'll create the mapping between data
source and output columns, add calculations, filter expressions, and define parame-
ters.
The building blocks for analytical or information modeling are called attributes and
measures. Attributes qualify the data (geography, time, product, customers, etc.).
Measures quantify the data (fact tables, key figures). Measures can be aggregated
(sum, count, average, minimum, maximum).
Calculation views enable developers to define multiple layers of calculation logic
with attributes and measures coming from different sources (column and row store
tables, multiple fact tables and/or calculation views). As you would expect, featu res
specific to SAP business application (currency conversion, SAP clients, language) are
supported. To control access to the data, analytical privileges must be defined. While
SQL defines privileges at the object level (SE LECT privilege on a table means that you
can access all rows), analytical or structured privileges \¥Ork at the row level and pro-
vide fine-grained access control.
Learn More
Separate modeling guides are available for the SAP HANA studio, the SAP HANA
Web-Based Workbench, and the SAP Web IDE for SAP HANA, all available from the
SAP Help Portal. For t he SAP HANA XS Advanced-compatible modeling, see the SAP
HANA Modeling Guide for XS Advanced Model.
SAP Notes
For additional information, see the following SAP Notes, component HAN-WDE-EDT-
MOD:
• SAP Note 2325817 - Migration of Analytic, Attribute and Script based Calculation
Views to Graphical Calculation Views
• SAP Note 2618790- Graphical View Modeling in SAP HANA- How to Avoid Unex-
pected Resu Its
Tutorials
For some hands-on exercises, t ry out some of the t utorials on t he SAP Developer
Community for topic "SAP HANA":
162
4.4 SAP HANA Extended Application Services
Technology Background
Java and JavaScript might sound similar, but t hey have noth ing in common. Java is a
programming language like C or C++ and requ ires compilation before it can be exe-
cuted. JavaScript is a scripting language and is interpreted by a runt ime engine and
executed on the spot. Why is it called a JavaScript? Because in 1995, when JavaScript
was first released, Java was popular (than ks to the marketing department of the Net-
scape browser, the precursor of Mozil la Firefox). JavaScript forms a t rinity with HTML
and Cascading Style Sheets (CSS) as t he core t ech nologies that creat ed t he World
Wide Web. Almost every website uses it, and all browsers have a JavaScript engine
built-in to execute the code. If you run JavaScript on t he server, you get server-side
JavaScript (XSJS). A recent implementation example is Node.js (2009). XSJS is the
server-side JavaScript implementation for use with SAP HANA XS.
TWo years and six releases later (SPS 11), a new application server architecture was
introduced, called SAP HANA XS Advanced, which added additional runtimes using
the same Cloud Foundry technology as on the SAP Cloud Platform. Architecture-wise,
SAP HANA XS Advanced provided many benefits over the initial SAP HANA XS imple-
mentation, now identified as "classic" SAP HANA XS, which will be covered in more
163
4 Development
detail in the following sections. Within one or two releases, most native applications
developed by SAP were updated, and developers \>Vere encouraged to migrate their
own SAP HANA XS applications with migration wizards and documentation.
With SAP HANA 2.0 SPS 02 {2017), SAP announced the deprecation of SAP HANA XS
together with the repository and SAP HANA studio as a development environ-
ment. SAP HANA XS is no longer included in the SAP HANA cloud edition (the SAP
Cloud Platform, SAP HANA service on Cloud Foundry), but neither is SAP HANA XS
Advanced, since Cloud Foundry provides application services on an enterprise
platform-as-a-service (PaaS). For native development on SAP HANA 2.0, SAP HANA
XS Advanced is the most relevant platform, but because the classic SAP HANA XS
is still available and for some application services still used (not all migration proj-
ects have concluded), we'll describe both with a particular focus on the differences
next.
For runtime configuration of these artifacts, you'll use the SAP HANA XS Admin tool.
To develop SAP HANA XS artifacts, you'll use the development perspective of the SAP
HANA studio or the SAP HANA Web-Based Development Workbench. Both the SAP
HANA XS Admin and the SAP HANA Web-Based Development Workbench tools a re
SAP HANA XS applications.
164
4.4 SAP HANA Extended Application Services
To access the SAP HANA XS Admin tool and the SAP HANA Web-Based Development
Workbench, you'll need the specific functionality role, e.g. sap . hana . xs . admin . role : :
Runt imeConf Admi nistrat or or sap . hana . xs . ide . r oles : : Developer. Unlike SAP HANA
system privileges, SAP HANA XS runtime roles are not automatically grated to stan-
dard database users (like the database super user SYSTEM). Although granting SAP
HANA XS roles to all users might be tempting, a more secure approach would be to
create a new user, e.g. XS_AOMIN and XS_DEV, and grant the user the required privileges.
For web server functionality, SAP HANA XS includes the SAP Web Dispatcher, as dis-
cussed in Chapter 3, Section 3.4.1. If you have any background in Basis administration,
you'll be familiar with this process and the administration tools, which function the
same as on SAP NetWeaver systems. The SAP HANA XS engine (or the SAP Web Dis-
patcher to be more precise) listens to a public URL defined as a (virtual) host name
with the default HTTP and HTTPS ports appended with the SAP HANA system
instance number, for example ports 8000 and 4300.
Technology Background
The SAP HANA XS engine uses the SpiderMonkey JavaScript runtime engine. This run-
time engine was originally developed for the Netscape Navigator browser (fi rst
release 1996) and soon released as open source with Firefox. Obviously, the engine
has evolved considerably over time (cu rrently version 60). Apart from browsers, t he
SpiderMonkey engine is also used in MongoDB. A popular alternative to SpiderMon-
key is t he (Google) VB engine used in the Chrome browser and by the Node.js Java-
Script runtime engine.
The SAP HANA XS engine starts a new virtual machine for each application (to com-
pile JavaScript into executable code) but provides little control for each machine indi-
vidually. All the virtual machines run t he same version, and you can't configure
memory settings for an individual app. Also, little protects against a virtual machine
running out of control, wh ich could affect the entire xsengine process.
Although similar in name and function as SAP HA.NA XS, SAP HANA XS Advanced
uses a completely different application server architecture. Unlike SAP HANA XS, SAP
HANA XS Advanced is a separate component to do\vnload and install and comes with
its own roles (xs _wor ker and xs _standby). As a result, in a distributed multiple-host
scale-out environment, when you assign a host only the xs _worker role, the server
165
4 Development
will be dedicated to SAP HANA XS and not host any other database processes. With
the SAP HANA XS engine process, this is not possible. The SAP HANA XS engine, as
described, is built-in; that is, it's included with every SAP HANA server installation. In
addition, there's not much we can do to scale or size the SAP HANA XS engine.
Technology Background
SAP HANA XS Adv a need model is a restricted implementation of Cloud Foundry tech-
nology extended to integrate with the SAP HANA platform. SAP HANA XS Advanced
enhances Cloud Foundry with SAP HANA database integration, compatibility for SAP
HANAXS XSJS, and other features.
Originally developed at VMware (2009), the software was made open source under
the Cloud Foundry Foundation of which SAP is a (founding) platinum member (2014).
As with diffe rent Li nux distributions, different Cloud Foundry platforms also exist,
typically hosted as PaaS, like the Cloud Foundry environment of the SAP Cloud Plat-
form. SAP HANA XS Advanced, released with SPS 11 in 201S, brings application server
runtime services to SAP HANA on-premise. As both environments use the same tech-
nology, you can develop and deploy locally first and then to the cloud, or vice versa,
depending on the business case.
Applications are deployed in a container, and externa l dependencies are attached as
services. In case of SAP HANA XS Advanced, for database dependency, only one flavor
is possible: SAP HANA (the SAP Cloud Platform offers several database services). In
addition, SAP HANA XS Advanced includes a specific deployment technology (the
HDI) and a specific development environment (the SAP Web IDE).
SAP HANA XS Advanced supports multiple runtime engines called buildpacks. SAP
provides customized versions fo r Java, Node.js (VS JavaScript engine), and Python,
but custom buildpacks are also supported so you can bring/build your own. Instead
of a single xsengine process, with SAP HANA XS Advanced, each runtime instance
(application) runs as a separate operating process. When you deploy an application,
the runtime is included in the container. As a result, you can, for example, run differ-
ent runtime versions side-by-side. Each application can be configured separately for
memory, security, and other settings.
Shared services are provided by the xscont roller service, which provides an interface
for deploying, running, and monitoring applications, while the xsuaaserver process
provides the User Account and Authentication (UAA) service, a central user manage-
ment environment supporting both named database users (default) and external
166
4.4 SAP HANA Extended Application Services
identity providers (IdPs}. The xsexecagent process manages the execution agents,
which start and stop applicat ion instances, and monitors uptime.
SAP HANA XS Advanced supports both port- and domain-based routing, which means
that you can configure your applications to listen to the URLs: https://publicserver-
name:50060, https://publicservername:50061, and so on, or use https://appnamel.
publicservername, https://appname2.publicservername, and so on. By default, port-
based routing is used.
With the SAP HANA XS Advanced command line interface (CL!}, you can control the
ent ire application lifecycle. You can upload applications vvith xs push, redeploy with
xs restage, start with xs start , and so on (scale, stop, delete, l ogs). You can manage
organizations and spaces, manage plugins, domains and routes, and work/ bind with
the services on the (local} marketplace, as shown in Figure 4.5. With the xs login com-
mand, you can connect to the SAP HANA XS controller application, which is the appli-
cation programming interface (AP!) endpoint. Applications run inside a space (here
SAP), part of an organization (HANAExpress). The xs apps command lists all t he applica-
tions in the space.
xeadr:l@hxehost : /usr sap/HX&/HDB90> xs 109in
167
4 Development
To configure the SAP HANA XS Advanced environment, you can also use the SAP
HANA XS Advanced cockpit web application, shown in Figure 4.6, which offers the fol-
lowing advantages:
• Provides a friendlier UI for user management
• Enables tenant databases for SAP HANA XS Advanced development
• Binds the database to a particular SAP HANA XS Advanced space
• Manages organization and spaces
• Configures routes
• Enables services from the (local) marketplace
• Monitors resource usage
State
41@.t
OCsk Ouola· Unlimittd
Name
audcloa.oroker
Instances
111
Memory
64M9
-
I> ® l!I
Learn More
Separate development guides are available covering development with SAP HANA XS
(with the SAP HANA studio and the SAP HANA Web-Based Development Workbench)
and SAP HANA XS Advanced (with the SAP Web IDE) from the SAP Help Porta l:
168
4.5 Core Data Services
SAP Notes
For additional information, see SAP Notes, component BC-XS-RT, such as the follow-
ing:
• SAP Note 2596466 - FAQ: SAP HANA XS advanced
• SAP Note 2465027 - Deprecation of SAP HANA extended application services,
classic model and SAP HANA Repository
Tutorials
For hands-on exercises with SAP HANA XS Advanced, you can try out the following
tutorials on the SAP Developer Community:
• "Tutorial Navigator: Get Started with XS Advanced Development"
• "Tutorial Navigator: Build a Basic SAP HANA XS Advanced Application"
169
4 Development
Purdl&.se(Jrder.td>c:ds • PurchaseOrdierJ'lclbcds •
1 .. ~ol'lt~t ""'r<l\ls~ffr {
+ AFM ,,. "} 2 type tusl.ncss.(~ : $tr1'ig( ll );
l type SDatc : l.ocol.Oot(';
LJ • HNfA..J".Pf> ;.....,,
::i . .ch& •s typt Cl.ll"~()'T : Strtl'ISl'( S);
type MountT : 0ttt.o(( 1S, 1 );
e ...
• coro_xsjs
• type Quantity! : Ol'c{.11al(l J, J);
..... 7
•
type UnitT : Str(ngt J>;
e ·~ ,.••
11
type St.ttt.1ST : Stl'-(~( 1 );
type HlStOl")'T {
fC~t : ·e.rcatcd ly'
UfAlE08Y : Bucin.t,Sr'ty;
12 (ICc-ent : '(f'tlttd ~tt'
u (A[AT(IMT : SO!Jtc;
tc~t : 'Ch~g~ ly'
"lS CHAH(iEOIY : Mtnitsslt'ty;
® • hdiconllg 16 (ICc-tnt : '011t1gt Oatt'
17 OIAHG.EDAT : St»tt;
[I • PDCb9t pen
11 );
::i . ...
li,.l • mtt.yaml "
29 f<O-ent : 'Pi.ir"<hliSe Ol"dtf' IWUll''
(!) • REAOME.md 21.. flltity Headcr {
22
,.,, 2l
24
kty PUtCIU$EOROCRJO : 111ttfl#,. 14'fl•l'.at•d by defa-.ilt . , ttt"tity(st.al't with 2eeNeeee
ITEMS : assoclatlon[l . e .• • J to I tt9 on Hta6er,P\MCKA.SCOROCltID •
trw:~t by t
PVl~COIU>CR.IO;
"'° •i"
t!l Ti'neSeries HISTORY : lrtstot"yT;
' Tr~ 1 "
26 fc-M : 'Not•s' c:::i
NOTEIO : eustMSS(ty null;
,.""
..
)l
PAATN[R
feo-cint :
C\.M.R(H(Y
: "'sWssXf'y;
'C 11rrtncy'
: C"N'tt'l(yT,;
)2
These annotations can be used to control specific behaviors on the client side with
SAPUIS and SAP Fiori. CDS is best understood as a programming model with different
technical implementations. As a result, CDS 11vorks differently in SAP HANA XS and
SAP HANA XS Advanced.
Technology Background
CDS was introduced with SAP HANA 1.0 SPS 06 (2014) and extended to include ABAP
with SAP NetWeaver 7.4 SPS (2014) and later SAP applications and SAP Cloud Plat-
form to enable a single data model rega rd less of the technology, initially to promote
the new code-to-data or code pushdown paradigm. For SAP HANA, CDS was
extended to provide support for SAP HANA XS Advanced and HDI with SPS 11 (2016).
The SAP Cloud Application Programming Model uses a conceptually similar approach
called Core Data and Services (see Section 4.9.2). Technically, all CDS are imple-
mented differently.
For SAP HANA native development with SAP HANA XS Advanced, CDS works hand-
in-glove with the SAP Web IDE and the HD! (see Section 4.6). For example, the SAP
170
4.6 SAP HANA Deployment Infrastructure
Web IDE will present the table definition automatically in a graphical editor. When
the IDE builds the application, the CDS file extension (as defined in . hdiconfig) trig-
gers the appropriate plugin to parse the document and generate the code to create
the actual database runtime object (using HD!). Ho"vever, CDS is not your only
option; you can also use plain SQL DDL to define database objects.
Learn More
For the documentation, see "Defining the Data Model in XS Advanced" in the SAP
HANA Developer Guide for SAP HANA XS Advanced Model (or the Developer Guide for
SAP HANA XS). Both guides are available on the SAP Help Portal for the SAP HANA
platform.
Tutoria ls
For hands-on exercises using CDS, many are available to choose from on the SAP
Developer Community, including development for ASAP, SAP Cloud Platform, and
SAP S/4HANA. The SAP Developer Community also covers the new Core Data and
Services programming model so you can stay up to dat e. To lea rn how use CDS to
model both the client UI and database, see "Tutorial Navigator: Create an SAPUIS
application with SAP HANA XS Advanced".
The HD! is a service layer of the SAP HANA database and helps create runtime data-
base objects from design-time artifacts. HD! manages dependencies; for example, a
table might need to be created before we can create the view. HD! also executes as a
transaction, that is, the \vhole operation either succeeds or fails (we do not want to
make a mess of our database). HD! was introduced with SAP HANA 1.0 SPS 11 (2015)
together with the SAP HANA XS Advanced application development Node.js and Java
run times and the SAP Web IDE for SAP HANA development tool. Technically, HDI is a
Node.js application.
In the first release of SAP HANA, development artifacts were stored in the repository.
This repository "vas central to the application lifecycle management, as we'll see in
the next section. Although not technically a part of the SAP HANA XS environment,
171
4 Development
the repository is closely related, and both have been deprecated since the SAP HANA
2.0 SPS 02 release. HD! differs significantly from the repository in two key areas:
• HD! offers no version control or lifecycle management capabilities. For these func-
tionalities, the SAP Web IDE integrates with GitHub.
• HD! only deploys database objects, not JavaScript, OData, or any other objects
related to the application layer or UI layer.
HD! containers always come in pairs: a design-time container (DTC) and a corre-
sponding runtime container (RTC). The runtime objects are created in an HD! con-
tainer based on the CDS persistence data model, which not only allows for multiple
deployments but also for the deployment of multiple versions of a single application
into the same SAP HANA database (which is not possible with the repository).
Inside the database, the HD! container is represented as a schema but is owned by a
technical user and isolated from other database objects. Only local object access
inside the container is allowed, and to access objects outside the container. syn-
onyms are required with explicit grants from the object owner. As a result, the devel-
opment of database objects is schema-less/free. In the repository, all objects were
owned and accessible by a single technical user _SYS_ REPO, and all modeled views
were owned by _SYS_BIC/_SYS_BI.
HD! services are provided by a process called the diserver. This service is automati-
cally configured and started with the installation of SAP HANA XS Advanced. Once
your SAP HANA XS Advanced development environment has been configured. exe-
cuting a Bui ld command from the SAP Web IDE will execute the required steps to cre-
ate HD! containers in your databases and to create the database objects, which will be
displayed as shown in Figure 4.8. Alternatively, you can interact with HD! on the com-
mand line with the xs (and cf) CLI or in the SQL prompt using the SQL APL
Tutorials
For hands-on exercises using HDI, you can try out the following tutorial on the SAP
Developer Community:
• "Tutorial Navigator: Get Started with XS Advanced Development"
• "Tutorial Navigator: Bu ild a Basic SAP HANA XS Advanced Application"
172
4.7 Applicat ion Lif ecycle Management
,_
• />$M
.,
.... ' ....__ .......
-- --...."""""" • ..•
A A
()J>tnHOI ~
-
ll)
El •
......11<.tt ' f'UACHU(OflOCftO
-
.' """
0
a
® ., .,.._,. "-*" ........
"'"' ,,_...
HOmD ~
-----·
'
® ••
-J Cul xx
"' .............
(!)
"""""""'"
.,,. lk,
c.., XC
~:J "'
(!) Tllx•...:MIHT
-
xv
· r~ .......
P•'1•
F2
(!)
(!)
_...,,,.
t..FEC'l'Q.ESW\1$
Modding A.dionl
'
(!)
Cll
-·""'"""
Ofl:O(bo!C$TATU$
(!) ~TATI.19
0-. ©
.... ' r1nalti1n9 ... oll
M.ke 1\!Cc.t<lff (0 va.tolJ'l911 : I f1111 ftplOr-d (lff.Ctiv1 l>, 0 fil11 11"4ieplO)'ecl (effe<:t1ve OJ, 0 depend1nt
Kall.1n9 • • • ok
&i.iid s.-- f . .
... Startln9 . .k• ln the oont1in1r •01. 1• v lth I fil11 to dflplO)', 0 file• to undeploy .•• o\
••••>
---
l >eployin9 tc;i YI• CX111t&in11: •oa_1· ... ok (41
lo def111lt- ..::c-e11- rol1 h•ndlin<; oeoededi 9loti.l .role ·o•_l 1 1 a<:Cil11_l'Ol1" will not be edapt9d
» lnlockin9 the COlllta1ner "DB_ I" , ,,
1nlockin9 the container ·oa_1· . .. o.t (01 0..)
lieploy.ent to oontainer oa_t ck>fi• (O.plor-ent 101 no~I ·
j5• 42). . ,
Rt*'e:th WO!'k"'9C* hemt
12:02:55 (Olluild> •••••••••• Cnd of IHAIVt._ AJ>P/db &aild "°' .......... Lb.
12102155 t019uildl 9uild r.1ult• liak 1 https1//hxehotlt15l075/ch•/bllilder/work•poc•p2ccc2y60JC07qcj•/dowlllo.d••I
1a10215S flullderl luild of /llA!l.A_AJiP/db ~leted •1a1X:•••fully. ~
Figure 4.8 Building Design-Time Artifacts and Deploying to Runtime Database Objects
Learn More
For the documentation, see the SAP HANA Deployment Infrastructure (HD/) Reference
and "Deployment-Infrastructure Services in XS Advanced" in the SAP HANA Deve-
loper Guide for SAP HANA XS Advanced Model. Both gu ides are available on the SAP
Help Portal for the SAP HANA platform.
SAP HANA application lifecycle management defines the different phases of an appli-
cation's lifecycle, from modeling, development, assembly, and transportation to test,
production, installation, and configuration. How exactly these phases are imple-
mented depends on your organization. In traditional IT environments, the install
and configure phases for production will be managed by operations. In a DevOps
organization, the install and configure phases will be a shared responsibility between
development and operations. These phases are described in Chapter 3, Section 3.3.4.
173
4 Development
Learn More
For the documentation, see the SAP HANA Application Lijecycle Management guide.
This guide mainly covers SAP HANA XS (not SAP HANA XS Advanced).
For documentation about SAP HANA transport for ABAP, you'll need go to the SAP
NetWeaver documentation porta l, see Using SAP HANA Transport for ABAP-ABAP
for SAP HANA Development User Guide and HTA for HD/ - Software Logistics.
SAP HANA 2.0 includes a JSON document store, which adds a document-oriented
database to the SAP HANA platform. A "document" is a JSON naming convention
and has no relation to PDFs or other type of documents. Usually, you would use a
relational database for transactions that require ACID (Atomicity, Consistency, Iso-
lation, Durability) compliance. For other storage requirements, NoSQL databases
174
4.8 JSON Document Store
are good candidates. in particular when you need to store large volumes of data
without any predefined data structure and require the agility to handle frequent
data model changes. With a JSON document store on the SAP HANA platform, ho\v-
ever, you can query and manipulate )SON data using SQL and join JSO N documents
with relational column and row store tables, which makes document store transac-
tions ACID-compliant.
You'll enable the document store for a tenant database, which starts a separate pro-
cess: docstore. The document store is a regular SAP HANA service, automatically par-
ticipates with backups, and integrates into the high availability architecture of
system replication and multiple-host scale-out systems (see Chapter 2, Section 2.4).
The JSON document store adds an enterprise-ready NoSQL database to the SAP HANA
platform while still allowing you to use same SAP HANA tools for administration and
development.
Technology Background
JavaScript Object Notation (JSON) is a syntax for exchanging and storing data (.json
file). The syntax is the same as the code for creating JavaScript objects (hence the
name), but because JSON is made of text, it can be read and used as a data excha nge
format by any programming language. Similar to XML, JSON is much faster and eas-
ier to parse by a browser, which is where t he tech nology comes from.
JSON data can be nested and is schema-less with no predefined fields and data types.
JSON data is semist ructured, however, in that the data describes its own structure,
for example:
{''first name'': ''John '', ''lastname'': ''Smi t h'' , '' age'' : 45 }
You can store JSON as documents in a database, usually in a Not-Only SQL (NoSQL)
database. Different types of NoSQL databases are available, of which the document
store is just one. MongoDB is a well-known NoSQLdatabase for documents. Other
examples are Neo4j for graph and Redis for key-value, to name but a few.
Documents are stored in a collection, which you'll need to create first. Collections are
presented as a table into which you can insert JSON documents using SQL or import
data from a CSV file, for example.
Documents are presented as rows. The document store has its own DDL (create) and
data manipulation language (DML) (insert) statements, and SQL functions (JSON_
175
4 Development
TABLE, JSON_QUERY, JSON _VALUE) can query JSON text and present results as a relation
table, for example. Figure 4.9 shows how you can interact with the JSON document
store using SQL.
•••
• -' Catalog
21 COlltCTIO'I ltt f.avoi.or1tt ltl'lrt t"t' Ct.1\l •t• • tl'I tl'lt' :o?
IAAP<etS 29 • WITK ptoductVtnr AS ( SllECT ·1d 0
"&tnrt• F~ WElS"OP . "ProductCo\ltctlon" WllEll:E "IJtnrt" IS SET)
,
*fl t,,.
Gtaph \VofkspCKes
Indexes
0 JSON Co.lectlons
.
JI
)9
(Ollf(TIOll rt.lilt'• 11 ISOM "tl'lt tty •itl SttEC"" COi .11n<1
St:lf('J i "procluc tlO" : "id ", • ar ticltlf••t": "nt111t". •.art1cltPri c •·: • pric•·, · ~rt 1<ltType: •: " boolc " } f ltOPI wt9SHOP. "
ml utwar>C-S "
Resu11 x
'
~es.sages x
WE8SHOP 6'
~ Rows (!) !] SOL .!. C ~
genre COUNT
1 Fdk 2
Learn More
The SAP HANA JSON document store is documented in two guides, which you can
read or download f rom the SAP Help Portal:
• SAP HANA JSON Document Store Guide
• JSON Document Store Statements
Tutorials
For hands-on exercises with the JSON document store, you can try out the follow ing
tutorial on the SAP Developer Community (the title may suggest otherwise but it
concerns the document store): "Tutorial Navigator: Explore Advanced Ana lytics w ith
Node.js and PHP".
176
4.9 SAP Cloud Platform
177
4 Development
Learn More
The best way to learn about the different environments, capabilities, and services of
the SAP Cloud Platform is to sign up for a free tria l account at http://s-prs.co/
v488478.
Another good place to start is the SAP Developer Center, where you'll find an over-
view of t he capabilities, a long list of tutorials, biogs, Q&As, and other resources. You
may also want to bookmark the SAP Cloud Platform SAP Community site, which
includes more links to resources, like free openSAP courses, for example.
Technology Background
SAP's enterprise PaaS project started with creating an on-demand, cloud-based ser-
vice offering for the SAP NetWeaver Application Server for Java (SAP NetWeaver AS
for Java), also known as "NetWeaver on-demand," or Neo for short (2012). The plat-
form was launched as the HANA Cloud Platform, later renamed to SAP Cloud Plat-
form (2017). You can download the "Neo" SDK from http://s-prs.co/v488479, and neo
is also the name of the CLI.
Cloud Foundry, like Neo, provides a cloud-hosted runtime for applications but is not
limited to Java. Cloud Foundry also includes runtimes for Node.js, PHP, Python, Go, R,
Ruby, .NET, and more because you can create and upload your own runtimes (or
buildpacks as they are called). In fact, the objective of Cloud Foundry is to provide a
cloud-native architecture for the continuous delivery of applications from develop-
ment to production.
Cloud Foundry works with containers. In other words, Cloud Foundry is completely
virtualized, which means that you can either run it on your own computer or use it
178
4.9 SAP Cloud Platform
on-demand from a PaaS provider, the same as you would run Docker containers or
virtual machines, either locally or "as-a-service" from a cloud infrastructure provider.
The architectu re of SAP HANA XS Advanced is based on Cloud Foundry, using the
same microservices architecture, the same UAA service, and the same routing ser-
vice. As a result, developing SAP HANA XS Advanced applications is easy since you
can develop the project on-premise on the SAP HANA platform and deploy your
applications to the SAP Cloud Platform for production, with the associated scalability
and elasticity. When working with both SAP HANA XS Advanced and Cloud Foundry,
you will face little to no learning curve. The CL!s xs and cf, for example, work in
exactly the same way (see Section 4.6).
Learn More
For more informat ion about the SAP Cloud Application Programming Model, see the
Getting Started Guide for the SAP Cloud Platform on the SAP Help Portal (Working
with the SAP Cloud Application Programming Model).
179
4 Development
Tutorials
For some hands-on exercises, t ry out some of the tutorials on the SAP Developer
Community for topic "SAP Cloud Application Programming Model":
• "Tutorial Navigator: SAP Cloud Application Programming Model"
• "Use the SAP Cloud Application Programming Model to Create a Full-Stack App"
180
4.10 Client Interfaces
Learn More
Development for the SAP Cloud Platform, SAP HANA service is documented on a sep-
arate portal on the SAP Help Portal:
• Developing SAP HANA in the Neo Environment
• Developing SAP HANA in the Cloud Foundry Environment
• SAP Cloud Platform, SAP HANA Service - Getting Started Guide - "SAP Cloud Plat-
form, SAP HANA Service in AWS and GCP Regions"
Tutorials
For some hands-on exercises, try out some of the tutorials on the SAP Developer
Commun ity for topic "SAP Cloud Platform, SAP HANA service": "Tutorial Navigator:
SAP Cloud Platform, SAP HANA service."
You can connect to the SAP HANA database either using a full client or through a
web-based interface. For web-based OData, XMLA, and InA interfaces, see Section 4.11.
In this section, we'll introduce the full database clients.
181
4 Development
encryption or when you want to connect the SAP HANA client to the SAP Cloud Plat-
form, SAP HANA service. With CommonCryptoLib, mutual authentication can be
configured for additional security. In this setup, the client validates that it is connect-
ing to the right server (preventing man-in-the-middle attacks), and the server only
accepts known client connections.
To avoid entering the connection string (server name, port, database, user name,
password) 1.vith each connection, you can store the string as a key in the secure user
store \ivith the hdbuserstore command. The store and the command are included with
the SAP HANA client. For service connections, we recommend this approach to avoid
storing passwords in text files or in the Windows registry.
SAP HANA-specific features are provided by a separate layer called SQL Database Con-
n ectivity (SQLDBC) . This layer sits between the client driver and the SAP HANA data-
base. Not all clients require a client driver. Some tools, like the SAP HANA interactive
terminal (hdbsql), connect directly to SQLDBC. For troubleshooting non-ODBC appli-
cations, you can activate tracing at the SQLDBC layer. Network traffic can be com-
pressed, but doing so doesn't always necessarily improve performance. Better results
may be obtained with using result set prefetching, extensive usage of stored proce-
dures, and other techniques.
Learn More
How to install or updat e the SAP HANA client is documented in a dedicated guide on
the SAP Help Portal: SAP HANA Client Installation and Update Guide for SAP HANA
Platform.
You can download the SAP HANA client from t he Software Downloads section of t he
SAP ON ESupport Launchpad or from t he SAP Development Tools website (free):
• SAP HANA Client 2.0 (Support Packages and Patches)
• SAP Development Tools - SAP HANA Clien t 2.0
SAP Notes
For additional information, see t he following SAP Note 2393013 - FAQ: SAP HANA
Clients.
182
4.10 Client Interfaces
4.10.2 SQLDBC
All SAP HANA clients, except JDBC (see Section 4.10.3), connect to the SAP HANA data-
base through SQLDBC, which is a runtime library to execute SQL statements to access
or modify data specific to SAP HANA. Since the SQLDBC library contains all the intel-
ligence about how the in-memory database exactly works, using this layer provides
much better performance when compared with generic ODBC drivers, in particular
when used by clients such as Python or ADO.Net. SQLDBC is a proprietary protocol
and, apart from tracing and error codes, not publicly documented. Because of this
shared SQLDBC layer, all the SAP HANA clients support SAP HANA-specific features
like active/active read-enabled system replication, client-side encryption, and more
out of the box.
Technology Background
The SQLDBC runtime library originates from SAP MaxDB 7.6 where it replaced the C/
C++ Precom piler for embedded SQL. SQLDBC is optim ized for SAP NetWeaver connec-
tivity with a matching server-side component. This heritage explains t he similarity
between the SQLDBC t race and t he (hdb )sql dbc_cons utility present in both SAP
MaxDB and SAP HANA, fo r example. You'll also find similarities between command
line opt ions and paramet er syntax for t he ODBC/JDBC driver, t he interactive termi-
nal, and the secure client user store.
4.10.3 JDBC
Together with ODBC, JDBC drivers provide the most common way to connect a data-
base client to a database server. The driver, which is simple Java Archive (JAR) file, is
usually embedded in the application, as is the case with the SAP HANA studio Eclipse
plugin, but the driver can also be used on the command line for testing. The SAP
HANA JDBC driver is called ngdbc . jar. The name of the file (ngdbc for "next-generation
database client") reflects the seniority of the driver, as it predates the "SAP HANA"
branding. "Next-generation database" was one of the early names used internally by
SAP development.
The JDBC JAR file is part of the SAP HANA client media, but since ngdbc is self-contained,
it does not require a client installation to function. To use the driver with alternative
JDBC clients, like the SQuirreL SQL client for example, you can just copy the driver JAR
file to the required location. The connection properties support client-side encryption,
183
4 Development
system replication, cloud connector, host failover, and other SAP HANA-specific fea-
tures. These features are included with the driver and do not require SQLDBC.
Code Clinic
The getConnecti on() method is used to make a connection:
j ava .sql .Connection conn= java. sql .DriverManager .getConnection
( "j dbc :sap ://host . exampl e. com/?inst anceNumber=90&databaseName=
HXE'' , '' SYSTEM'' , ''*****'');
Alternatively, you can make (test) a connection on the command line:
java -jar ngdbc .jar
-u SYSTEM, Welcomel -i 90 -n host .example .com:39015 -d HXE
-c "SELECT DATABASE- NAME FROMM- DATABASES"
Learn More
For the documentation, see "JDBC Application Programming" in the SAP HANA Client
Interface Programming Reference on the SAP Help Portal.
4.10.4 ODBC
Together with JDBC, ODBC drivers provide the most common way to connect a data-
base client to a database server. On Linux and Unix operating systems, the ODBC
driver is a shared object (.so) file, which links to other library files and 11vill need the
LD_LI BRARY_PATHenvironment defined to function properly. On Microsoft Windows,
the environment is registered in the registry, and the ODBC driver is a dynamic-link
library (DLL), conceptually the same as shared objects. As with the SAP HANA JDBC
driver, the name of the file (libodbcHDB.dll and libodbcHDB.so) also reflect the senior-
ity of the driver, this time referencing the "Hybrid DataBase" internal name ("hybrid"
because the in-memory compute engine combined row, column, and object store).
184
4.10 Client Interfaces
The HDBODBC driver is included with the SAP HANA client. Before you can create
ODBC connections, you'll first need to install the appropriate version. For some plat-
forms, only the 64-bit client is supported, but for others, like Microsoft Windows and
Intel Linux, for example, you can install both 32· and 64-bit clients.
On the Microsoft Windows platform, you can use the ODBC data source administra-
tor to define data sources, as shown in Figure 4.10. A data source name {DSN} contains
the server and port part of the connection string. You'll need to provide a user name
and password when using the DSN. With the ODBC data source administrator, you
can create SAP HANA DSNs for personal use or for system-wide usage as system DSN
and also configure generic settings for connection pooling and other properties.
Using this tool helps you define ODBC connections, including more challenging envi-
ronments, for example, when using web sockets to connect to the SAP Cloud Plat-
form, SAP HANA service.
On Unix and Linux platforms, ODBC configurations vvill be file based. You'll need to
install an ODBC driver manager, which is usually not included with the system.
185
4 Development
As with JDBC, you can use SAP HANA client secure user store {hdbuserstore) to store
the ODBC connection string including user name and password as a key in an
encrypted file (the user store). The client can then connect with the key instead of
using password, which helps avoid entering passwords in configuration files or regis-
try keys for service connections.
Technology Background
The Open Database Connectivity (ODBC) API predates JDBC by a few years (1992). In
the early days of computing, you had to compile your code with embedded SQL,
which worked differently for every language and every database. The Windows oper-
ating system includes an ODBC driver manager and configuration interface, the
ODBC data source administrator. On Linux and other operating systems, you'll need
to inst all the driver manager. Like SAP for the SAP HANA database, most database
vendors provide installation packages with specific ODBC drivers for the database in
question.
Code Clinic
The odbc . ini file (or Windows registry entry) defines a specific database connection
using a specific driver. Listing 4.1 shows a sample configuration connecting to SAP
Cloud Platform, SAP HANA service, using encryption:
(Haas]
dri ver =/usr/sap/hdbclient /libodbcHDB .so
serverNode=zeus .hana .eu-central l .whi t ney .dbaas .ondemand. com: 5432 1
encrypt=Yes
sslCryptoPr ovider=commoncrypto
ssltruststore=$SECUOIR/sapcli .pse
Listing 4.1 ODBC Configuration
To test the connection on the Linux platform, you can use the isql tool included with
the unixODBC driver manager package:
$ i sql Haas username password
SELECT VERSION FROM M DATABASE
186
4.10 Client Interf aces
Learn More
For t he documentat ion, see "ODBC Application Programming" in t he SAP HANA
Client Interface Programming Ref erence on t he SAP Help Portal.
4.10.5 ODBO
0080 is the equivalent of OD8C but for multidimensional databases. OD80 is spe-
cific to the Microsoft Windows platform and most often used in Microsoft Excel. The
SAP HANA client includes an OD80 driver, which enables you to execute MDX que-
ries directly. Connecting \Yith Microsoft Excel is easy using the data connection wiz-
ard, sho\vn in Figure 4.11. The connection is made to a specific cube, which is how
calculations views are exposed.
Al ,,. -.
B 0 f ,, 0 p 0
-
1 I
A
~ Comecwi Attrced M
)( l M N
'
4 SOtcllY It'« foloM'l9 '° <.Or"l'lt(t:
Tut Cont1t<tiofl )(
5
• ..... I•.fc.W'o.)61
7
•
9
10
........
""""""""" _ @
o.............
®-..-
Test COl'IM'C1101'1 wccffdcd.
OK
11 @u.-o.~
12 - 1-
..
13
""'
,_. 1-
Osn•DI..,.,
:J
,.
-
15
I•• •••.••
l7
18
T8t Comee..-.
19
.,t..S. 21.lt ()2-bQ
20
21
22 OK
,.
23
25
>L
1 ....... ®
t.c•ctr !I o.~pa.y Stthn9~ It
• l!!l - I • "'""
Figure 4.11 SAP HANA ODBO Client in Microsoft Excel
SAP HANA supports Microsoft Excel features like drilldown, creation of named sets,
report filters, insert slicer, and more. As with SQL, many MDX functions are available
like Aggregate, Ancestor, Ascendant, and Avg, to name just a few starting with A.
187
4 Development
ODBO is the full client equivalent of XML fo r Analysis (XMLA) when u sing web-based
data access (see Section 4.11.3).
Code Clinic
Listing 4.2 shows a sample MDX statement.
WITH
MEMBER [Measures] . [Special Discount] AS
(Measures] . (Discount Amount] * 1.5
SELECT
[Measures] . ( Special Discount ] on COLUMNS ,
NON EMPTY [Product ] .[ Product] .MEMBERS ON Rows
FROM (Sales ]
WHERE [ Product] . [ Category] . [ Widgets]
Technology Background
ODBO is t he acronym for OLE DB for OLAP, which, when fu lly spelled out, stands for
"object linking and embedd ing database for onli ne analytica l processing" (the OLE
DB abbreviation is a long story). A Microsoft technology and an industry standard,
ODBO is the API for mu ltidimensional data processing. While ODBC and JDBC con-
nect with t he database using the SQL language, ODBC speaks MDX, t he language
understood by the OLAP database to query data stored in cubes.
Learn More
For t he documentation, see "ODBO Application Programming" in the SAP HANA
Client Interface Programming Reference on the SAP Help Portal. The refe rence lists all
supported MDX fu nctions but for a ful l explanation you're directed to the MDX Refer-
ence on https://docs.microsojt.com/.
4.10.6 Python
The Python programming language has been around for a long time, but is suddenly
popular again for use in data science projects. Although Python has been included
with t he SAP HANA client since its initial release for internal usage purposes, support
188
4.10 Client Interfaces
for Python as a database client was introduced more recently with SAP HANA 2.0 SPS
02 (2017).
The SAP HANA client includes a Python driver that implements the Python Database
API Specification (PEP 249}. For those familiar with Python, installation is standard
procedure using the PIP package manager using the command pip install hdbcli .
You'll connect with a function call to the DBAPI with dbapi. connect. As sho,..,n in
Figure 4.12, you can run the Python code inside a Jupyter notebook, a common and
popular data science tool, and you can use the connect ( ), cur sor (), execute( ), fet ch-
all (), and close() methods.
:-:
_ JUpyter HaaS Python Last Checkpoint: Last Wednesday at 3:33 PM (unsaved changes)
•
File Edit Vrew Insert Cell Kernel Widgets Help
~ + :I( eei ~ + +
conn.cl ose()
H Run
• c .. Code •• Cl
189
4 Development
As mentioned, Python has been part of SAP HANA since its init ial release. To collect
diagnostic information for support purposes, for example, you would execute the
Python script f ullSystemi nfoDump . py. To automate the execution of additional pro-
cesses during host auto-failover or system replication takeover, the SAP HANA nam-
eserver process provides a Python-based AP! called the HA/DR provider. In addition,
several tools have been written in Python, for example, the application lifecycle man-
agement tool hdbalm.
Technology Background
Python is a programm ing language created by Guido van Rossum. First released in
1991 {the name was inspired by Monty Python's Flying Circus), it remained relatively
obscure until the Internet made Python a success; the first version of Google was
written in Python, for example. Today, together wit h C and Java, Python is among the
most used programming languages. For data science projects, machine learning, and
artificia l int elligence (Al), Python is often t he preferred choice.
Learn More
For t he documentation, see "Python Application Programming" in the SAP HANA
Client Interface Programming Reference on the SAP Help Portal.
4.10.7 Node.js
Node.js is one of the most, if not the most popular development framework in the
world right now. As open source, Node.js is freely available and is supported for the
most common operating systems (cross-platform). Node.js is a runtime to execute
JavaScript code, and is equally popular as a programming language. Like Python,
server-side Node.js was already available as a runtime for SAP HANA XS Advanced,
but support for Node.js as an SAP HANA client was only added in 2017 with SAP HANA
2.0 SPS 01. The runtime comes with the client. but alternatively, you can also install it
from the SAP node package manager at http://s-prs.co/v488420, as shown in Figure
4.13. The client includes a module that exposes streaming functions, so you can also
use Node.js also with SAP HANA streaming analytics, the complex event processor
(CEP) described in more detail in Chapter 5, Section 5.7.
190
4.10 Client Interfaces
+ @sap/hana-client@2.4.139
updated 1 package and audited 3 packages 1n 2.329s
found 0 vulnerabilities
C:\Users\saphanaacademy\nodeapp>node hana.js
Oatabase name SYSTEP'OB
C:\Users\saphanaacademy\nodeapp>type hana.js
~ar hana = require("@sap/hana-client");
var conn = hana.createConnection();
var conn_parms = {
host "mo-lcaae8fcb"
port 39613, '
uid "SYSTEM"
pwd "Initiall' .. ,
}
conn . connect(conn_parms, function(err) {
if (err) throw err;
conn.exec("SELECT OATABASE_NAME FR<l-1 M_OATABASES", function(err, result) {
if (err) throw err;
console.log("Oatabase name", result[0].DATA8ASE_NAME);
conn.disconnect();
})
});
-:\Users\sanhanaacademv\nodea~~>
Technology Background
Node.js is an open source, cross-platform JavaScript runtime, written by Ryan Dahl,
initially released in 2009 and built on the Google Chrome browser JavaScript engine.
For web developers already fam iliar with client-side JavaScript, writing server-side
code is relatively easy, in particular when compared to other programming lan-
guages. Working with a single language (full-stack) simplifies web development
projects (smaller teams, reduced development time, code reuse). In addition, the run -
t ime provides good scalability and high performance because of its event-driven
architecture (EDA): a single event loop with no threading or waits.
191
4 Development
Learn More
For the documentation, see "Node.js Application Programming" in the SAP HANA
Client Interface Programming Reference on t he SAP Help Portal.
4.10.8 Go
With the Go programming language slowly gaining momentum, as of SAP HANA 2.0
SPS 02 (2017), the SAP HANA client now also includes a driver that enables Go appli-
cations to connect to the SAP HANA database using the Go SQL AP!. Go runs on mul-
tiple platforms (Linux, Windows, macOS). Unlike the other clients, you'll need to
build a Go driver from the source code. When you've installed the SAP HANA client,
the source code for the Go driver and three code samples are included for working
with transactions, statements, and large objects. As shown in Figure 4.14, creating the
driver is not particularly complex if you have some familiarity with Go. The driver
supports all the SQLDBC connection properties, so you can also connect Go to the
SAP Cloud Platform, SAP HANA service with a web socket URL, for example.
Technology Background
Go, or golang, is programming language designed at Google by Robert Griesemer,
Rob Pike, and Ken Thompson (yes, from Unix fame). Go is open-source and combines
the speed of a dynamic language with the performance and security benefits of a
192
4.10 Client Interfaces
com piled language-Python meets C++, as it was initially introduced when it was
first released in 2009. The programming language is gaining in popularity (Docker is
written in Go, for example), but nowhere near as popu lar as C++ or Python yet.
Learn More
For the documentation, see "Go (golang) Application Programming" in the SAP HANA
Client Interface Programming Reference on t he SAP Help Portal. The reference
includes a number of sample applications.
Tutorials
For a hands-on tutorial, visit the SAP Developer Center, and check out "How to write
a simple go application t hat queries HANA, express edition."
4.10.9 ADO.NET
If you've done any development for the Windows platform, you'll be familiar with
the .NET application development framevvork in general and the ADO.NET data
access technology specifically. For SAP HANA, support for ADO.NET was added with
SPS 08 (2014). When the SAP HANA client installer detects the presence of Microsoft
Visual Studio 2017, a plugin is automatically added, which works with both SAP
HANA, platform edition, and SAP HANA, express edition (see Section 4.12). With the
plugin, you can do the following to facilitate creating ADO.NET applications:
• Directly access SAP HANA databases from within the Visual Studio's Server
Explorer
• Debug SQLScript stored procedures
• Access the SQLScript editor with code highlighting, error correction, and object
name prompts
In the programming reference, you'll find the SQLDBC connection properties with
extensive examples (code snippets) using the .NET programming languages C# and
Visual Basic for connections, data access and manipulation, stored procedures calls,
transaction processing, error handling, and tracing support. In addition, a full AP! ref-
erence for the provider is available.
193
4 Development
Technology Background
ADO.NET is the data access technology used in the Microsoft .NET Framework for use
with programming languages like C# or VB.NET.
ADO.NET replaced the older ActiveX Data Objects {ADO) technology, which dates
from 1996 and replaced Data Access Objects (DAI). This alphabet soup, like OLE DB for
OLAP, makes perfect sense to a Windows platform developer but is not all that intel-
ligible to anyone else.
The .NET application development framework dates from 2002.
Learn More
For the documentation, see "Microsoft ADO.NET Programming" in the SAP HANA
Client Interface Programming Reference on the SAP Help Portal.
Tutorials
The reference includes sample projects and tutorials, but hands-on tutoria ls are also
available on the SAP Developer Center, such as:
• "Install and Use the SAP HANA Plugin for Microsoft Visua l Studio"
• "How to connect to SAP HANA using Data Provider for Microsoft .NET"
4.10.10 Ruby
If you've done any web development in the last 10 years, you'll likely be familiar with
the Ruby programming language and the Ruby on Rails web application develop-
ment framework. As of SPS 03 (2018), the SAP HANA client no\v also contains a Ruby
driver, so you can use the SAP HANA database to pov;er your web applications. You
could use the SAP HANA, express edition, described in more detail in Section 4.12, for
example, which comes with a free developer license and runs {without the SAP HANA
XS Advanced runtimes) on as a little as 8 GB of RAM.
Two installation packages are available, called "gems" in the Ruby vernacular, and
you can use the RubyGems package manager to install. In other words, for those
familiar with Ruby, connecting SAP HANA to Ruby is as easy as connecting to any
other database. The two gems are:
194
4.11 Web-Based Data Access
Technology Background
Ruby is an interpreted programming language, like Python. Developed by Yukihiro
Matsumoto, its release history goes back to 1995, but the language was fa irly obscure
until the release of t he Ruby on Rails web application framework (2005), which made
it much easier to bu ild websites than PH P, for example. More recently, alternatives
like Node.js are gaining popularity, and Ruby is in slight decline, but t he web frame-
work is st ill widely used, including for some la rge websites.
To distribute Ruby programs and libraries, you'll use the RubyGems package man-
ager and "gem" packages, which makes installing and updating your Ruby environ-
ment easy.
Learn More
For t he documentation, see "Ruby Applicat ion Programming" in the SAP HANA Client
Interface Programming Reference on the SAP Help Portal.
OData services can be used or consumed, as it is usually phrased, by Java and Java-
Script applications. The InA service and XMLA are mainly consumed by analytical
(web-based) reporting tools and access either SAP HANA information views or the
MDX engine directly. These services rely on the classic SAP HANA XS environment
and require installation and additional configuration in case we want to use them
with SAP HANA XS Advanced.
195
4 Development
4.11.1 OData
For Java applications, the latest and most current version of OData (4.0) can be used,
implemented with the @OData . publ i sh annotation in a CDS document. In defining the
OData service, you'll specify which table or view should be made available, or
exposed, as an OData collection for use by the client application.
Technology Background
The Open Data (OData) protocol defines how to provide and consume (create and
use, if you prefer) RESTful APls. The in itiative for the standard/protocol comes from
Microsoft (2007) but is now managed by the Organization for the Advancement of
Structured Information Standards (OASIS).
Representational State Transfer (REST) defines how to create web services. Services
that conform to the definition are called RESTful and provide a set of standard HTIP
methods (GET, POST, PUT, DELETE) with a media type (J SON, ATOM/XML) and a URI.
Many different OData libraries are available, for example, .NET, Java, and JavaScript
including SAPUIS. OData is often explained as "ODBC of the Web," and like ODBC,
OData is not limited to database access.
For JavaScript, you'll put the OData 2.0 service definition in an xsodata artifact, which
just a regular text file with the .xsodata extension. To consume the OData 4.0 service,
you can add a Java module to an SAP HANA XS Advanced MTA and route the OData
request to the Java component. Alternatively, you can use the OData 4.0 service with
Node.js. OData 4.0 for JavaScript technologies is work-in-progress at the time of this
writing (summer 2019), as the SAPUIS OData 4.0 model has a limited feature scope
and is not supported by SAP Fiori elements.
Code Clinic
Creating an OData service can be as simple as creating a new file in the SAP Web IDE,
for example, with name businessPartners.xsodata, containing only the namespace
and the name of the table:
service{ "MD.BusinessPartner" as "BP"; }
After building the Node.js module containing the service, run t he web modu le and
append the name for the file to the path /xsodata/businessPartners . xsodata of the
196
4.11 Web-Based Data Access
URL to access the data in an OData service. For the exact steps and a hands-on tuto-
rial, see "SAP HANA XS Advanced, Creating a Simple OData Service" at the SAP Deve-
loper Center.
Figure 4.15 shows how to define the service in the SAP Web IDE.
· ~·~"
1 .......,,,. (
e a 1 ·111.trdi.t~tOr• .lflt...-·
• twfA_APP ~ ) as • .,,,..."°"'. .....,..•tts ( "U • " •s -.Olt•~I:
Ill •.<ho •
" • CIOl'9_Uj$ •• "IJl>rt»~.0.-. I t • •
" ..,
. , "l'Ol l ••"•
G:l • .<lw
•' •t. .t-ttoo ·•t-· ,..1""u..1 -~-r~• 11>· 1
" • >Oil
El · """'IS
..
u
• ..lt.t#l1<1t,. ·1• ~ 'fr01t•"("~•"**»°"11tut• ) •ltl,UcUy •.-;
""""*
l!l •
"'""""'
liJ ·~-
EI ·-
m ·noo._mxuei
G:I • ""
l!l · -
9 ·-i-
9e:i """"'"'
Ill •<t>
• ..,.,.
r'il • well
...
0 Run klOe:l.nlml
_.
~lsllllrtng
.,......
Ml19 &:00:51.1&1 AM SAPPfl.o)OUf S«ver~ on port4Ml&
M/19 8:02:45 59"1 AM ~1.(1) SYS •2(112019 0508
® &
As shown in Figure 4.16, appending "$metadata" to the URL will display the field
descriptions for all attributes of the OData service.
f- • C 0 A Nol SeC\llf! N'IK .,~et'.O~l ' · ' ' ' e ;
• <..U..1Edsa . .1,..,...,.•1u.tp•//1~1.a.!c,....oft.c-'adoll•OJ/O'/.-x " V•r1lo11-•" l . O">
.. .:.c1..,.,
D•C1Je.-.lc11 -1 n• • - • "'-'P' //..,i.-1 . atcroeoft .~.-,./2001/01/d•U.H.-v le.1/-tU1t1 • at O.US.rv lc1V1r1 I_." l . 0 • >
• Cf;c:t.1... ,..,i,..,4.•11ttp1//1ct:..s.1 . aleroeott . c...,oodo/l0•1/0tlct..t1a1cvl.,.•" ..ln11.,." llttp1//..,11..,..1. alc.-ot1oft.eoa/ado/2001/0l/dat... •rvic••l. .t..i.ata •
..lr.a•'llttp1J/..,he. . .. al.c..oM>ft.C>Oll.lectollOOl/O./...,,.• 11...·~··ct.t•ull ">
• <l:nlity':'ypo _ ...,,_.d•rTypo'>
• <J;er>
<7tOf10tl)'h! . _...l'\.'X'.11.UCOIUll:IUO' I>
<.(Uy'/'
qropert,- 1 1 -· tuacu.stOarlitalO" ~.. •r..Strii.t" 111;lla'bt.,.• tal•• " JlaalAo,Ul •" IO '/'I'
qropert,- 1 1 -· •rSt"Oar . ctnTtOOY " T)'p.-' Ma. St.ti.no" lllUlA..,.U... • 10• 1.,,
qtoperty 1 1 -" llISt'Oar . ctnT'tOfl.t' T)'pe,.' Eda. O.te'f1- ' I>
qroperty · -· •nSt"Oar . ca.uic:tOOT " Tr!Ml'"' Eda. St.ti.no" Jlaa!A""'°'"' 10' /)
<:l>tope rt y I I -' Ill St'Oll!T . CllAllCll:Ofl.T' TJ'!Ml'"' it<b.. 0..te'f 1-' />
<?ll'Operty 1 1 -" tlOft.lO' T)'peo•'&doo.Stri11"• Jlla~th.. ' l• "I>
<?r"Operty 11-· '•AAnu:a ' """"'£•.ltll'i.,.' ....i..-.th•' IO '/>
<1'tope.t"ty 1 1 -' C'UllAUCT ' ~.. · e•.Stll'U.. ' ~otll ..' S '/>
<l'•otie•ty 11-·~· Ty.,...· e...c.et..1• •r.el•lo11.. • 1s· tcal••"2 '/>
<Prope:r-ty 1 1 -· 1ttNICllUll1.. T')'p.- ' e..,OeeU..l ' f't.Cl•IOllo•' IS ' kal.,.' 2 ' />
<J'ropeny 11. . . ...,~,".. T')'p.- ' U.,O.C-iN.l ' Pt.ei•IO.•'IS ' s.e.1..· 1 ·1..
<:Propeny 1 1 -' LJPllCTC':LltStATUS ' f')'p9•'tdllJ.ltri.a..· -.:ia...11oti.-· 1 ·1..
<J'ropen y 1 1 -. u•lOYAUTA!VS . 'f'niol9•. t:•. 1....
Stt
<:Prope:r-ty l l -' t'OllPIMSTAT91 ' !'YPr' !dlt.Stti. .' ~th •' l '/>
..lll.Mttfl•' l ' />
<IU•OC'1•tiOA>
• <Zht i t~ont•i. .r I I -· Y2 • • • l•l>ota1,1lta.t.itrco-t•ino.ro •tn>•• >
<&ntit'(Sot 11...-· POlllN4or· &ntit.,,.,,,... · ,..t•ult.l'Ollo•O•.rTroo'I'>
<&ntit.,S.t 11...-· POtt.._. *"tityT),.·•" Oota'!lt.tolt~"/>
• <....,90eiati0118ot 11....· it. . .. A••OC''•\i.,...'4of•~ll.It...Tyoo'>
<a..d
<RMI
..,1•.
·......,..,priaoipl" l"llt,.,.'l.•" l'Oh•der"/>
llole•'l'Ol~......"'" C•ti'l.ySel•"tol....,../>
<IA•aooi•\i~l>
<111"til1'COnl•lr..r>
<l•c:~
<C/...... ~.,. . .l"'l'iC:~
.:1. . . .1:.,.,.
197
4 Development
Learn More
For information about how to work with OData services in SAP HANA XS Advanced,
see the fol lowing guides, available from the SAP Help Portal:
• "Maintain ing OData Services in XS Advanced" in the SAP HANA Developer Guide
for SAP HANA XS Advanced Model
• "Data Access with OData in SAP HANA XS" in the SAP HANA Developer Guide
• "OData V4 Model" in the SAPUl5 documentation
Tutorials
Many tutorials on the SAP Developer Center are related to the "ODat a" topic (you can
use this keyword as filter). Below is a selection, one introducing OData and the others
to learn how to implement OData with SAP HANA:
• "An Open Data Protocol (OData) primer for developers"
• "Tutorial Navigator: Create an SAPUl5 appl ication with SAP HANA XS Advanced"
• "Tutorial Navigator: Expose Entities Using OData and XSJS with SAP HANA XS
Advanced"
198
4.11 Web-Based Dat a Access
To expose the InA service for SAP HANA XS Advanced, you can use the SAP HANA
analytics adapter, which is an SAP HANA XS Advanced application that you'll need to
install and deploy in yo ur environment to be included with yo ur SAP HANA XS
Advanced application.
1 II Z01908e6091159
z II https://hxehost.\ob.cloud.sop:4390/sap/bc/ino/service/v2/GetServerlnfo 0
3
4 • {
5 .. '*Server Info.. : { ,.
6 "BuildTioe" : "2919-91-17 06: 16:43" , v
........,
A9CJ*I URt.: At tps : //llathojt. \M, CIOllO . ' ' ' ' 4)M/,,..,k/ lllt/'I,.., 1Ct/vl/'4t$ttv1tl 1110
Learn More
For information about how you can use the lnA service with SAP HANA XS Advanced,
see t he Developer Guide for SAP HANA XS Advancedfor the SAP HANA Platform from
t he SAP Help Porta I.
To download t he SAP HANA analytics adapter, visit t he SAP Development Tools web-
site on http://s-prs.co/v488427.
199
4 Development
4.11.3 XMLA
SAP HANA also includes an XMLA API to enable reporting tools to connect directly to
the SAP HANA MDX engine over HTIP{S) connections. Consider this API the v,ieb
equivalent of the ODBO client (see Section 4.10.5). Figure 4.18 shows the sample code
for a POST request to the SAP HANA XS server with /sap/hana/xmla/requestbasic
appended to the URL. In the command, you'll enter the MDX statement. As with the
InA service, XMLA is included with the SAP HANA 1.0 release but requires installation
for SAP HANA 2.0 (the EPMMDS plugin). For SAP HANA XS Advanced applications,
again as with InA, you'll need to install and deploy the service as an application
(XMLA MTA).
o• • XMLA.html •
~ XMLA.html - -/Downloads
1 Sample Code
2
3 POST htt ps : //<servername> : <PORT>/sap/hana/xmla/ requestbasic
4
5 <Envelope xmlns ="htt p: //schemas . xmlsoap. org/soap/enve lope/ ">
6 <Header>
7 <Version Sequence="l09" xmlns="http : //schemas . mic rosoft . com/ana lysisservices/2003/engine/2 " />
8 </Header>
9 <Body>
10 <Execute xm lns=" u rn: schemas-m i c rosoft- com: xml-ana lys i s " >
11 <Command>
12 <Statement>
13 SELECT {(K3) . [K3). [All) . [( al l) )} on 0, {Measures . Ml } on 1 FROM MDX_TEST_03_CV3J
14 </Statement>
15 </-=--
16 <Properties>
17 <Propertyl ist />
18 </Properties>
19 </Execute>
20 </Body>
21 </Envelope>
Technology Background
XMLA is a protocol for data access to multidimensional data sources {a lso known as
OLAP) accessible over HTIP. Like OData, the specification originates from Microsoft
200
4.12 SAP HANA, Express Edition
(2000) but has since been ma intained by t he XMLA Council. The query language is
called mu ltidimensional expressions (MDX}, which you can t hink of as SQL for the
OLAP dat abase.
Learn More
For more information about using XMLA with SAP HANA XS Advanced, see t he fol-
lowing resources, available from t he SAP Help Portal:
• "Data Access with XMLA in SAP HANA XS" in the SAP HANA Developer Guide for
SAP HANA XS Advanced Model
• "Mu ltidimensional Expressions (MDX}" in the SAP HANA Developer Guide for SAP
HANA XS Advanced Model
201
4 Development
202
4.12 SAP HANA, Express Edition
is also available, but this version does not include the SAP HANA XS Advanced run-
time environment with the different applications. AWS and Azure only provide the
full version.
-·-
SAP HANA
In-memory Platform for Business Digital Transformation
Runs on Overview
Google Compute Engine
SAP HANA, express edition is a streamlined version of the SAP HANA platform which enables developeJs to
Type jumpstart application development in the cloud or from a personal computer 10 build and deploy modem
Virtual machines applications that use up to 32GB memory - without incurring any license fees. SAP HANA. express edition
SingleVM includes the in-memory data engine with advanced anatytical data processing engi"les for business. text. spatial
and graph data · supporting multiple data models on a sing le copy of the data The software license allows for both
Last updated non·production and productk>n use cases, enabling you to quiekty prototype, demo and deploy next-generation
3125/19, 10:09 PM applications with SAP HANA. express edition.
Apart from local installations, virtual machines, and cloud deployments, another
option is to deploy SAP HANA, express edition on Docker. For those not familiar, the
Docker container technology (introduced in 2016) provides a lightweight alternative
to virtual machines. Instead of a complete operating system, a container only con-
tains the software, libraries, and configuration files needed to run a particular piece
of software. This software could be a simple "Hello World!" application but also, yo u
guessed it, the SAP HANA, express edition.
203
4 Development
204
4.12 SAP HANA, Express Edition
• Clients
For Linux (Intel and PowerPC}, Microsoft Windows, and Apple macOS, contains the
ODBC, Python, Go, ADO.NET and other client interfaces including the xs CLI
(described in Section 4.10).
• SAP HANA smart data integration
With Data Provisioning Agents for Linux and Microsoft Windows and SAP HANA
smart data access (SDA), you can connect to other data sources including data-
bases, Hadoop, files. and more (described in Chapter 7).
• • Version 2.00.036.00.20190223.1
SAP HANA, Express Edition Download Manager
Progress Detail
Qui t Download
Figure 4.20 SAP Download Manager for SAP HANA, Express Edition
SAP HANA, express edition also includes a binary version of the SAP Download Man-
ager, so once you have your environment up and running (local. virtual machine, or
cloud}, you can always and easily add additional components.
When you start the installation or connect to SAP HANA, express edition for the very
first time, you'll be prompted to provide a master password, which will be used for
operating system administration account (hxeadm), for the SYSTEM database adminis-
tration account on the SYSTEM database and the HXE tenant database, for the SAP
205
4 Development
HANA XS Advanced accounts (XSA- ADMINand XSA- DEV), and for the SHINE and SAP
HANA streaming users, when installed. To be up and running with SAP HANA,
express edition, the server only takes as little as a minute on the virt ual machine and
cloud deployment environments. To create the complete SAP HANA XS Advanced
environment, with application it takes 30 to 40 minutes. For the fine print on how to
install additional components and how to configure SAP HANA streaming analytics
or SDA. including some best practices like deactivating the SYSTEM database account
and making backups, see the Getting Started Guide included with the installation.
Learn More
SAP HANA, express edition has its own documentation site on t he SAP Help Portal,
where you can find the Getting Started Guide and Sizing Guide.
SAP Notes
As is often the case with free developer licensed products, support is provided by t he
developer community and not t he officia l support channel. With SAP HANA, express
edition, you can post your question (and answer the questions of others) on the SAP
Community fo r SAP HANA, express edition.
For more information, see SAP Note 2373S55 - SAP HANA Express Support Strategy.
Tutorials
For hands-on exercises, we recommend exploring the great collect ion of t utorials on
the SAP Developer Center: Tutorial Navigator: SAP HANA, express edition.
SHINE is a demo and training application, created to make it easier to learn how to
develop applications for the SAP HANA platform. SHINE was introduced with SAP
HANA 1.0 SPS 07 in 2013 and is based upon the SAP Netweaver enterprise procure-
ment model (EPM), a framework that should be familiar to most ABAP developers.
SHINE comes with demo data and the design-time developer objects or artifacts
required to create tables, views, and other runtime database objects, together with
206
4.13 SAP HANA Interactive Education
web, Node.js, and XSJS content to provide the application control flow logic and the
user interface. In this section, we'll cover deployment options for SHINE and describe
how to get started.
Ml'Ytl',jl JI Gt
1 /•rsltnt no•cori\ole: t•/ 0..
·- -
e .ti•nM'*-'... t-. ,,,,,
.........
2 t•eslil'lt·env node, es6 •/
.....,_ •S
@ 0 @
v•r xsjs • ~vire( "fs•P/xsjs" ); ""' 0;)
.,..
.....><ti. 6
7
..,.,,,. xseov • rrqul~( "(b1p/xHnv" );
....,. Port • pr«:ess.env.POfl;T 11 )ilM;
R•posltcwy. ~no-XN
-
f:,_ • node.Jl'IOCh,,IM II glotial ._b.ise • _dim_. • • 1·; Branch: masw
0 ·~~ ,.' . .....,
·- -
V'lit' ot>tiOl\S • { \\)-
// a"°n)WOUS : tl"Ue, // ,....,..,, to authentic1te c1lls
a..,,...
11
•• W9b
12
13.
rtdtrecturl: "/illclex.xsjs", re,
context: {
,.
u&er-db base: glob1l._~se,
"
1.-;J •
ESl.klt (~) lddlet' 1 teMrJ$(26. S) Nna-shlne.<x... S!)'IStletHt.Je Commd Commit and P14li
Figure 4.21 Deploying SHINE Using t he SAP Web IDE for SAP HANA
For the deployment target, you can use a local SAP HANA XS Advanced runtime (for
example, a runtime of the SAP HANA, express edition) or go cloud-first yourself and
use Cloud Foundry on the SAP Cloud Platform.
207
4 Development
Alternatively, you can download the application from the Software Downloads area
on the SAP ONE Support Launchpad as an MTJ.\R file and use the xs command line
tool to deploy the application. Note that the component name is SAP HANA DEMO
MODEL and not SHINE.
The previous version for SAP HANA XS comes as a delivery unit and can be deployed
using SAP HANA studio. Deploying both versions could be quite useful if you want to
study application migration from SAP HANA XS to SAP HANA XS Advanced.
The SAP HANA XS Advanced M igration Guide documents in detail how to prepare,
migrate, and deploy applications from the classic SAP HANA XS model to SAP HANA
XS Advanced. To automate most steps in the migration, you can use the SAP HANA
XS Advanced Migration Assistant (also available under Software Downloads). The
guide shows exactly how this works by taking the SHINE SAP HANA XS application as
input and delivering an SAP HANA XS Advanced application as output, thus illustrat-
ing how to run the assistant, how to read the report, what content is migrated auto-
matically, and what you'll need to do yourself.
A third option is not to install or build anything at all but rather use the SAP Cloud
Platform. When you create an SAP Cloud Platform, SAP HANA service instance (data-
base) in the Neo environment, you can specify that SHINE should be included.
208
4.13 SAP HANAInteractive Education
1=
-
I I •
=
Data Generator Pun:hase Order Wortlist Sales Dashboard Sales Worklist U-serCRUO
0
:,_ ...~
- - ---- ._.,ea..,
•
--- . ..~
~ - --- •
·- -
-. • - - I~
·-
xsunk Tests
Spatial Demo Sales Dashboard Mobile Flori Launchpad XSOataSeMces ~ ...
o~
..
-
---
Full·tex1 Searth with
SAPUIS, ODATA. and
---
Runtime Job Schecfuling ETags en<:I Null values in
xsooata
cos
• Sales Dashboard
Application with analytical views (pie and bubble charts, bar diagrams) from the
sample ITeLO company showing Sales by Region, Sales by Country, Sales Rank, and
Compare Product Category Sales Year to Year with details tab listing all sales
orders.
• User CRUD
Application demonstrating how to manage users in the system using CRUD oper-
ations (create, update, and delete) in Node.js and Java implementations on the
same database container.
• Spatial Demo
Application showing how spatial featu res and analysis can be integrated with an
SAP HANA XS application, for example, by using latitude and longitude data to cre-
ate a product sales heat map.
209
4 Development
• Fiori Launchpad
To leverage SAP HANA UI integration services.
• Full-text Search with SAPU IS, OData, and CDS
Application demonstrating how yo u can define a search model with CDS and how
to use SAPUIS to build a search interface using OData.
• Runti me Jo b Schedu ling
Application demonstrating how to use the SAP HANA XS Job Scheduling APis for
job creation, job scheduling, and job log view.
SHINE also includes additional developer content like XSUnit tests and SAP HANA XS
data services.
Learn More
SHINE documentation is included with the SAP HANA platform documentation set
on the SAP Help Porta l:
• SAP HANA Interactive Education (SHINE} for SAP HANA 2.0 SPS 04
• XS Advanced Migration Demo-SHINE-SAP HANA XS Advanced Migration Guide
For the latest updates, check the SHINE repository on GitHub (http://s-prs.co/
v488423).
The openSAP course "SHINE Reference for Native SAP HANA Application Develop-
ment " (2016) mainly covers the SAP HANA XS classic model, but you may still find the
content useful.
SAP Notes
For additional information, see the following SAP Note, component HAN-AS- XSA-
SHN: SAP Note 223909S - SAP HANA XS ADVANCED DEMO MODEL - SHINE XSA
Release & Information Not e.
4.14 Summary
In this chapter, we introduced you to the most important topics related to SAP HANA
development. We started \Vi th a short description of the developer persona and the
most common development tools (the SAP Web IDE; for older releases, SAP HANA
210
4.14 Summary
studio). Next, we dove into SQL and the code pu shdown facilitator SQLScript. We also
briefly looked at some aspects of ASAP development as it relates to SAP HANA.
An important part of SAP HANA development concerns analytical modeling, and we
covered this topic in some depth. Just as important is native application develop-
ment, which will require the extended application services of SAP HANA XS and SAP
HANA XS Advanced, which we both described and compared in this chapter. To build
and deploy SAP HANA applications, you'll use CDS and the HD!, also addressed in this
chapter. For classic SAP HANA XS, you can use native SAP HANA application lifecycle
management or rely on the technology of SAP software logistics and CTS+. SAP HANA
2.0 also includes JSON document store, a NoSQL database, and we described how this
can be used.
For cloud-based development, we covered the services offered by the SAP Cloud Plat-
form, in particu lar the SAP Clo ud Platform, SAP HANA service. Differences between
the Neo and Cloud Foundry environments were addressed, and we described how
Cloud Foundry relates to SAP HANA XS Advanced. For on-premise development, we
looked at the d ifferent available SAP client interfaces, which apart from the usual
ODBC and JDBC, also includes Go, Python, and .NET. Most SAP HANA-specific func-
tionality for the SAP HANA client, like support for system replication, is provided by
the proprietary SQLDBC client. For web-based access to the SAP HANA database over
HTTP/S, yo u can connect with OData, InA, and XMLA.
Of course, for those new to SAP HANA development, we covered a Jot of material to
digest. To help yo u get started, SAP provides a free development version, the SAP
HANA, express edition. Content-wise, this edition is complemented by the SHINE
learning application, the topic 11vhich completed this chapter.
With the administrator and the developer personas on our contact lists, let's turn the
page and meet the advanced analyst, these days more commonly known as the data
scientist.
211
Chapter 5
Advanced Analytics
The moral is: Not everything that can be counted counts.
- William Bruce Cameron
It has been said: the whole is more than the sum of its parts.
-Kurt Kaffka
For the data scientists among us, and for those that insist on the correct usage ofter-
minology, let's start this chapter with a remark abo ut the terms "analysis" and "ana-
lytics." Analysis is usually defined as a "detailed examination" whereas analytics
expresses the systemat ic analysis of data. In other words, "analytics" represents the
science behind "analysis." In daily life, in product names, and in marketing publica-
tions, however, this distinction is not always strictly observed, and you'll find the
terms used interchangeably. For example, yo u perform text analytics with SAP
HANA text analysis and perform predictive analytics with the SAP HANA Predictive
Analysis Library (PAL) or with SAP Predictive Analytics. What's in a name? It is what it
IS.
You've seen throughout this book how a key strength of the SAP HANA database is
provided by a single data copy that brings online transaction processing (OLTP) and
online analytical processing (OLAP) in-memory, thus combining transactional and
analytical processing. We also discussed that a key asset of the SAP HANA platform
is how it enables different technologies to interact directly with this single data
copy and execute tasks inside the same database. leveraging parallel processing, in-
memory storage, and other hardware technology enhancements. You'll use the
development tools included with the platform to model data and create th e multi-
dimensional information views to be consumed in business user reports- SAP
HANA modeling for business analytics in action.
213
5 Advanced Analytics
The different capabilities, features, and functionalities brought together under the
umbrella of advanced analytics broaden the scope of analysis :
• Predictive analytics
Predictive analytics enables you to analyze past and present data in order to make
predictions about the future.
• Machine learning
Machine learning enables computers to process a dataset without explicit instruc-
tions, that is, without any IF THEN ELSE programming instruction. Through the use
of machine learning algorithms, computers can perform pattern recognition in
video, pictures, music, or any other raw data.
• Spatial
Spatial capabilities add a geograph ic dimension to your analysis and analytics.
• Graph
Graph processing enables you to understand relations and connections.
• Series data
Series data is data collected at a measurable interval, often as time, and for this rea-
son, this kind of data is also called "time series data."
• Text analytics
Text analytics enables you to analyze unstru ctured data, which according to some
estimates may accou nt for up to 90% of all enterprise data: log files, office docu-
ments, Twitter feeds, email traffic, messaging, images, video, the output of Inter-
net of Things (loT) devices, and so on.
• SAP HANA streaming analytics
SAP HANA streaming analytics allows you to process massive amounts of event
data. You wouldn't typically store this data due to its volume or velocity (changes
occur to quickly), but you'll want to analyze this data to look for exceptions, as
aggregates, as they occur in "real time."
214
5.1 Roles and Tools
5.1.2 Tools
You don't need to learn new tools to use the advanced analytics functionality of the
SAP HANA platform. Whether working with External Mach ine Learning (EML) or t he
PAL, whether vvorking with spatial data types, series data, or graph models, you would
interact vvith the data using SQL (see Chapter 4, Section 4.2) since everything is pro-
cessed first inside the SAP HANA database using SQL statements.
How this interaction with your data is implemented technically d iffers. To execute
PAL application functions, for example, wrappers are used. Wrappers add a bit of SQL
code around the actual application function, which makes it possible to send it to the
215
5 Advanced Analytics
database even though the actual processing will be delegated to a different engine.
Spatial and series data have specific data types and methods you can call. You'll have
to consult the relevant developer and reference guides to find out exactly how this
works (which may be a steep learning curve), but at least you won't have to learn new
tools.
Code Clinic
For example, for specific processing data types, Listing 5.1 shows the CREATE TABLE
syntax for a series data t able. The st atement resembles t he syntax for creat ing a reg-
ular table, except for the SERIES descriptor. In this descriptor, you'll define the prop-
erties for series data: SERIES KEY, NOT EQUIDISTANT, MINVALUE, MAXVALUE, and PERIOD
FOR SERIES. See Section 5.5 for information on how this code works.
CREATE TABLE ExampleStockTrades (ticker_symbol CHAR(S) ,
trade_ti me TIMESTAMP, price DECIMAL(l0,2) , volume INTEGER)
SERIES (SERI ES KEY(ticker_symbol) NOT EQUIDISTANT MINVALUE ' 2020-01-01'
MAXVALUE ' 2021-01-01' PERIOD FOR SERIES(trade_time) );
Listing 5.1 Create Series Data Table
To execute SQL and view the result set, you'll use the SQL prompt of the database
explorer in SAP HANA. You can access this tool from the SAP HANA cockpit or inte-
grated into the SAP Web IDE for SAP HANA. Alternatively, if you prefer a local client,
you can use the SQL console in the SAP HANA studio.
The PAL works with input tables, parameter tables, and output tables. To make PAL
easier to work with, you can use the Application Function Modeler (AFM) in SAP
HANA. As shown in Figure 5.1, in the AFM, you can add PAL functions to a flowgraph
and specify the parameters and input/output (I/O) tables to generate a procedure
without having to write any SQL code. You can execute the procedure for the result of
the function and save the generated SQLScript code for a next time, which is quite
convenient. The AFM is available both in the SAP Web IDE for SAP HANA and in SAP
HANA studio.
Similarly, when interacting v,rith the graph database, you'll find the graph workspace
viewer a welcome addition, since this tool can instantly show you how the relations
(or in math theory terms, the nodes and edges) are defined (see Section 5.4). The graph
216
5.1 Roles and Tools
workspace viewer is inclu ded in the SAP Web IDE for SAP HANA bu t not available for
the SAP HANA studio. As mentioned elsewhere, the SAP HANA studio tool is no lon-
ger un der development and, for this reason, no longer includes the latest enhance-
ments and functionalities. Apart from the graph workspace viewer and the AFM, for
other advanced analytics functionality like series data, spatial or text analytics, all
you need is a SQL interface since all interactions use SQL. Thus, any SQL client will do.
--
XS.A DEV Logou
011t11 Source om T•rvet S..s.lc: om Quality
Oaia Source OaU Target
- 4' <I> 00
® """"'
Date Gonetal!Ot PrOjedion
Cleanse
0.000..
-
ca..
HlsioryP~
LOOkup
.... °""''°"
"'-
Preclietive Anatj8f9
~ ·r~ ,_
• ...... """'
10°"'
~
,.... .,_......,
0"1A RfSlilT )
PAAAMCTCRS MOoel. )
Figure 5.1 Pred ictive Ana lytics Flowgraph, SAP Web IDE f or SAP HANA
SAP HANA streaming analytics comes with its own set of tools and even its own SQL-
like Continuous Computation Language (CCL) (see Section 5.7). SAP HANA streaming
analytics is, however, also integrated into the SAP HANA platform, and for monitor-
ing and administration, for example, you can use the SAP HANA cockpit. For design
and development, you can use the SAP Web IDE, but first, you'll need to enable the
functionality, as shown in Figure 5.2. For previous releases of SAP HANA streaming
analytics, this is also available as Eclipse plugin (similar to SAP HANA studio).
217
5 Advanced Ana lytics
CodeChecl< Features
Code Compl<ttion Enable the SAP Web IDE features you want. save. and refresh the browser.
Code Editor
Data Preview
More Information
Keyboard Shortcuts
MDX Console
SAP SE
Modeler
SOL Console
Layout Editor c.:1••>
SOLScript Debugger The layoot editor allows yoo t o edit your application and to
preview tl1c contont of its XML views as they will appear in
Database Explorer the published application.
Mom lnfonnatlon
SAP SE
•+¥·•
Figure 5.2 Enabling Features in the SAP Web IDE for SAP HANA
Data analytics and reporting on transactional data can help you understand what has
happened in the past, which provides business intelligence (BI) and allows you to
make informed decisions about how to proceed, which road to take. Predictive ana-
lytics supports this type of business decision-making. By using a range of statistical
techniques, you can start to foretell the future (or predict unknowns in more general
terms). Predictions are based on solid science; you don't have to make "educated
guesses" or rely on "your gut." Instead, predictive analytics can scientifically deter-
mine which product a customer is most likely to buy next or which device may need
to be replaced.
218
5.2 Predictive Analytics and Machine Learning
Technology Background
The science behind predict ive analytics originates from t he research institutions of
la rge corporations and universities. The first models were developed for weather
forecast ing, logistics, and credit rat ings. Some well-known names in t his fiel d like
SPSS (Statistical Package for the Social Sciences) and SAS (Statistical Analysis System)
trace back their roots to academia in the 1960s and 1970s.
After a slow gestation, predictive analytics went mainstream during the Internet
boom of the 1990s, when startups like Amazon and Google built the technology to
personalize online shopping experiences and maximize sea rch result relevance.
Combined w ith big data and the hyperconnectivity of both mobile devices and the
Internet of Things {loT), predictive ana lytics continues to fuel social media likes, rat -
ings and recommendations, bots, and personal assistants like Siri and Alexa.
Arti fici al intelligence (Al) and mach ine learning are closely related to the science
behind predictive ana lytics. Currently, both may suffer from inflated expectations
from th ings like t he Gartner Hype Cycle for emerging technologies and, not surpris-
ingly, may also be under attack by critics who frame predict ive analytics as "glorified
stat istics." Most businesses appear not to agree with the sentiment, and a lot of
investment is directed to this doma in. Who knows? With Al and machine learning,
we may enter the next phase in data analytics, requiring less human intervention,
w ith new use cases and an even wider impact.
Learn More
To learn more about data science in general and SAP Predictive Analytics as product
in particular, you can sign up for t he openSAP course "Getting Started with Data Sci-
ence."
Updated versions may be made available in the future, so be sure you check the
https://open.sap.com/ website regularly. Cou rses for machine lea rn ing with SAP Leo-
nardo are available as well.
219
5 Advanced Analytics
Lea rn More
How to install t he AFL component is documented in t he SAP HANA Server Installation
and Update Guide. For business functions, see the SAP HANA Business Function
Library (BFL) reference. Both guides are available on the SAP Help Portal.
220
5.2 Predict ive Ana lytics and Machine Learning
• Classification
Classification algorithms investigate how new objects relate to the properties of
existing ones. In this group, you'll find classification algorithms like area under
curve (AUC), conditional random field, (random) decision trees, the confusion
matrix (try it out, it really helps), K·nearest neighbors (KNN) classification, naive
Bayes, support vector machines, and more.
• Regression
Regression algorithms investigate the relationship between different variables. In
the PAL, you'll find regression algorithms like bivariate geometric and bivariate
natural, cox proportional, exponential, multiple linear, and polynomial regression
algorithms plus generalized linear models.
• Association
Association algorithms identify patterns of association within the data and
include apriori, FP-growth, sequential pattern matching, and K-optimal rule dis-
covery (KORD).
• Time series
The largest group of algorithms in the PAL, time series algorithms predict based on
time stamp values. This group includes algorithms like ARIMA; exponential
smoothing (single, double, and triple, auto and Brown); seasonality/trend/white
noise tests; Croston's method; and the fast Fourier transform, to name the most
common ones.
• Preprocessing
Preprocessing algorithms prepare your business data for predictive analysis, for
example, with discretize, multidimensional scaling, missing value handling, prin-
cipal component analysis, and random distribution sampling.
• Statistics
Statistics algorithms group together common statistical methods, which don't
belong in any of the other group, for example, Anova, Chi-square goodness-of-fit
test, entropy, Grubbs' text, Kaplan-Meier survival analysis, and many more.
• Social network analysis
Social network analysis groups together algorithms that link prediction and page
rank for social network analysis.
• Recommender systems
Recommender systems groups together algorithms that investigate and predict
user preferences to generate personalized recommendations. In this group, you'll
221
5 Advanced Analytics
Which algorithm in the PAL to select is based on what is required by SAP applications
and what is most commonly used. By simply referencing the PAL functio n in your
application code, you can run complex algorithms on large datasets in-memory.
Learn More
For t he documentat ion, see the SAP HANA Predictive Analysis Library {PAL) on t he SAP
Help Portal for the SAP HANA platform.
Tutorials
For a good underst anding how to work with PAL, check out the tut orial series on t he
Developer Center "Learn to Use the SAP HANA Predictive Analytics Library (PAL)." A
search on the term "PAL" will also return many hits.
For hands-on tutorials videos, see the Predictive Analysis Library playlist on the SAP
HANA Academy YouTube channel.
5.2.3 R Integration
Although the PAL contains well over a hundred different algorithms to address the
most common business requirements (at least for SAP applications), you're bound to
come across scenarios that require algorithms not covered in the library. For these
cases, SAP HANA provides R integration. The way R integration works is similar to
how business functions (from the BFL) and application functions (from the AFL) are
executed, that is, by embedding code inside SQL, in this case, R code. This integration
enables you to include R in an SAP HANA calculation view, for example, to execute a
custom statistical function. The SQL will be processed by the database engine, with
the execution of the R code delegated to the R server.
222
5.2 Predictive Analytics and Machine Learning
Technology Background
Like predictive analytics, the R Project for Statistical Computing finds its roots in the
world of big firm research inst itutes (Bell Labs) and universit ies (Auckland) wit h a
first release in 1993. Ris open source, freely available, and qu ite popular among stat-
ist icians, data miners, and data scientists. Over 13,000 packages are available in the
(very) comprehensive Rarchive network at http://s-prs.co/v488424.
The R server is not included with SAP HANA (nor does SAP provide R support). To use
R, you'll need to install and configure Ron a separate environment. As a result, you'll
also need to transfer data to the R environment, thus losing the benefits from single
data copy, in-memory, in-database processing. For t he best performance, SAP HANA
can present the data in the format required by R (vector-oriented) and not the format
used when processed in the database (tuple-based).
Code Clinic
In t he code sample shown in Listing 5.2, from the t utorial series on t he SAP Developer
Center "Machine Learning in a Box: Set Up Your SAP HANA, express edition System
for Machine Learning," a SQLScript procedure specifies RLANGas language. The code
between BEGIN and END is R. You can then call t he procedure and query t he result set
from a regular table.
CREATE PROCEDURE LOAD_IRIS(OUT i ris "IRIS")
LANGUAGE RLANG AS
BEGIN
library(datasets)
data(iris)
i r is <- cbind(ir i s )
END·,
Listing 5.2 RLANG SQLScript Procedure
As shown in Figure 5.3, the application sends SQL with R code embedded to the SAP
HANA database. R is extracted and presented to the R operator. The R client of the cal-
culation engine issues a request to the Rserve process on the R server for an execu-
tion environment (runtime). The R client transfers code and input tables to the R
process fo r execution. The resulting data frame is returned to the calculation engine,
which converts this information into a result set. As you can see, R is well integrated
223
5 Advanced Analytics
with the SAP HANA platform, with the R client built into the calculation engine. For R
integration, the platform goes beyond only including the R ODBC driver.
Application
R Client
t
Tables data.frame
All communication \vith the R host can be encrypted with Transport Layer Security
(TLS) (see Chapter 6, Section 6.3.3). To work with R, the CREATE R SCRI PT privilege is
required.
Learn More
For the documentation, see the SAP HANA R Integration Guide on the SAP Help Portal
for the SAP HANA Platform.
Tutorials
To get hands-on, you can try out the tutorial on the SAP Developer Center "Configure
the SAP HANA R Integration with SAP HANA, express edition."
For tutorial videos, see t he R Integration for SAP HANA playlist on the SAP HANA
Academy YouTube channel.
224
5.2 Predictive Ana lytics and Machine Learning
SAP HANA
SQL Interface
1
AFL Framework
gRPC Server
TMS Client
CloudHook Client
CloudHook Server Model Persistence
I External Services I
Tables
I gRPC Server I
Figure 5.4 SAP HANA EML AFL Technical Architecture
225
5 Advanced Ana lytics
With CloudHook functions. external services can be integrated using SQLScript from
the SAP Data Hub, for example, or external third-party cloud providers. This integra-
tion is controlled by the CloudHook server, which can also connect to TensorFlow
SavedModels using gRPC.
The code snippet shown in Figure 5.5 illustrates how the implementation is similar to
PAL, with two input tables for data and parameters and one output table for results.
Cl saphanaacademy I EML
Fetetiin g contributors...
•• <l•;w\ up
OllOP T'W£ "J_ PAAN"IS";
OJIOP TYPE "J_W!TA";
I
4 OROP n1"f_ "1_ Rt.SUl1S" ;
OJIOP TAil( "SIGNATI.ltl";
·· <l'tate t•bles
(RU.1( l ...l ( "'AMltS• t..llt( "T_,MNtS";
(,l(AT( T...l ( " At$1A.T$ " LJ~( "t_R($Ul1$";
• • par• s
IJISl•1 INlO "PARAl'S" VALUES (·"°6et' . · ~1st•); •• .wld•tory: .odtl ,._ (09ttonal: slpiatu,.. f l - )
••INSERT 11(1'0 "f'ARNtS" VALUES ('Ort.telllne' •• , .... , ; •• optional: . . . •lllls.ec:Ol"lds to . . tt
Figure 5.5 EML Code Sn ippets for t he SAP HANA Academy Tutorial
226
5.2 Predictive Analytics and Machine Learning
You 'll first need to create the procedure wrapper with a call to SYS.AFLLANG_WRAPPER_
PROCEDURE_CREATE, after which you can call the external procedure just as you would
call a regular procedure or function.
Learn More
Getting started, deploying models, and Cloud Hook are documented in the SAP HANA
External Machine Learning Library {EML} gu ide for t he SAP HANA platform on t he SAP
Help Portal.
For more information about TensorFlow, see http://s-prs.co/v488425.
Tutorials
If you want to try out EML for yourself, check out t he t utorial series on the SAP Deve-
loper Center: "Discover SAP HANA External Machine Learning Library (aka Google
TensorFlow integration)."
For hands-on tutorials videos see the SAP HANA External Machine Learning Library
playlist on the SAP HANA Academy YouTube channel.
The APL is another AFL used to execute external procedures inside the SAP HANA
database. The APL contains similar models as found in the PAL (see Section 5.2.2) like
classification, regression, segmentation, and ti me series. The difference is that the
APL performs database processing for another product, SAP Predictive Analytics, as
shov,rn in Figure 5.6. v\lhereas PAL, R, and EML all focus on the data scientist, the APL
performs calculations for business users using SAP Predictive Analytics. The technol-
ogy integrates with other SAP business applications like SAP S/4HANA.
Technology Background
SAP Predictive Analytics integrates KXEN lnfinitelnsight technology. Short for
"Knowledge extraction ENgines", KXEN was founded in Paris in 1998, later headquar-
tered in t he US, and branded itself t he "Data Mining Automation Company." SAP
acquired KXEN in 2013. lnfinitel nsight t echnology automates variable selection, data
preparation, model fitting, model testing, and model deployment, greatly reducing
the t ime required for data modeling and t hus ena bling business users to engage in
data mining.
227
5 Advanced Analytics
Jlata Manager
Recommendation
Expert Analytics
Create a Classlflcatlon!Regresslon Model
Ioolkit
Create a Clustering Model
Create a Time Serles Analysis
Create Association Rules
Load a Model
Learn More
For documentation related specifically to integration with SAP HANA, see the SAP
HANA Automated Predictive Library Reference guide for the SAP HANA platform on
the SAP Help Portal. For the product itself, see the SAP Predictive Analytics topic on
the SAP Help Portal or visit the SAP Predictive Analytics area on SAP Community for
the roadmap, solution briefs, e-books, and much more.
SAP HANA spatial services enables you to process, model, and analyze geographic
data. The platform includes a separate engine for spatial data processing and sup-
ports spatial columns (data types), spatial access methods, and spatial reference sys-
tems, effectively adding a complete geographic information system (GIS) to the
platform while providing a common database for both business and spatial data.
Spatial (also often called geospatial) data describes the position, shape, and orien-
tation of objects. You can store this information in the SAP HANA database as
228
5.3 Spatial Data Processing
geographic locations, routing information. or as shape data and use it, for exam-
ple, to calculate distances or to determine where points intersect. To interact with
spatial data, you'll use SQL with special spatial data types and an extensive list of
spatial methods. For those fami liar with SQL but new to spatial technologies, the
learning curve might be a little steep.
Code Clinic
As shown in Listing 5.3, from t he SAP HANA Spatial Reference on t he SAP Help Portal,
you ca n create a spatial shape's table and insert points, line st rings, shapes, polygons,
and multi-points.
CREATE COLUMN TABLE Spat ialShapes (ShapeID int eger, shape ST_GEOMETRY) ;
INSERT INTO Spatial Shapes VALUES(l, NEW ST_Point( ' Point (2 . S 3.0) ' )) ;
INSERT INTO SpatialShapes VALUES(6 , NEW ST_
LineString( ' LineString(3 .0 3.0, 5.0 4.0, 6.0 3.0) ' ) );
INSERT INTO SpatialShapes VALUES(l l , NE~J ST
Polygon('Pol ygon ((6 .0 7.0, 10.0 3.0, 10.0 10.0, 6.0 7.0))' ) ) ;
INSERT INTO Spati al Shapes VALUES(l6, NE~J ST_
MultiPoi nt ( 'Mul t i Point( (0 1) , (2 2) , (5 3) , (7 2) , (9 3) , (8 4), (6 6) ,
(6 9) , (4 9), (1 5) ) ' )) ;
Listing 5.3 SAP HANA Spatial Data Types
The different spatial data types are shown in Figure 5.7. All spatial data types (ST) are
of type ST_Geometry. which are either points, line strings, circular strings, or polygons,
or a collection of points, strings, or polygons. To manipulate spatial data, methods
and constructors are used. similar to programming but not to SQL.
IST_Point
ST_LineString
ST MultiPoint
229
5 Advanced Analytics
The spatial data types have well over a hundred associated methods, which enable
you to perform the follo\ving calculations:
• Calculate object measurements (distances, surfaces. volumes)
• Determine object relationships (intersects. contains)
• Determine object attributes (number of points)
• Construct geospatial data from text information (addresses)
• Create completely new geospatial objects
To visualize the content, you can use the map content and map client provided by
HERE (a company t hat also provides mapping services to Bing. Facebook. and Yahoo
Maps). Figure 5.8 shows the 30 polygons and 5,638 coordinates required to display the
Canadian province of Quebec.
.t
•
·'"
I
•
0Mol~\ff
...,
---- 1Chicaigo
™~"""
~
' ·y.
·.it lrrldl"'!.tpolis
""'
.,.Cot11f}'lbl.IS
"
,.,.,. •HrWYOtk
'l>h1i <Mtetphia
. crndnn.t.1
Stt~ ·""""""'91nr1
, MIO l M ,
230
5.3 Spatial Data Processing
HERE and other mapping companies like TomTom also provide geocoding services.
You can use these services to convert address information into geographic locations.
Thus, you can use this type of business data for analysis. SAP HANA smart data qual-
ity (SDQ) also provides geocoding information for use with SAP HANA spatial ser-
vices. Geocoding uses the index type GEOCODE, which is similar to the FULL TEXT index
used in text analytics (see Section 5.6).
For spatial clustering, you can use several algorithms, some of which we already
encountered with predictive analytics in Section 5.2, such as the following:
• Grid
Provides an easy but way to group data points, •vhich may be useful to create first
impressions.
• Hexagon
Creates a honeycomb-like shape around data points.
• K-means
With this clustering algorithm, you can map more complex data point collections.
• DBSCAN
Like K-means clustering but more suited for non-spherical clusters.
Spatial clustering enables you to analyze store profitability or device failure due to
geographic circumstances (too hot, too cold, or too humid). Figure 5.9. shows some
sample SQL to perform spatial clustering using the grid, K-means, and DBSCAN algo-
rithms on a set of geospatial points.
Learn More
To learn more about spat ial, you can sign up for t he openSAPcourse "Spatial Analysis
with SAP HANA Platform." For t he documentation, see the SAP HANA Spatial Refer-
ence for the SAP HANA platform on the SAP Help Portal.
Tutoria ls
To t ry out spatial for yourself on the free SAP HANA, express edition, check out this
tutorial on t he SAP Developer Center: "Int roduction to SAP HANA Spat ial Dat a
Types."
For more hands-on t utorials, see the videos in the SAP HANA Spatial playlist on the
SAP HANAAcademy YouTube channel.
231
5 Advanced Analytics
O· .
D HOB - exetclses_fln.al.sql ~
6
'le q) HOB (HSGS_USER) [Production System] 34.76.102.6500
lilkSQl.I
, .............................................****••••••****'
- GRID clustering
~ The basic syntax for a 18xl8 grid:
SELECT S T_CLUSTERID() AS "CI D" ,
ST_CLUSTERENVELOPE( ) . ST_Trans form( 4326) . ST_asGeoJSON() AS "Envelope" ,
ST_CLUSTERENVELOPE( ) . ST_CEHTROIO(). ST_Transfora(4326) . ST_asGeoJS<J< () AS "C•ntroid" .
COUNT (*) AS "Number of Awardees in this cluster..
FROlt "HSGS" . "AWAROEE" AS A
GROUP CLUSTER BY A. "LOC_l857" USING GRIO X CELLS 19 Y CELLS 10
ORDER av "CID" A.SC;
- Note that the cluster 10 (Cit);&) contains awardees which could not be located
- The same CiAID clustering, now with additional aggregations (e.g. St.11(AH0l.llT)), using the AWAfW and the AWAROEf table
SELECT S T_CLUSTERI O() AS "CI D" ,
ST_CLUSTERENVELOPE(). ST_Transfora(4326). ST_asGeoJSON () AS "Envelope" ,
ST_CLUSTERENVELOPE () . ST_ CENTROID( ) . ST_Trans form(4326) . ST_asGeoJSON( ) AS "C•ntroid" ,
- aggregations
COUNT( DlSTlNCT A. "IO" ) AS "Number of Awardccs" ,
COUNT( DISTINCT P. "IO" ) AS "Number o f Awards" ,
SUM( "AltOl.NT" ) AS "SLll_AMOt.NT" ,
TO_OECIMAL( AVG( "AltOlNT" ).8,2) AS "AVG_AllOlNT"
FROM "HSGS" . "AWARD'' AS P, "HSGS" . '"AWAROEE" AS A
WHERE A. "IO" = P. "AWAROEE_IO"
GROUP CLUSTER BY A. "LOC_l857" USING GRIO X CELLS 19 Y CELLS 10
ORDER BY "CID" ASC;
Figure 5.9 Combining Grid, K-Means, and DBSCAN Clustering wit h Spatial
232
5.4 Graph Data Processing
Code Cl inic
As shown in Listing 5.4, from t he tutorial "Get Started with SAP HANA Graph" on t he
SAP Developer Cent er, you'll see t he language defined as GRAPH; the GRAPH, VERTEX,
and MUL TISET objects; and t he Neighbors, minDepth, and maxDepth fu nctions used.
CREATE OR REPLACE PROCEDURE "NHOOD"(
IN startV INTEGER,
IN minDepth INTEGER,
IN maxDepth INTEGER ,
OUT res "TT_NODES")
LANGUAGE GRAPH READS SOL DATA AS
BEGIN
GRAPH g = Graph("SKIING");
VERTEX v_s = Vertex(:g, :startV) ;
MULTISET<VERTEX> ms_n = Neighbors( :g, :v_s , :minDepth, :maxDepth);
res = SELECT :v. "node_id ", :v. "name" FOREACH v IN :ms_n;
END ·
'
Listing 5.4 Using Graph in SQLScript
GraphScript allows you to define complex graph algorithms. Some of the available
built-in graph functions include the following:
• VERTEX: Constructs a vertex from a graph. A vertex is a place where points meet
(also called nodes or just plain points).
233
5 Advanced Analytics
• EDGE : Constructs an edge from a graph. Edges connect vertices (also called links or
lines).
• SHORTEST_PATH: Calculates a shortest path from start to target vertex.
• NEIGHBORS: Returns all reachable vertices from a start vertex (or set of vertices) in a
given distance range.
• GRAPH: Constructs a graph from a graph workspace.
Besides GraphScript, SAP HANA graph also supports a subset of the industry standard
openCypher graph query language for pattern matching, which enables you to define
more complex conditions to find the right edge in a forest of vertices.
To visualize graph models, the database explorer in SAP HANA includes the graph
workspace viewer, shown in Figure 5.10. This example screen from an SAP HANA
Academy tutorial shows how airports and flights are related.
• rJHXt....,_<~>
.. n r.....ioe~
~.; »a v. <> ©
i\ Pubie~
-, 120 ~ si-tt ... .,,,
~ .,.._-
120
..........
·-
,,.,.._
CI R...-~-·
c--
:;i -
r-..
i'!!
g ,.,..
::;._.
11!!-
COG
~
$FO
-- +
- f9
Figure 5.10 Graph Workspace Viewer in the SAP Web IDE for SAP HANA
234
5.5 Series Data Processing
Learn More
To learn more about graph, you can sign up fo r the openSAP course "Analyzing Con-
nected Data with SAP HANA Graph." For the documentation, see t he SAP HANA
Graph Reference for the SAP HANA platform on the SAP Help Portal.
Tutorials
To t ry out spatial for yourself, take a look at the tutorial "Get Started with SAP HANA
Graph" on the SAP Developer Center. For hands-on video tutoria ls, see the SAP HANA
Graph playlist on the SAP HANA Academy YouTube channel.
Series data is stored with high compression, saving lots of memory. As shown in Lis-
ting 5.1, a series table is just like a regular table but with additional properties defined.
Using special scalar functions like SERIES_PERIOD_TO_ ELEMENT and SERIES_ELEMENT_TO_
PERIODmakes analyzing the data easier. With the SERIES_GENERATE function, you can
generate a dataset for testing.
235
5 Advanced Analytics
Code Clinic
The following code sample, from the SAP HANA Series Data Developer Guide on the
SAP Help Portal, shows the SERIES_PERIOD_TO_ELEMENT function in action. The code
queries the database for the day in a date range. The result will be July the 14th.
SELECT SERI ES_PERIOD_TO_ELEMENT( '2019-07-14 12 :00 :00 ', ' INTERVAL 1 DAY ',
' 2019-01-01', ' 2019- 12 -31' , ROUND_HALF_DOWN) FROM DUMMY;
® '
99 • wtTM Mt AS (
let SCLlO SfNSCllll,
181 SCRltS_~(Tli.£11 , 'tlfltl!VAL 1 HOl.M' , ltl()l.N)_oewt) A$ T!M(lt_MOUfl,
..
182 R.EADING
1eJ •liO!t SClll(SJM.TA.MOIIKt'_RfM>INGS
, )
1es SlLlCT
1N . . . S{NSO.,
187 Mt. TIN'lt_ HCUR,
181 A'IG(l'ftll ...tAOJJIG) AS llU.OlMi.,AYG.,.ttOI.*,
189 IWC(IU. Tt..r>fbTIA'tE) AS 104PtU.ME
119 f - Mt, SlltlES_OATA . MO«l NE_TfMPflUTI.«E l'(f
111 llt4Cl( .wt. SlNSOA • l'llll:tl. SOISCa
112
,..
tl l
MG ~ . TDll.~i'OJR • llT.T1"lll
~ 1Y Mt . SENSOll., MM . TlMER_HOUll:; I I
us
236
5.6 Text Analytics and Sea rch
Learn More
For the docu ment ation, see the SAP HANA Series Data Developer Guide for the SAP
HANA platform on the SAP Help Portal.
Tutoria ls
For hands-on tutoria ls, see the videos in the SAP HANA Series playlist on the SAP
HANA Academy YouTube channel.
Google the question "How much data is unstructured?" and the answer you'll get is
80%, 90%, or more. Unstructured data can be anything, from sensor data and surveil-
lance videos to Facebook posts. Businesses collect massive amounts of it: operational
systems, support systems, call centers logging, patents, Excel sheets, emails, Twitter,
PDFs, PowerPoints, more Excel sheets, and so on. A substantial amount of this
unstructured data is textual data.
Typically, only structured data is stored in databases, so only structured data makes
its way into our reports, analysis, and business decision-making, and 80% to 90% is
not. What if you could also use unst ructured data for this purpose? The potential use
cases are many: customer brand experience, marketing campaign effectiveness,
operational insights in equipment failure, or drug therapy side effects.
Search, text analysis, and text mining are all interrelated technologies that we'll
describe in this section. The technology itself is not ne'"· far from it, and does not
depend on in-memory processing. For example, you'll find text data processing in
SAP Data Services. However, also integrated into the SAP HANA platform, you can use
text analytics to unlock unstructured data for search, categorization, and analysis.
Stored inside the SAP HANA database, you can join unstructured to structured data
for use in predictive analytics, machine learning, or any of the other platform tech-
nologies.
237
5 Advanced Analytics
Technology Background
The origins of t ext analytics and SAP HANA text analysis go back to the fi nite-state
technology used to model natura l languages, called natural language processing
(NLP), which was developed at Xerox's Palo Alto Research Center (PARC), w hich also
brought us t he computer mouse, ethernet, laser printers, the GUI, and what-you -see-
is-what-you-get (WYSIWYG). In 1997, lnXight was founded to commercialize the
finite -state NLP technology, with success, as the company was acquired by Business
Objects in 2007 to strengthen its portfolio of business intelligence applications. After
another acquisition round in 2008, th is time by SAP, the technology fou nd its way
into the SAP HANA platform and other SAP products.
5.6.1 Search
Any database allows you to perform a standard string search with the LI KE operator
with %and _ as wildcards. If you know what you're looking for and provide exactly the
right keyword and make no typos, the right results might be returned, but this string
search is a far cry from your average Google search where you can enter roughly what
you're looking for and expect a fast and accurate response.
SAP HANA search works more like an Internet search, although some preprocessing
will be required. You need to create a full-text index on a table column using SQL (see
Chapter 2, Section 2.2) or CDS annotations (see Chapter 4, Section 4.5), which have
similar syntax.
The creation of this index is delegated to the preprocessor process that converts any
binary document format (like PDF) into text ; optionally identifies the language (the
latest SPS 04 added support for 66 additional languages, bringing the total number of
recognized languages to 99); and then performs tokenization and stemming. Exactly
what happens in this phase will depend on the language, but tokenization decom-
poses a word sequence into isolated tokens (magnifying+glasses), which can then be
normalized to t he linguistic base form (magnify+glass). Stemming reduces inflected
words to the stem, base, or root form (consultant. consultants, consulting, and con-
sultancy all have the stem consult). The resulting full-text index is attached to the
source table column as a hidden (shadow) column.
238
5.6 Text Analytics and Sea rch
Code Clinic
To create the full-text index, you'll use t he CREATE FULL TEXT INDEX statement, which
in its basic form is easy enough, to enable language detection; MIME type detection
(PNG, JPG, MP3, PDF, etc.); text min ing and text analytics feat ures; synchronization
configuration on the source data; and much more, as shown in Listing S.S.
CREATE FULLTEXT INDEX Myindex ON MyTable(MyColumn)
MIME TYPE COLUMN ' appl ication/pdf'
LANGUAGE DETECTION ('EN ' , 'DE ' , ' JA' )
FUZZY SEARCH INDEX ON
TEXT ANALYSIS ON
CONFIGURATION 'EXTRACTION- CORE -VOICEOFCUSTOMER'
TEXT MINING ON
SYNCH;
Listing 5.5 Full-Text Index Example
To search for data, you must model the data first using calculation views (as
described in Chapter 4, Section 4.3) using the built-in procedure sys . esh _config() or
using CDS annotations. To access the data, you'll use the same procedure again, SQL,
or OData in case you want to implement search in a web application using SAPUIS, for
example. For full-text search with SQL, you would use the CONTAINS predicate.
You can specify the follov.ring search types:
• EXACT: Result set returns exact matches only.
• LINGUISTIC: Returns all words with the same stem (consult, consult-ing, consult-
ant, consult-ation) using a stem dictionary.
• FUZZY: Fuzzy search allows for fault-tolerant search, Vl•hich means that a result is
returned even if the search term is incomplete and/or contains spelling or other
type of errors.
These search types can then be combined with the different functions for additional
information about the result or for how the result set should be returned :
• SNIPPETS: Returns an excerpt of the content with the search terms marked.
• HIGHLIGHTED: Returns the content with the search terms marked.
• SCORE : Returns the score, a numeric value between 0 and 1for queries with the CON-
TAINS predicate.
239
5 Advanced Analytics
Code Clinic
Listing 5.6 shows a sample stat ement showing the SCORE function used toget her
wit h t he FUZZY search type.
SELECT SCORE() AS score, *
FROM documents
WHERE CONTAINS(doc_content, ' Driethanolamyn ', FUZZY(0 .8))
ORDER BY score DESC;
Listing 5.6 Fuzzy Search Type Example with Score Function
Learn More
For the documentation, see SAP HANA Search Developer Guide for the SAP HANA
platform on the SAP Help Portal. For a more detailed introduction to t he topic, you
can sign up for the openSAP course "Full-Text Search with SAP HANA Platform."
240
5.6 Text Analytics and Sea rch
Code Clinic
Let's consider an example of classifying predefined entity types. Greta Carbo= PER-
SON, Sweden = COU NTRY, and entities can be related (that is, match sentiments with
topics), for example, in t he text " I love Greta Ga rbo":
[Sentiment ] I [StrongPositi veSenti ment] l ove [/StrongPositi veSenti ment ]
[Topic] Greta Garbo [/Topic] . [/Senti ment ] .
This code enables you to full index a text , not just on keywords but on every word, for
example, in t he text "Gret a Garbo bought two houses in New York in 1952":
<PERSON> Greta Garbo </PERSON> bought <QUANTITY>2</QUANTITY> houses in
<PLACE>Ne1~ York</PLACE> in <DATE> 1952</DATE>.
NLP technology applies linguistic and statistical techniques to correctly classify enti-
ties, so that Bill signs the bill returns a person and an object, not a single keyword.
Entity extraction identifies who (e.g. people, job titles, national identification num-
bers); what (companies, organizations, products); when (dates. days, holidays, time
periods); where; how much (currencies, unit of measures); and generic concepts
(machine learning). Fact extraction identifies the relationships between entities (or
the state of an entity) and is used in different core extraction enhancements for
enterprise data, security-related data, and voice-of-customer sentiment analysis.
Learn More
To learn more about text analytics with hands-on exercises, sign up for the openSAP
course "Text Analytics with SAP HANA Platform." For the documentation, see t he SAP
HANA Text Analysis Developer Guide for the SAP HANA platform on the SAP Help Por-
tal.
241
5 Advanced Analytics
Tutorials
To try out text analytics for yourself, check out t he t utorial on the SAP Developer Cen-
t er: " Perform Text Analysis with SAP HANA Express Edition."
Learn More
For the documentation, see SAP HANA Text Mining Developer Guide for the SAP
HANA platform on the SAP Help Portal.
242
5.7 SAP HANA Streaming Ana lytics
Technology Background
Complex event processing (CEP) technology emerged in the 1990s and quickly
become usefu I for operat ional intelligence and business process management
(BPM}. Financial services became early adopters of the event-d riven architecture
(EDA) for use in algorithmic trading. Software vendors who pioneered t he technology
were eventually acquired by larger vendors, like TIBCO, Oracle, IBM, and Sybase/SAP.
Through these acquisitions, the Aleri CEP engine, t he SQL-like CCL from Coral8, and
the Stream Processing Language Shell (SPLASH) all made their way into SAP HANA
streaming ana lytics. The explosion of loT devices and big dat a provided new use
cases under t he more generic banner of stream processing.
Today, SAP offers CEP technologies integrated in the SAP HANA platform as SAP
HANA st reaming ana lytics, as a service in SAP Streaming Analytics, and t hrough t he
standalone SAP Event Stream Processor.
243
5 Advanced Analytics
l t
Streaming Engine
Code Clinic
To interact with event streams, you can use the CCL, which is like SQL but with its
own statements, clauses, and funct ions, extended in CCLScript, as shown in Listing
5.7.
CREATE INPUT WINDOW InputWindowl SCHEMA (ID INTEGER , Value INTEGER )
PRIMARY KEY ( ID ) KEEP ALL;
CREATE FLEX FlexOut IN InputWindowl OUT OUTPUT WINDOW OutWin SCHEMA (ID
INTEGER , NewVal INTEGER , OldVal INTEGER ) PRIMARY KEY (ID) KEEP ALL
BEGIN
DECLARE
typeof(OutWin) outrec;
END ,·
ON InputWindowl {
if (not isnull(InputWindowl_old)) {
outrec := [ ID = InputWindowl.ID; I
NewVal = InputWindowl .Value;
OldVal = InputWindowl old .Value;
l;
out put setOpcode(outrec ,upsert) ;
244
5.7 SAP HANA Stream ing Ana lytics
}
};
END;
Listing 5.7 CCLScript Example
You can use the SAP Web IDE for SAP HANA or the SAP HANA streaming analytics stu-
dio {shown in Figure 5.13) to design the event stream processes visually in a streaming
project (including filtering, normalizing, combining streams). Apply CCL functions,
either built-in or user-defined, to transform your raw data and store the results in
SAP HANA for analysis, for example, as inputs for machine learning algorithms. For
larger data volumes, you can use Hadoop files or other databases.
. , a.tl. .,..,ttoc~796
~~39040
... e ~..o.
a....,, m ............ . .
• lob<•ntt
~.,....... - =
r::J Priccfecd
':::..;•;_,..,....ol
ill Schema (lnrint)
8 0ttier
Adapter1
I "'"
• Slt••mt ....t W.......
b-i ~Sl:JNm
C: OetMd Strum
..._
& kh_
,.,_
: i- -
({i lnoi St•um
""""""
:\!. .........
fo,c..,....
vr.11..
Ed VWAP • L; lnd1<Aduafbsitlons •
¥' m..,, - -
e 1Pw..i ~
·-- -"'-
Figure 5.13 SAP HANA Streaming Ana lytics Studio
SAP HANA streaming analytics also integrates with the SAP HANA cockpit for real-
time project monitoring, for starting and stopping streams, and for configuring
alerts. You can connect to streaming projects with web service clients; develop cus-
tom applications that publish or subscribe to data streams using C, Java, or .NET
245
5 Advanced Analytics
SDKs; and develop custom adapters to connect SAP HANA streaming analytics to any
external data source.
Learn More
A great place to start is the SAP HANA streaming analytics topic area on the SAP
Developer Center with technical information, a broad range of tutorials, links to
biogs, and Q&As on the SAP Community, plus some additiona l resources like white
papers and how-to guides. For the documentation, see SAP HANA Streaming Analyt-
ics on the SAP Help Porta I.
Tutorials
For t he tutoria l videos, see the SAP HANA Streaming Analytics playlist on t he SAP
HANA Academy YouTube channel.
5.8 Summary
In this chapter, we covered the advanced analytics technologies integrated into the
SAP HANA platform. We described the AFL wrapper mechanism to execute external
procedures and described the PAL, R integration, and the EML library to access Ten-
sorFlow, all through the use ofSQL. The same holds true for SAP HANA spatial, graph,
and (time) series data. You can use the same tools and the same interfaces, which
enables you to perform different types of advanced analytics together on a single
platform. For unstructured data, you can leverage SAP HANA text analytics and data
mining, for example, to perform sentiment analysis. Finally, we looked at how you
can gain insights from event streams using SAP HANA streaming analytics.
In the next chapter, we'll turn to the security architect persona, who will work closely
with all the personas we've already covered (the administrator, developer, and data
scientist personas) as well as the personas we'll cover in later chapters (the data inte-
grator, data, and data center architect personas).
246
Chapter 6
Security
Reports that say that something hasn't happened are always interest-
ing to me, because as we know, there are known knowns; there are
things we know we know. We also know there are known unknowns;
that is to say we know there are some things we do not know. But
there are also unknown unknowns - the ones we don't know we don't
know.
- Donald H. Rumsfeld
Security concerns us all. A common understanding of the most important SAP HANA
security concepts can greatly contribute to a secure computing environment. For
this reason, the information in this chapter is relevant not only for the security archi-
tect but also to anyone involved with SAP HANA.
In theory, the objective of security is simple. All data is stored safely and is always
accessible when needed, but only to users that have been authorized. However, often,
the difference between theory and practice is bigger in practice than in theory. In
practice, computer or information security is complex, with an ever-increasing num-
ber of potential threats and countermeasures.
Stored safely? Data breaches are common news headlines. Victims include govern-
ment, retail, but also finance, and, in particular, high-tech. In fact, the Internet giants
themselves have been among the worst hit. Yahoo! is number one with 3 billion
records hacked. Adobe, Facebook, Linkedln, and more- all have been affected.
Always accessible? That's part of the problem. Today, more people own cell phones
than toothbrushes. The modern citizen is always online and expects the same from
enterprises and the government. To comply with this demand, companies and gov-
ernment alike have embraced cloud computing. Who can afford not to?
Let's start with cyberattacks and consider another common news headline: "Bank
XYZ suffers DoS attack." Today, denial of service (DoS) attacks are even offered "as-a-
service" (just search for "RUDY," which stand for "R-U-Dead-Yet").
247
6 Security
What has made these vulnerabilities worse is that the main assets underpinning the
most valued companies today is no longer physical: it is data. With big data and the
Internet of Things (IoT), access points and attack surfaces have only grown. To protect
the interests of its citizens, governments increasingly scrutinize how data privacy
and security are handled by businesses, which has resulted in a growing number of
rules, regulations, and serious fines for noncompliance. As a result, not only does
your company need to protect its data, but you'll also need to prove that your com-
pany is protecting its data properly with an audit trail that holds up in court.
In this context, an entrepreneur may be tempted to unplug and hide his or her assets
in Fort Knox. While this approach worked well in t he past with gold, in the digital era,
however, data needs to move. Data is the new oil, according to some- it needs to
flow, which poses a challenge. The enterprise platform needs to secure but not
restrict.
In this chapter, we'll describe how security is handled by the SAP HANA platform.
We'll start with the security architect persona and then proceed through key security
topics: user management, data privacy, data protection, and auditing. We'll then con-
tinue this chapter with SAP HANA extended application services (SAP HANA XS) to
manage security services, concluding with some general recommendations.
What are the responsibilities of the SAP HANA security architect persona, and what
tools does he or she have to do the job? In this section, we'll briefly describe the job
role of the security architect.
248
6.1 Roles and Tools
The security architect needs to make sure that all access points are known and under
control, ensuring that the operating systems running SAP HANA and all hardware
involved are hardened. Of course, part of the job is also to stay up to date with the lat-
est best practices and security standards, anticipate threats, identify possible weak-
nesses, and react appropriately to discovered security vulnerabilities for any of the
components involved. The security architect can advise developers, administrators,
data provisioners, data scientists, and other stakeholders involved with the SAP
HANA project on all security topics and promote overall security awareness.
The function of the SAP HANA security architect is typically part of a wider security
responsibility, although we've started to see job profiles on the market for full-time
SAP HANA security consultants and developers. Typically, knowledge of SAP security
in general and SAP applications like governance, risk, and compliance (GRC) might be
required when a function leans to the compliance side. On the operational side,
familiarity with cloud architecture and expertise in securing data centers could be
part of the profile.
6.1.2 Tools
No dedicated SAP HANA tools are provided for security, but the relevant functional-
ity has been included in the available administration and development tools.
For operations, the SAP HANA cockpit includes functionality for the following secu-
rity topics, as shown in Figure 6.1:
• Auditing
• Data Encryption
• User & Role Management
• Authentication
• Certificate Management
• Single Sign-on
• Anonymization Report
Most of the screenshots found in this chapter are taken from the SAP HANA cockpit.
For development of SAP HANA XS Advanced applications, as described in Chapter 4,
Section 4.4, the SAP Web IDE for SAP HANA is the tool you'll use.
249
6 Security
0 < ~
~ HAO@HAO (OBA) System Overv1e'v v c ®
Sw0d>°"""'9 Open SQl Ccm<>le (gl ~
HAO@HAO
A
Backup encry~iOn
Rootkey~on
•·a•·>
Dec 21. 2018. 9' 17 l3AM
For the earlier SAP HANA 1.0 release, you can use SAP HANA studio with its adminis-
tration, modeling, and development perspectives. The Security vievv shown in Figure
6.2 brings together some of the security functionality listed earlier (user and role
management, password policy, audit ing, identity providers [IdPs], data volume
encryption) but not all. Security groups, for example, were introduced with SAP
HANA 2.0 and are not included in the SAP HANA studio interface; instead, you'll need
to use SQL and the SQL console.
Learn More
SAP HANA security concepts are documented in the Security Guide. Activities are doc-
umented in the SAP HANA Administration Guide. In addition, you can consu lt the SAP
HANA Security Checklists and Recommendations guide. Al l SAP HANA guides are
available on the SAP Help Porta l for the SAP HANA platform.
250
6.2 User Management
Extensive as all this material may be, th is documentation is not complete. You
should also consider hardware, operating system, and network. Because SAP HANA
runs on Linux, guides like the Operating System Security Hardening Guide for SAP
HANA for SUSE Linux Enterprise Server also provide highly relevant material.
• IOSl420 • Syst• m: HAOOHAO Host mo-fcll1bl6 1.mo,wp.<OtJ> lnstanc•: 00 Connt<1.td US.r. SYSTEM Sfsttm U"»gf': Custom System · SAP HANA ~udio " x
ct . ,<lu!<k A«w, : II! ~
Jo Sylt•ms '3 .... CREATE COCKPIT RESOURCE USER.1ql II HAOt t+lAO '1 Security HAOOHAO =(
ll!l • ii! II · "' '9 e ~ Security HAO@HAO (SYSTEM) mo·kl31bl6•'""'"P·'°'P oo o ..,.. E'. ~
"
v lfllMAOOHAO (SYSTEM) Audtt11"19 Pas.sward Poky SAML kHntrty Pro-Mtrs Dat• \loeutnt Etl(ryj)Cion
® s..c!iup P•stWOtd Poli<y
> • c.•o&og
P•s.swotd length .net Composition
> • eonttnt
> ·Pr~ioning Mlnlmum P•sJWOtd let"ogttl 8
.., • s.curity RtquQd Ch.-Kttf TYJ>ff! 0 t.ov.'ttt*M tfettf E2J Upptrc~ loftttt eJ Numtri<;ti d'911t 0 ~ill char.Kttf
" S.C•rily
> f) u..., Uw lode S.nlngs
> \liJ Roles @> Loct Ustr For. 0 SYSTEM Uw lock
>!Qi SVSTEM~H4C CSYSTEM)
> (Pi SVSTEMOOO-HAO CSYSTEM) M tKf'lllMOUS
O he ms selected
In Chapter 2, we described different SAP HANA use cases: as a data mart, as a database
in a three-tier architecture, and as a database and application server combined for
native SAP HANA XS applications. How SAP HANA is implemented impacts the secu·
rity model for user management. How you create your users and define their roles
also will depend on other factors. Do you wish to implement SSO, Security Assertion
Markup Language (SAML), or Kerberos? Different options for both authentication
(tell me who you are) and authorization (and I'll tell you v.rhat you can do) are present.
This section describes user management essentials for SAP HANA.
251
6 Security
SAP HANA
252
6.2 User Management
management in such cases will be mainly a concern for the Basis administrator,
not the SAP HANA database administrator. However, some overlap may exist.
ABAP shared business authorizations enable the use of authorizations, defined at
the application level, for the database (see Section 6.2.4). As a result, a data scientist
connecting with the Python database application programming interface (AP!)
(for example, using ODBC) directly to the database will get the same view of the
data in terms of authorizations as he or she would connecting with SAP S/4HANA.
The three-tier architecture is described in detail in Chapter 2.
I SAP Client
I
I
I
I
I
I
I
I
I
'
System Tenant Database A
Database
SAP HANA
253
6 Security
Browser Browser
HTTP(S) HTTP(S)
I
I
I
I
System
Database
SAF!HANA
-. IApp B I --- Identity
Provider
SAP HANA XS
SAP HANA
Figure 6.5 SAP HANA with SAP HANA XS/SAP HANA XS Advanced
254
6.2 User Management
database users to change passwords every 3 months, for technical users, such a
prompt would be undesirable. The technical user would stubbornly enter the old
password until it gets locked out. The database administrator thus needs to manage
these users differently, and user groups are a good way to differentiate between these
types of users.
AUTHORIZATION MODE
AUTHENTICATION
* Authentication Mechanism:
0 Passvro<d
@ Local Q LDAP
*Password:
* Password Confi1'nation:
0 Kefberos
External 10:
Save Cancel
255
6 Security
You can use user groups to distinguish technical accounts from regular accounts, but
other scenarios are possible as \'Jell. With user groups, you can separate employees
from partners or temporary workers, or you can create a group for training purposes.
User groups can have their own dedicated administrators. As a result, you can pre-
vent a crucial technical account from being deleted accidentally. In addition, you can
assign different password policies to a user group, requiring complex passwords that
don't need to be changed often for technical accounts but following a more relaxed
approach on password complexity for accounts used by human users. You can create
user groups with the SAP HANA cockpit in the User Groups interface, as sho\vn in
Figure 6.7.
6.2.3 Authentication
If you've ever stood before a border security officer at an airport, you know what
authorization is. Before letting you go through, the officer must validate that you =
you. Are you the same person as stated on your passport? This validation is exactly
what the SAP HANA database does with each access request. For this task, SAP HANA
can use its own authentication mechanism or delegate the task to an external
authentication provider. The built-in mechanism performs basic authentication
based on user name and password.
The User Management screen in the SAP HANA cockpit (as shown earlier in Figure
6.6) provides access to the available authentication mechanisms, which we'll walk
through in the following sections.
Basic Authentication
Every operating system, database, or application server needs some type of built-in
authentication mechanism, and SAP HANA is no exception. The SAP HANA database
256
6.2 User Management
authentication component only understands SQL, so typically the client tool will
present you with a logon screen where you can enter a user name and password.
Regardless of how the client requests credentials, the authentication component will
receive this information as SQL and will check if the name is in the internal SYS. USERS
table and ifthe password matches the stored value. Passwords are stored encrypted,
b ut you can use SQL or your favorite tool to query the users table, as shown in Figure
6.8. Together \<Vith user names, the table also stores additional metadata, like a valid-
ity period and whether the account is active or not. For example, when new hires
arrive on the first day of the month, you wouldn't want to call your database admin-
istrator and find out that he or she has a day off today. Instead, the database admin-
istrator should have created the users in advance with the VALID FROM attribute set.
Similarly, for temporary employees with contracts expiring, the attribute VALID_ TO
should be active. In total, the users table has 35 attributes including one for com-
ments.
~ + c USERS •
~
• B HAOCHAO (mo-fcJJ7b
• !I C.!"°£
V.twNlrM
S<"'"'" Type
~
11 CoWmn VIVM @e•s II SYS ] @w J """'o...
"°'...
..
Column.s CR!AT! Sutemern
$ ().)~Pr~,..
SOl O.lti Type
t i °"taStOt~
11!* 1• - 1
\lleweot......
usm_tw..iE NVAACHAR{256)
Noti'd
x
0 ...
""""""'
Namt of the uset
Graph WOticspaces
ID 1ndexn 2 USEfUO 81GINT x 10 of !tit user
O JS<lNC.U.-. 3 USERGROUP_NMtE NVAACKAA{256) N&nW of the ustrfOOP. 1M user bttonp 10
... l.ilnrits
Cl ProctdlM"eJ 4 USER._MOOE VAACHAR(8) x fAode of the ~: 'lOCAL'/GL.OeAl"l'EXTERNAL.'
When a user enters a bad user name/password combination to the database, the user
can try again. How often depends on the password policy defined. You can try at least
257
6 Security
once as the value of O means indefinitely. Once you pass the number of allowed failed
attempts, your account will be locked, USER_DEACTIVATED= TRUE, and you'll need to con-
tact t he database administrator to unlock your account, although maybe the app or
logon web page may have a self-service mechanism for this task.
The password policy editor, shown in Figure 6.9, contains a number of variables, as
follows:
• Password Length and Composition
Apart from rules and regulations around what to do with passwords, the password
policy also defines what a password should look like. The minimum length is
8 characters by defau lt. Required character types are lowercase, uppercase, and
digit, the same as for many other SAP systems and applications. "Welcome!'', "Ini-
tiall", "Passwordl", and "Individuall" are well-known examples. Special characters
are not enforced by default, but when enabled, any Unicode characters may be
used.
• User Lock Settings
The policy also defines how long you're punished for entering a bad password. The
user lock could only last one minute, or it may be indefinite. You can also specify
whether you want the SYSTEM user to be exempted from locking.
• Password Lifet ime
You can define the minimum and maximum lifetime of passwords. Set the life-
time of the initial password, typically provided by the database administrator or
by a logon script, and whether you need to change the password at first logon. For
real-life people, requiring a password at first logon is typically a good idea, which is
why this setting is activated by default. But if the connection comes from a techni-
cal user, you'll usually disable this setting, which is also the case for notifications
about passwords expiring.
• Miscellaneous
In this section, you can define the Number of Allowed Failed Logon Attempts,
which defaults to 6, and the number of last used passwords, for example.
A chain is only as strong as its weakest link. To protect your system and all its users
against a single user choosing an easy-to-guess password, a password blacklist can be
maintained. You can add complete passwords to the list or just partial ones, for
example "pass" will exclude any password containing those four characters sequen-
tially. In addition, you can indicate if passwords are case sensitive. Even some seem-
ingly cryptic passwords are quite common and easy to guess like "!@#$%A&*" and
258
6.2 User Management
"1q2w3e4r5t." Adding the most common passwords to the blacklist is a simple but
effective way to make your system more secure.
System: HOO
Password Policy: Default
Figure 6.9 Password Policy and Blacklist in the SAP HANA Cockpit
External Authentication
Besides built-in mechanisms, the SAP HANA database also supports external authen-
tication methods. A great advantage these external mechanisms have over basic
authentication is that they can be used to enable SSO, which allows users to log on
once and then navigate from (web) application to application without the need to log
on every time.
The following external authentication methods are available:
• Kerberos
Kerberos is typically used in environments where the client (which could be the
application server) runs on the Microsoft Windows platform. Kerberos allows you
to connect with SAP Crystal Reports or any other SAP BusinessObjects application
directly in the SAP HANA database, for example.
259
6 Security
Technology Background
Kerberos might not sound fam il iar, but Microsoft W indows surely does. Kerberos is
the default authentication protocol for the operating system since Windows 2000.
The protocol has been around quite some t ime and was designed initially for a cli-
ent/server architecture to securely connect computers over a potentia lly insecure
network. Because it does t his quite well, Kerberos is still widely used. You'll find Ker-
beros included with other operating systems, in particular, if that syst em needs to
collaborate nicely in a Microsoft Windows environment. For t his reason, Kerberos is
one of the available authentication mechanisms for SAP HANA as well.
Technology Background
SAML is an open standard to exchange authentication and authorization informa-
t ion. Open standard means that the technology is not related to any specific vendor.
In fact, SAML is pa rt of t he XML family, like HTML, both open standards as well. SAML
goes back to the early 2000s, when web technologies overtook client/server architec-
t ures. SAML works with a service provider (SP) and an ldP with you, or rat her t he
browser, in t he middle. SAML also addresses authorization, w hich makes it a bit more
complex.
Due to the way t he ldP directs t he client back to the SP (HTTP redirect and HTTP Post),
using SAML in mobile phone environments is challenging. For t his reason, from t he
labs of companies like Twitter and Google, another framework was developed,
known as OAuth. In fact, when you use your Twitter, Google, or Facebook account to
log on to the website of your favorite newspaper or web shop, OAuth is w hat you're
using. OAuth only does authentication. Not to be confusing, but the token used in
OAuth can be in SAML format, and other form ats are possible as well. Another for-
mat is the JSON (JavaScript Object Notation) format, which gives you a JSON web
token, JWT in short (pronounced "jot").
260
6.2 User Management
authentication and SSO. Assertion tickets are typically used for authentication
between systems and work similarly to Kerberos and SAML.
• X.509 client certificates
Finally, you can also authenticate SAP HANA XS application users with X.509 client
certificates (both SAP HANA XS and SAP HANA XS Advanced). Despite its cryptic
name, X.509 certificates are quite common. For example, they are used to secure
web traffic with HTIPS. The certificate contains a public key and identity in Light-
weight Directory Access Protocol (LDAP) format signed by a certificate authority.
With Kerberos for Microsoft networks, logon tickets and assertion tickets for SAP sys-
tems, SAML for multivendor enterprise environments, and JWT or X.509 for the latest
and greatest web applications, SAP HANA provides support for the most common
authentication requirements.
6.2.4 Authorization
At this point, you've managed to get into the system as an authenticated user. Next,
SAP HANA needs to check your authorizations. vVhat are you allowed to do? What
system privileges do you have? What are you allowed to see, and what can you
change? For the overall security of your SAP HANA system, getting your authoriza-
tions right is as important as proper authentication. Typically, for database authori-
zation. the built-in mechanism is used, although SAP HANA also supports LDAP as an
external authorization provider.
In this section, we'll cover uses and roles, predefined users, and the different types of
privileges.
261
6 Security
you to start and stop tenant databases, and a role for the SERVICE ADMIN system
privilege, which allows you to perform those operations on the system services.
You can then grant both roles to a new role, the system admin istrator, which
allows you to stop and start services for both the system database and the tenant
databases.
• Second, should your user requirements change, no problem. You can simply
revoke the old role(s) and grant a new one(s).
Now, you have a reusable authorization concept, which allows you to implement
complex requirements matching actual business functions . The governing thought
behind this functionality is the principle of least privilege (PoLP), a security best prac-
tice that advocates giving users only those privileges essential to doing the job. No
more, no less.
262
6.2 User Management
System Privileges
System privileges authorize users to perform system administration tasks. By
default, an SAP HANA system can involve 50 different system privileges. When you
install optional components, like SAP HANA dynamic tiering, additional system priv-
ileges will be added.
Some privileges are related but distinct. For example, BACKUP ADMI N and BACKUP OPERA-
TOR are different: An admin can perform all backup and recovery activities, including
catalog configuration, while an operator can only start backups. The same distinction
exists for the AUDIT system privilege and for I MPORT and EXPORT privileges.
Some privileges are powerful. I NFI LE ADMIN, for example, allows you to make changes
to all system settings. The SAP HANA Security Checklists and Recommendations guide
lists critical combinations that should not be granted together, for example USER
ADMIN and ROLE ADMI N, or AUDIT ADMI Nand AUDIT OPERATOR.
263
6 Security
C\ o BACKUP_ADMINISTRATOR
AFL.PM_CREATOR_ERASER Select System Pft.Aleges
ECUTE
AFL.PM_ONLINE_REGISTRA
N_EXECUTE )
AFL~SYS__AFL_ERPA_EXE
E
AFL~SYS_AFL _ERPA_EXE
E_WlTH_GRANT_OPTION
CREATE_INTERMEDIATE_
ULATION_VIEW
MODELING
Figure 6.10 Select System Privileges, Manage Roles in the SAP HANA Cockpit
Object Privileges
Database objects are schemas (the containers), tables, views, functions/procedures,
and sequences, to name the most common ones. To access or change any of these
objects, you'll need the required SQL privilege. For example, to vie'"' data, you'll need
the SELECT privilege on a table or view. To put new rows into a table, you'll need the
INSERT privilege. To change existing rows, you'll need the UPDATE privilege, and to
remove rows, the DELETE privilege. Even if you have the IMPDRT system privilege, you'll
still need the right object privilege for the import to be successful.
What we've just mentioned are examples of data manipulation language (DML) com-
mand types. Data definition language (DDL) command types are also available, like
CREATE, ALTER. DRDP, or EXECUTEon SQLScript functions. Other object privileges govern
remote sources (CREATE VIRTUAL TABLE). development (DEBUG), or security features
(UNMASKED and USERGROUPOPERATOR).
Figure 6.11 shows the Assign Privileges 1,vindow in the SAP HANA cockpit. By default, a
database user receives the CREATE ANYobject privilege on her SCHEMA from SYS, which
enables the user to create tables, views, and so on. This user also has received this
object privilege WITH ADMIN OPTION(Grantable to Others), so he or she can directly grant
264
6.2 User Management
other users (or roles) the privilege to create objects in his or her schema. No need for
SYS to intervene; JANEDOE is queen of the castle.
,_
8 ( ~ ~ HAO@HAO (System) Assign Privileges v c <J>
user. JANEOOE ®
JANE DOE
Sysi•m PnvUeg•s (O) Objeci Prtvlleges (1) Analytic Pnvileg.. (0) Al>r>lieaUOn Pnvllegos (OJ Pact<ag• Pn\lilegos (0) PMrleges on u sers (0)
Object Name ObJecl Scnema Grantor Objecl Tyircs P!Mcgc Grantabfe 10 Others
Figure 6.11 Assign Privileges, Object Privileges in the SAP HANA Cockpit
Analytical Privileges
With analytical privileges. you can fine-tune data access requirements. As the name
implies, object privileges control object access: yes or no. If the SALARYcolumn is part
of the EMPLOYEE S table, and you have access to the table, you can view the salaries.
Analytical privileges allow for a more fine-grained, row-level access control. For
example, only HR_MANAGERcan view this column, or to be even more specific, you can
allow HR_MANAGER_US to access only the rows in this column for his or her region.
You can create analytical privileges using SQL with the CREATE STRUCTURED PRIVI LEGE
<name> FOR <act i on> ON <obj ect> statement, where <action> resembles a typical SQL
WHERE clause and <obj ect> references the table or view. However, more commonly,
you would use SAP HANA studio for the classic SAP HANA XS environment or use the
SAP \rVeb IDE for the SAP HANA XS Advanced environment and create your privileges
as design-time artifacts in a development environment to be deployed as catalog
(runtime) objects on your actual production system. See Chapter 4, Section 4.1.2, for
the difference between runtime database objects and design-time development arti-
facts.
265
6 Security
through authorization objects. You can leverage these ABAP authorization objects in
SAP HANA, which helps you implement (and maintain) scenarios where new SAP
HANA XS Advanced applications and existing ABAP-based SAP applications should
use the same authorization model. Shared business authorizations were introduced
in SAP HANA 2.0 SPS 03.
Additional Privileges
For SAP HANA XS applications, additional privileges can be defined. Package privi-
leges authorize you to read, edit, activate, or maintain both native and imported
repository packages. Application privileges define specific usage rights, for example
View or Admin roles. These types of privileges do not apply to SAP HANA XS Advanced
applications, however, which uses an external source code repository and imple-
ments application-level authorization with scopes and attributes.
Another additional privilege type is the ATTACHDEBUGGER user privilege, which enables
a user to debug SQLScript code in another user's session, and is the only user privilege
currently available.
Code Clinic
You can grant privileges with the GRANT and REVOKE statements either directly using
SQL or by using client tools like t he SAP HANAcockpit and SAP HANA studio. The fol-
lowing is an example GRANT statement:
(GRANT CREATE ANY ON SCHEMA t ony TO maria ]
While the SAP HANA cockpit and t he SAP HANA st udio provid ing easy-to-use inter-
faces for t he most common funct ionalities, you'll often have to open t he SQL console
and perform actions in code.
When granting a privilege WITH ADMIN OPTION, this privilege can then be granted
again by the specified user or by t he users wit h the specified role. Otherwise, only t he
object owner ca n grant t he privilege.
If you delete an object or schema owner, all objects and (ad min) object grants are
deleted as well. Object ownership can be tra nsferred.
266
6.2 User Management
with the error (258] : insufficient privilege : Detailed info f or this error can be
found wit h guid ' <guid>' .
As an administrator, you can then run the procedure get_insuff icient_privilege_
error_detail s ( '<guid>' , ? ) to find the cause of this error.
For earlier SAP HANA versions, you can enable an authorization trace in SAP HANA
studio together with the system views EFFECTIVE _PRIVI LEGES and STRUCTURED_PRIVI -
LEGES. SAP Support's Guided Answers (http://s-prs.co/v488426) for SAP HANA
Troubleshooting, shown in Figu re 6.12, can help you get started.
>> <eyeac1<000•1eo Troubleshoot the Error "Insufficient privilege: Not authorized" Altho... 0 s1a11over <<
Even If a user has the oorreci analytic privileges for a view, he st.Ill may receive the error tn•utticicnt privi l c90: Not. authoriicct if there Is
an issue w;th privileges at another fevel. r9i
l!J'
Prerequisites ~
• CATALOG READ
• TRACE ADMIN
Procedure
• Verify that the _SYS_REPO user has all required privileges (for example, SELECT) with GRANT OPTION on the base tables of the view.
You can do lllis by M!lecting from Ille EFFECTIVE_PRIVILEGES system view:
SILECT. r ltOIC IPPICTlV1:_PA1VlLltCIS Nlt£a.E USEA_MAKI!:. · _s1s_a.EPO'J
• Verify that the analytic privi'eges required for any underlying vie'A'S have been grsnted to lhe user.
If the view is a top-level view (calculation view) with undertying views, the granted analytic pttvllege 9ran1s access only 10 this top.level
view. Analytic privileges are required for all undertying views. Note that analytic privileges have to contain at least a view attribute with or
without filter condition in order to grant access to the view.
You can verify a usefs privilges by seleciing from the EFFECTIVE_PRNILEGES system view:
• Uthe analytic privilege uses a database procedure to define dynamic value filters at runlime. check for errors in the execution of Ille
undettylng procedure.
To find out the actual error during procedure execution for analytical privileges. check the lndexserver_alert_<host> .trc trace file
(aooessible on the DiagnoSis Files tab of the Administtation editoc).
Source: Troubleshoot the Error ~I nsu fficient ~e: Not aulhorized" Although User Has Anatytic Priy1le9~
267
6 Security
SAP Notes
For more information, see SAP Note 1809199 - SAP HANA DB: Debugging user autho-
rization errors.
268
6.3 Data Privacy and Protection
data. You could use object privileges to implement this policy, but this policy would
only work if the sensitive data is isolated in a dedicated table. However, for perfor-
mance reasons or other table design reasons, keeping the one sensitive column in the
table with other data might be essential. In this case, you could use an analytical priv-
ilege to implement this policy, but now, you'll need to make sure the privilege not to
see the data is assigned to all users, except for some users, which may be cumber-
some.
Data masking provides a more elegant solution and allows for more flexibility. With
data masking, when the wrong user accesses the data, that user would not get an
error. The data would be hidden from that user. If you consider a table with credit
card data, for example, you can create a mask that completely obscures the column
with the card numbers, so all that the user sees are x's. However, you could also
define that mask such that only the first or last fo ur digits are visible. This would
enable customer service representatives to use the card number to verify caller iden-
tify without revealing too much information.
How data masking is implemented is flexible, and you can use a simple template or
write a complex function. Using a function also allovvs you to separate the table or
view object owner from the mask object owner.
Code Clinic
The mask can be a simple template:
CREATE VIEW credit_view AS SELECT name, number
FROM cards WITH MASK
(NAME USING 'AAAA ', CREDIT_CARD USING 'XXXX');
The mask can be implemented as a function, as shown in Listing 6.1.
CREATE FUNCTION mask_owner .credit _mask(INPUT VARCHAR( 19) )
RETURNS OUTPUT VARCHAR(19) LANGUAGE SQLSCRIPT AS
temp VARCHAR(l9) ;
BEGIN
SELECT LEFT(INPUT, 4) 11 • -xxxx-xxxx- . 11 RIGHT(INPUT, 4)
INTO temp FROM SYS .DUMMY;
OUTPUT : = temp;
END ·
'
Listing 6.1 Create Function
269
6 Security
This function enables separation of ownership between the view and mask owner:
CREATE VIEW data -owner .credit- view AS SELECT * FROM cards
WITH MASK
(CREDIT_ CARD USING mask_01~ner . credit_mask( credit _card) );
To view the data without the mask, you'll need the UNMASKEDobject privi lege on the
table or view:
GRANT UNMASKED ON credi t _view TO super _user;
Technology Background
Differential privacy was first defined in 2003 by Cynthia Dwork. Th is approach
enables t he gathering of useful information from a group of people while at the
same t ime learning nothing about an individual.
Social sciences in the precomputer age used a similar approach to collect statistical
information about embarrassing or illegal behavior: flipping a coin. If tails, respond
truthfu lly (yes or no); if heads, flip another coin and respond "Yes" for heads and
"No" for tai ls, resulting in a 50% chance of the truth with plausible deniability of any
outcome. If repeated often enough, you'll gat her statistically viable information from
the group, wh ile knowing nothing for sure about the individuals.
The data controller-the person responsible for data privacy-defines the calculation
view and configures the parameters of the selected method. To access the view, you can
use a standard SAP HANA object authorization. You can configure the K-anonymity for
a calculation view using the SAP Web IDE for SAP HANA.
In addition, for compliance reporting purposes, a list is made available in the SAP
HANA cockpit for easy access to where a method is used in the Anonymization Views
screen shown in Figure 6.13.
270
6.3 Data Privacy and Protection
6.3.3 Encryption
Encryption protects both data in transit and data at rest. During an eavesdropping
attack, if the data is not encrypted, you don't need a sophisticated network sniffer
tool to capture user name and password combinations traveling over the Internet in
clear text (HTTP). Nor is it rocket science to extract valuable data from database files.
However, once the data is encrypted, making any sense out of raw data is almost
impossible. All data at rest can be encrypted, for example, the database files on the
data volume, the redo log files on the log volume, and any data or log file backup
stored on the file system. In addition, all data in transit can be encrypted as well. In
fact, most data in transit is encrypted automatically.
In this section, we'll address both types of encryption and explain how encryption
can be configured.
Technology Background
In the SAP HANA documentation, the protocol used for network encryption is
described as Transport Layer Security (TLS)/Secure Socket s Layer (SSL). SSL is a rela -
tively well-known Internet protocol for providing the secure "S" of HTIPS and the
green lock icon in t he browser. This protocol goes all the way back to the ea rly days of
the World Wide Web and the Netscape Navigator web browser.
271
6 Security
Today, SSL is almost obsolete, and typically TLS is used to encrypt traffic and aut hen-
ticate computers. However, because TLS is less well known, it is often referenced
together wit h SSL (as in TLS/SSL) or even simply called SSL. Regarding SAP HANA,
when reading about SSL, TLS, SSL/TLS, or TLS/SSL, note that we are referring to one
thing: t he TLS protocol.
Network Encryption
The communication between SAP HANA components is encrypted by default using
TLS. Communication includes traffic between the different processes (hdbdaemon, hdb-
nameserver, hdbindexserver, etc.) and with optional server components, like SAP
HANA dynamic tiering with its extended storage. In addition, communication can be
encrypted at the database tenant level, for multihost (distributed) environments and
between system replication sites, but these require explicit activation (global . i ni,
[communicatati on] ssl = syst emPKI) and some additional steps.
Network Zones
The SAP HANA network is further protected with different zones, as shown in Figure
6.14.
SAP HANA
SAP HANA
SAP HANA
I iif!tMliI&.1 -----I SAP HANA Client I
~Syst~e
m II 11
Dat abase ' - - - - - - - '· '---_ _ ___,
SAP HANA
SAP HANA
SAP HANA
11 Bf!t@l.@.I ---i Brow ser I
272
6.3 Data Privacy and Protection
A dedicated internal network zone fo r the SAP HANA processes on each host and
between hosts in a distributed system is also used for system replication. In addition,
a separate storage network zone controls network access between the SAP HANA sys-
tem and the storage area network (SAN} or network attached storage (NAS) device.
This zone is also used by the enterprise backup tools. Finally, any other type of access
occurs in the client zone. Each zone can be configured to use its own network adapter
(hence the different IP addresses), which enables you to physically separate internal
communication from outside access channels. We'll discuss this separation further
in Chapter 9, Section 9.11.1.
From a security point of view, the zone that requires most attention is the client zone.
In this zone, you'll find the following connections:
• Connections for administration purposes, for example, the SAP HANA cockpit or
SAP HANA studio
• SQL client connections for business users, for example, SAP BusinessObjects BI cli-
ents using ODBC/JDBC or from Microsoft Excel (also supporting multidimen-
sional expressions [MDX)) but also from the SAP S/4HANA and SAP BW
application server
• HTTP/S client connections fo r business users, like the SAP HANA XS Advanced web
client or the SAP HANA XS command line tool
• Connections for data provisioning, for example, SAP Data Services, SAP Replica-
tion Server, or SAP HANA streaming analytics
• Outbound connections, for example, the Solution Manager Diagnostic (SMD)
agent to SAP Solution Manager, the R client to an external R server, or the SAP
HANA Lifecycle Management tool to connect to Software Downloads on the SAP
ONE Support Launchpad
Careful configuration of the firewall between the SAP HANA system and the outside
world is important. For example, for administration access, you should only allow
traffic from specific IP ranges. You could consider adding additional network protec-
tion using network address translation (NAT} or virtual private networks (VPNs) with
IPsec. With NAT, you can map the public IP address to an internal IP address using
either software or additional hardware, while a VPN creates a private connection
between one for more computers allowing you to simulate local area network (LAN}
connections. Highly recommended, as well, is to configure network encryption (TLS}
for all client connections. These are just some examples, many others exist, and we
recommend checking with your network administrator for advice on specific imple-
mentations.
273
6 Security
Learn More
The process for changing t hese keys is documented in "Change the SSFS Master
Keys" in t he SAP Administration Guide on t he SAP Help Portal.
274
6.3 Data Privacy and Protection
Learn More
The process for changing the isolation level is documented in "Increase the System
Isolation Level" in t he SAP Administration Guide on t he SAP Help Portal.
275
6 Security
Figure 6.15 shows how you can enable encryption by flipping a switch. The encryption
algorithm is listed (AES-256-CBC) as well as the time stamp of the last key change, in
this case the Advanced Encryption Standard (AES). using a 256-bit key in Cipher Block
Chaining (CBC) mode.
III Data vOlume encryption 80d IOg vOlume enctypUOO can be 61'13bled separate!)'. But if )'OU require run protection in the persistence lay« . we rec.<Mr1meocl that you
enable both.
Manage Keys
Data Volume Encryption Redo Log Encryption
•·#••>
Root Key Change: Root Key Change
12121/18. 9: 17 AM 12121118, 9:17 AM
30007
"" -1 Encryl)(ion pending ...
X$8flgiM
""
Figure 6.15 SAP HANA Cockpit: Data Encryption Configu ration
Figure 6.16 shows the location and time stamp of the system PK! and instance SSFS
plus the active version of the service root keys. Change Root Keys will start the Man-
age Keys wizard to guide you through the process, which involves the following
steps:
I. Setting a root key backup password (not to be confused with the backup root key).
2. Selecting the encryption root keys to change (data volume, redo log, backup, and/
or encryption service).
3. Saving the password-protected root keys to an external location.
4. Acknowledging that you've indeed saved the root keys; will never forget the pass-
word; and fully understand that, without these root keys and its password, you
cannot recover the database.
276
6.3 Data Privacy and Protection
Sel Root Key Backup Password Back Up Root Keys Change Root Keys
Data Volume Encryption Root Key Redo Log Encryption Root Key Backup Encryption Root Key
Master Key
277
6 Security
This PSE or database collection is used for secure client-server communication, for
example, between a JDBC client (SAP HANA studio) and the SAP HANA system.
6.4 Auditing
An audit (literally. "a hearing") is an account of events. In our case, for t he SAP HANA
database and SAP HANA XS application server, an audit is a chronological, time
stamped record of selected actions or events. The audit trail or audit log tells you
what happened, who did what, and when (or attempted to). Such a record may be
required for compliance reasons or serve as evidence that your sensitive data has not
been accessed.
Like a surveillance camera, auditing per se does not protect your system; it merely
records what happened. You'll need to turn auditing on, and not everything will be in
scope. For example, the procedure to reset the SYSTEM user pass"llvord (system shut-
down followed by starting nameserver with -resetUserSyst em flag) runs outside of
the scope of the database engine.
For commands executed at the operation system level, which includes system shut-
down and startup, you would consult the Linux sys l og, which holds operating system
audit data. This limitation is also true for actions performed by the SAP host agent
like system updates or adding components. For this reason, configuring auditing to
use sys l og as audit trail target (not internal database tables) might be practical and
may also make it easier to integrate SAP HANA auditing with other auditing tools. For
privacy reasons, however, tenant audit events are written to the internal tables
(which are configurable). Designing a proper audit policy requires some careful
thought.
The SAP HANA audit policy defines the actions to be logged. You can define multiple
policies and enable or disable them when needed. Typical candidates for auditing
include the following actions:
• Authentications: Who accessed the system and when (outside office hours)
• Authorizations: Who granted access to whom. \vho accessed sensitive data
• Object changes or deletions: Unexpected in production systems outside mainte-
nance scopes
• System parameter changes: To avoid future blame games
278
6.4 Audit ing
When you create a new audit policy, you'll first need to indicate whether you want to
audit successful actions, unsuccessful ones, or both. Next, you'll select the type of
action and for which user. You can audit all actions, and you can audit all users but
not both (all actions by all users). All action policies are tagged as "firefighter" policies
and are flagged . The amount of data generated will be so massive that you may have
created for yourself a needle-in-the-haystack problem. Typically, you'll \Vant each
policy to capture specific actions, like defining specific objects, for example, tables
with sensitive data. Or, you might specify specific object actions. For each policy,
you'll indicate the level (info, warning, alert, critical, or emergency) and the audit trail
target (database table or syslog). This flexibility enables you to log critical and emer-
gency entries to the syslog for direct processing, while keeping info entries in the
database for reporting, for example.
Several best practices to keep in mind with regard to auditing include the following:
• Create as few audit policies as possible (better a single complex policy than several
simple ones).
• Avoid DML, which impacts performance more than DDL.
• Do not create policies for actions that are already audited by default (clear audit
log).
• Do not create objects that do not allow direct access (SYS . P_USER _PASSWORD).
Figure 6.17 shows the Auditing page in the SAP HANA cockpit where you can create
and enable audit policies, configure the audit trail (database or log), and view audit
trail records.
Under the Audit Tra il tab, you'll see audit entries for both the SAP HANA database and
the SAP HANA XS Advanced application server. Figure 6.18 shows the combined All
Logs view with the SQL statement included.
Learn More
See t he chapter "Auditing Activity in SAP HANA Systems" in the SAP HANA Security
Guide for more detail and further references.
279
6 Security
System: HAO
A policy that auOts 81 actions (flre'Ohter policy) is enal>ted.
4 pol.c:aas enabktd, and 0 policies disabled
Audit level
M'\O
users
Create Al.ld•I Policy
Audited Objects
c •
Audit Trail Target
'i7
Application
Monitor'!~
Enoble<I PERSONAL O... .,.,,,.
Suc:icfftlul
W;t1minQ AH users ALL OBJECTS Oat31>ase Ull:lle
Password POliey Enable<! INSERT, UPOA... All events C~ical Alluseo; M_PASSWOR•.• Oalaba.se tallle
System
oonr.guralion Enoble<I SYSTEM CON ... All events Alen All ..... All OBJECTS Oatal>a.sc table
change
,...
I Enable<! ALL ACTIONS .,..,,.
Successful
~ Info JANEOOE All OBJECTS Database table )
System: HAO
3 J><*les enabled, and 0 pollcles dlS8bled
Al l ogs (10) SAP 1-W'lA Logs (10) XSA Logs() Oele:e Audit Entries I©I
TimeStamp Pclcy Name l 8"el Stews User Name Statement
280
6.6 Additional Security Considerations and Concerns
The SAP HANA XS (both the classic and advanced model) application servers are part
of the platform and share many security features with the database. Network encryp-
tion, for example, is configured at the system level. The same <sid>adm operating sys-
tem account owns both the database and application server software. In case of SAP
HANA XS Advanced, the default IdP (authentication service) for the application
server is the SAP HANA database. However, as we described in Chapter 2, Section 2.2.S,
the SAP HANA XS, classic model and SAP HANA XS advanced model application serv-
ers are also quite distinct, which impacts security aspects.
Authentication and authorization work have been implemented differently - not
just different when comparing SAP HANA XS, classic model with SAP HANA XS,
advanced model, but also different 1.vhen comparing each application server with the
SAP HANA database. To avoid three sections on authentication and another three on
authorization, which would result in much confusion and little clarity, we've chosen
to address the application servers in Chapter 4, Section 4.4, where we discuss security
in the context of application development.
In this chapter so far, we've described the most important security topics for the SAP
HANA platform with a focus on the database. While database security is a good place
to start, your security considerations should not end there. To install or update SAP
HANA components (SAP HANA server, SAP HANA client, SAP HANA cockpit, SAP
HANA XS Advanced, AFL, and so on). you'll use a single tool: SAP HANA Lifecycle
Management (see Chapter 3, Section 3.3). This tool includes its own security features,
like software authenticity verification and using lesser-privileged users for updates
(leaving the SYSTEM user disabled). This tool also introduces new security consider-
ations as you may require root user access to the operating system and new ports to
open in the firewall.
With a single SAP HANA cockpit system, you can manage an entire SAP HANA land-
scape. But what privileges should your SAP HANA cockpit users have? And how
should you configure the technical user to connect to the managed resources?
Should you enable SSO. and even enforce it? The SAP HANA cockpit also comes with
its own security requirements and considerations, as does the database explorer.
281
6 Security
Although integrated into the SAP HANA cockpit and the SAP Web IDE for SAP HANA,
this application has its own security considerations regarding authentication, autho-
rization, and securing connections. Note also that you could use SDA for federation
or user replication technologies like SAP Data Services and SAP Landscape Transfor-
mation Replication Server, R and Hadoop integration with the SAP HANA landscape
and SAP HANA data warehousing foundation-the list goes on.
In addition, the responsibilities of the SAP HANA security architect don't stop at the
platform with its associated options and edition components. In this chapter, we
haven't really mentioned topics like the security implications of running SAP
S/4HANA or SAP BW on SAP HANA, SAP BusinessObjects integration and the EPM-
MDS plugin, or access between cloud applications like SAP Analytics Cloud and on-
premise SAP HANA systems.
Nor have we discussed how SAP HANA relates to other SAP products in the cyberse-
curity and GRC spaces. Once you go beyond the introductory level, you'll need to
address integration with products like SAP Access Control or SAP Identity Manage-
ment; with services like SAP EarlyWatch Alert, part of the security optimization ser-
vices; or with organizations as user groups for security, data protection, and privacy.
Security is complex, and we've only scratched the surface.
Learn More
SAP HANA product management mainta ins a microsite with information about
security for an IT expert aud ience (our security architect persona). For more informa-
t ion, visit http://s-prs.co/v488427.
SAP Notes
For add itional information, search the knowledge base for articles about SAP HANA
security. A good place to start is SAP Note 2159014 - FAQ: SAP HANA Security. The
component fo r the SAP HANA security topic is HAN-DB-SEC.
6.7 Summary
In this chapter, we covered the most important SAP HANA security concepts with a
focus on the database. We introduced the SAP HANA security architect as a persona
by looking at the job role and the most relevant tools. We provided a quick scan of the
282
6.7 Summary
SAP HANA user management implementation with the available options for authen-
tication, both built-in through user name and password policies and from external
mechanisms like Kerberos, SAML, and JWT. Similarly. we investigated vario us
options for authorization, including hybrids like ASAP-shared business authoriza-
tions and using LDAP as both authorization and authentication provider. After the
topic of secure access, we addressed data privacy and protection with data masking
and data anonymization as interesting new features. Then, we looked at data encryp-
tion at rest and in transit using TLS/SSL, PK!, SSFS, root keys and master keys. And to
comply with regulations, we did a quick tour of the audit functionality.
In the next chapter, we'll meet the persona responsible for connecting our SAP HANA
systems with the outside world, replicating data from source systems, integrating
with big data, or virtualizing remote data sources using SDA. Time to introduce you
to the SAP HANA data integration architect.
283
Chapter 7
Data Integration
I have no data yet. It is a capital mistake to theorize before one has
data. Insensibly one begins to twist facts to suit theories, instead of
theories to suit facts.
-Sherlock Holmes
In the early days of SAP HANA, when native applications for the platform like SAP
S/4HANA or SAP BW/4HANA were not yet available, the topic of data access
received considerable attention. If you pick up an old copy of the SAP HA1VA Master
Guide, of the three use cases described, tv,ro are primarily concerned with data pro-
visioning: SAP HANA as a data mart and SAP HANA as an accelerator. Provisioning
is generally understood the process of making data available to users (or applica-
tions) while maintaining data access security. You don't just want to move or copy
data from one system to the next. You also still need to maintain control over data
access.
Data integration concerns bringing together data from different, often heteroge-
nous, sources with the objective of providing a single, coherent view. SAP HANA sup-
ports several technologies to reach this objective, including replication, federation,
data quality management, and synchronization. Data access and integration brings
th e entire enterprise together under one roof, ready for analysis. Some of this data
might need to be replicated in real time, for example, stock prices or inventory,
where timing is of essence. Other data sources might be "dirty" and first need a good
scrub before you can allow it to enter the database. You might need to combine data
sources to add value, or perhaps you prefer to leave your data as-is, stored in a data
lake, but still need to connect to it when the need arises.
285
7 Data Integration
In this chapter, we'll describe all the data access technologies currently available for
SAP HANA, including the SAP HANA Data Management Suite, enterprise information
management (EIM), data federation, data synchronization, data replication, and big
data.
What are the responsibilities of the SAP HANA data integration architect, and ~vhat
tools are available to do the job? In this section, we'll briefly describe job role of the
data integration architect persona.
286
7.2 SAP HANA Data Management Suite
7.1.2 Tools
For the most part. data access and data integration functionalities are included in the
standard SAP HANA tools: the SAP HANA cockpit or, v.•hen working with SAP HANA
1.0 exclusively, the SAP HANA studio. You can design data integration flows, for
example, using the SAP Web IDE for SAP HANA. To create remote data sources and
virtual tables, you can use SQL, or you can perform these activities using special edi-
tors in the database explorer and in SAP HANA studio.
However. for other activities. you might need to sharpen your skills working with
new tools that don't use the SAP HANA cockpit or the SAP HANA studio, like SAP
Landscape Transformation Replication Server, SAP Enterprise Architecture Designer
(SAP EA Designer), or SAP Data Hub. In this chapter, we'll describe the different data
integration technologies that can be used with SAP HANA, together with the relevant
tools.
To facilitate the work of the data integration architect, SAP launched SAP Data Hub,
which is included in the equally new SAP HANA Data Management Suite. We'll dis-
cuss the SAP Data Hub further in Section 7.2.l.
The SAP HANA Data Management Suite is a data management. orchestration. and
governance solution, introduced early 2018. Data management is concerned with
topics like storage, security, integration, quality, and movement of data assets (to
name just a few), and is often the responsibility the chief information officer (CIO).
Data governance concerns are more recent (although typically considered a part of
data management) and focus on data quality, integrity, and security, including
accountability. Data privacy and compliance with rules and regulations are data gov-
ernance topics. The concept of data orchestration is even more recent, and defini-
tions are still being drafted, but the key notion is the separation of storage and
computing introduced with cloud computing. in particular with multicloud and
hybrid cloud/on-premise environments. These developments have added com-
pletely new dimensions to data management and governance. Where is the data
stored? Ho\v is it stored? How can you make sure that everyone inside the organiza-
tion has access (but nobody else)? Security, governance, performance, availability- a
whole new layer of complexity has been added to data management. which also
needs control from a cost perspective.
287
7 Data Integration
As mentioned earlier, the two core components of the SAP HANA Data Management
suite are SAP HANA and the SAP Data Hub, on-premise or as-a-service in the cloud.
Two additional products add capabilities for data management: SAP EA Designer and
SAP Cloud Platform Big Data Services. The suite itself is not a product as such-and
thus not listed in the Product Availability Matrix (PAM) or under Software Down-
loads on the SAP ONE Support Launchpad-but several components are brought
together as a coherent whole, or, as marketing might say, as an end-to-end solution.
At the time of writing (summer 2019), this suite is being redefined and now also
includes the new SAP HANA Cloud Services and SAP Data Intelligence. Both products
were announced at SAPPHIRE NOW in 2019 and are currently under development,
expected for release in late 2019. We described SAP HANA Cloud Services in Chapter
l, Section 1.6.
The SAP Data Intelligence cloud service focuses on the productive use of artificial
intelligence (Al) and machine learning. The orchestration concerns described earlier
also impact data science projects, especially siloed data and a multitude of tool and
technologies. How to deploy projects productively, how to scale, and how to manage
costs are typical concerns. SAP Data Intelligence solutions aim to bring the data sci-
ence and IT departments together and accelerate the development and deployment
of AI.
Learn More
To learn more about the SAP HANA Data Management Suite, visit http://s-prs.co/
v488428.
To learn more about SAP Data Intelligence, visit http://s-prs.co/v488429.
To learn more about SAP HANA Cloud Services, visit http://s-prs.co/v488430.
288
7.2 SAP HANA Data Management Suite
To address these issues, SAP Data Hu b, a data orchestration solution, can extract
value from distributed data assets and provide automated data processing across
your entire data landscape. The key capabilities (functionalities) fo und in the SAP
Data Hub include the following:
• Data discovery: How is it all related?
• Data refinement: How to process raw data into (reusable) assets?
• Data governance: How to provide trust and compliance?
• Data orchestration: Scheduling and monitoring, data transfer, and remote task
execution.
SAP Data Hub takes as input data of any type, variety, and volume of data, including
databases, data warehouses, data marts, cloud datastores (data lakes), internal or
external applications, unstructured data, event streams, geospatial, third-party data,
and so on.
SAP Data Hub provides a single interface, shown in Figure 7.1, with different applica-
tions for monitoring; systems, license, and connection management; metadata
exploration; and audit log viewing. SAP Data Hub also integrates SAP Vora (see Sec-
tion 7.7).
RI
t_Q
Audit Log Viewer
"i
Connection
~·
License
~
Metadata Explorer
Management Management
'
Modeler
I I
Monitoring System
Management
I I Vora Tools
289
7 Data Integration
SAP Data Hub is available both on-premise and in the cloud with elasticity provided
by Docker containers and Kubernetes technology. Under the hood, you'll even find
SAP HANA embedded in SAP Data Hub for metadata persistence.
Figure 7.2 shows the Data Pipelines app, launched from the Modeling tile of the
launchpad of SAP Data Hub, trial edition. In this app, you can see data orchestration
in action and learn ho'" to model data refinement.
~
+ <>
St~d'I
Hs!f i.ip!uh JSON
~•1 1 •1v~ ••
!fft'l'lirlall
v Ex#lll'les
.;::,"' ~
.. ...
, ,
,,,_,.
""
O.Q
Gtltflllof
r•e Sys~m
l
-
H OFS ....~
PlO"SlNamtt
..
53
...
•
HOfS~
HOFS ProOIM'r
open OOOGgurauon
Open Oo<umentation
Re"'°"'
......
v Mathine learM!g (beta)
.....
:t:::!
~~ ..
.....
:r::::
~- "
llla.EwntConsumet
c::::::J S.tll:f •frrt9 S«O'ICIJ "00
"'11, Mt~IST Tnin MNl:ST slla.Ewn!Ptoduc:tt
lmg ~eaN Model
Learn More
To learn more about SAP Dat a Hub, see http://s-prs.co/v488437. For t he docu menta-
tion, search for "SAP Data Hub" on the SAP Help Portal.
We also recommend signing up for t he openSAP course "Freedom of Data with SAP
Data Hub."
Tutorials
Try out SAP Data Hub for yourself on the free SAP Data Hub, developer edition, and
check out the SAP Data Hub tutorials on t he SAP Developer Center.
290
7.3 Enterprise Information Management
Technology Background
SAP acquired the technology behind SAP Cloud Platform Big Data Services from Alti-
scale in 2016, a Silicon Valley company based in Palo Alto, California, and fo unded in
2012. Alt iscale provided two big data services: Altiscale Data Cloud and Alt iscale
Insight Cloud, categorized as Hadoop-as-a-service (Haas) or big data-as-a-service
(BDaaS), respectively.
Learn More
For the documentation, see SAP Cloud Platform Big Data Services on the SAP Help
Porta l.
EIM is a generic information technology term, often used as synonym for data man-
agement as described in Section 7.2. Although some would argue that EIM also covers
nondigital resources (making data management a subset of information manage-
ment, next to enterprise content management, business process management, and
291
7 Data Integration
even business intelligence), for our purposes, we'll focus on how SAP uses the term to
bundle several related products into a portfolio.
For data management in SAP several main tools and solutions include the following:
• SAP HANA Data Management Suite/SAP HANA Cloud Services
• SAPHANA
• SAP Data Hub
• SAP Data Intelligence
Enterprise information management in SAP, on the other hand, includes the follo11v-
ing tools and solutions:
• SAP Master Data Governance (SAP MDG)
A solution for master data management on SAP S/4HANA or SAP ERP.
• SAP Data Services
A solution for data integration and data quality using SAP BusinessObjects Busi-
ness Intelligence (SAP BusinessObjects BI) platform technology.
• SAP Information Steward
Includes data profiling and metadata management using SAP BusinessObjects BI
platform technology.
• SAP Agile Data Preparation
A self-service tool for data discovery, preparation, and quality (SAP HANA plat·
form).
• SAP Information Lifecycle Management
Extends data management with data retention policy management (SAP Net·
Weaver).
7.3.1 SAP HANA Smart Data Integration and SAP HANA Smart Data Quality
SAP HANA smart data integration (SDI} and SAP HANA smart data quality (SDQ) are
two different products, but SDQ is best understood as a plugin for SDI. As SDQ can't
be used independently, we'll cover both products together in a single section.
For the previous SAP HANA 1.0 release, SDI and SDQ were bundled as SAP HANA
enterprise information management as part of SAP HANA, enterprise edition. SDI
(but not SDQ) is included in the free SAP HANA, express edition.
292
7.3 Enterprise Information Management
293
7 Data Integration
..
•••
w
f
CA© +
c-.JM
r@
c-.
\
'
)
+
-
P relt<llon
r........
co.~)
0~ •-' . '"
CA©
-
~·-•"'"-
> _,
O.@
-·
"'"
Co.@
Figure 7.3 SDI Flowgraph in the SAP Web IDE for SAP HANA
Learn More
For the documentation, see SAP HANA Smart Data Integration and SAP HANA Smart
Data Quality on the SAP Help Portal.
294
7.3 Enterprise Information Management
Tutoria ls
For hands-on tut orials, see t he videos and t he playlists on the SAP HANA Academy
YouTu be channel, for example, "SAP HANA Smart Data Integration and Smart Data
Quality."
"' CoalO«'tioon
~...... (ll;fl~&llOO'I
~llQlllSll'I 5ef¥et \.Ill
•s
hlii.:n-.,,is.QlOOdit.~lhUttbn
Auhnb\11:11'1 AaleW $clipe: hll;J9,:lfw•uo (lll~.~~y
s.v.c. A.(IC:o.l'll fatilf AdO'tw
seM:e~~,.,..,
295
7 Data Integration
Technology Background
SDI and SDQ use same technology found in SAP Data Services. BusinessObj ects
(acquired by SAP in 2008) acquired the data integration technology with ActaWorks
from Acta Technology (2002).
One of the great features of Acta Works at the time was its connectivity to SAP ERP
and SAP BW systems.
Learn More
For the documentation, see SAP Data Services on the SAP Help Portal.
Learn More
For the documentation, see SAP Agile Data Preparation on the SAP Help Porta I.
296
7.4 Data Federation with SAP HANASmart Data Access
+ iji Upl*Fil~
+ l!'2. TRANS.ID k2. CUST_10
·~ El
~ Add f ormula c.olumn
PHte l="«>Cll Cli~rd
1 200001 89956 SS9
2 200002 41969 327
+ A4cl COiumn
ti;. l~rt from Twpl.att
3 200003 11007 4<S
'
20000S
200006
2S413
843S9
275
,.., em \V~hffts
COtnblne
'
"' o' . . .,.,. . .,
~ Aggtqatt Data
1 200007 96567
8 200008 67603 2'17
9 200009 31408 9334.706 2003-05·30
10 200010 66838 S980.094 2005-02·03
11 200011 1n96 4607.$02 2006-0$-22
12 200012 «277 509$.347 2001·11·17
1S 200013 69S4l 7483.904 2002-04·02
' ·~-· ...........
A ctions.
14 200014 320<-0 7$29.865 2002·1().03
History
1S 20001S 29849 2072.88 2009.07•06
774.691 Column
95066 2005·12·25
" 200016
17 200017 31425 9SS8.69S 2012·1().13 Properoes
Tutoria ls
For hands-on tutorials, see the videos in the SAP Agile Data Preparation playlist on
the SAP HANA Academy YouTube channel.
Data federation technology enables the aggregation of data from different and often
disparate sources into a virtual database, so you can access the data without having
to replicate (or migrate) the data. In SAP HANA, data federation technology is called
SAP HANA smart data access (SDA), but sometimes the term "linked databases" is
also used in SAP Notes or in the documentation in this context.
To use SDA, you'll first need to create a remote data source. SDA makes remote con-
nections using ODBC, so in theory any database that supports ODBC can become an
SDA data source. However, to leverage the smart functionalities of SDA, the data
must be supported as a remote source, which is currently the case for SAP databases
(SAP HANA, SAP IQ, SAP ASE, and SAP MaxDB) and commonly used databases (Oracle,
297
7 Data Integration
Microsoft SQL Server, Teradata, IBM 082, and Netezza). In addition, SDA also supports
Google BigQuery, Hadoop, and Apache Spark.
After creating a remote data source, the next step is to create a virtual table. When
creating a virtual table, the metadata of the table (the names of the table and its col-
umns and the different data types used) is stored locally in the SAP HANA catalog just
like a regular local table. Thus, you can create synonyms, use the table in functions
and procedures, and define object access the same way as for local tables. The actual
data, however, remains where it was, on the remote location. We're only recreating or
replicating the metadata in this scenario.
Statistics are also available for the remote objects such that the query processor can
optimize remote data source queries, and query joins are processed at the location
where this processing would be most efficient. SDA supports both SELECT and data
manipulation language (DML} statements (INSERT, UPDATE, and DELETE}.
Learn More
For the documentation, see "SAP HANA Smart Data Access" in the SAP HANA Admi-
nistration Guide on the SAP Help Portal.
Tutorials
For hands-on tutorials, see the videos in t he SAP HANA Smart Data Access playlist on
t he SAP HANA Academy YouTube channel.
With SAP HANA remote data synchronization, you can synchronize data between an
SAP HANA master database and an SAP SQL Anywhere client databases. Remote data
synchronization enables you to connect remote workplaces and mobile devices to
the enterprise network.
Technology Background
SAP SQL Anywhere was originally developed as Watcom SQL, a cross-platform
embeddable SQL database, by a company named Watcom Internationa l Inc., as part
of its portfolio of portable compilers and tools. Watcom was acquired by PowerSoft
298
7.5 Remote Data Synchronization
in 1994, then by Sybase in 1995 (version 4 t o11 as SQL Anywhere), and final ly by SAP in
2010 (version 12 and later).
SAP SQL Anywhere is a lights-off, small memory footprint database, well suited for
applications located on offsite locations or on mobile devices. You'll find the SAP SQL
Anywhere database often embedded inside applications because of its self-manage-
ment and self-tuning features, requiring little to no IT support.
SAP SQL Anywhere runs pretty much anywhere; is available on many platforms
including smartphones (Mobilink); and supports the most common database inter-
faces (for example, ODBC, JDBC, .NET, and JavaScript) and application development
tools (Visual Studio, Eclipse, PowerBuilder).
Remote data synchronization enables SAP HANA to act as the consolidated database
in an SAP SQL Anywhere landscape. The remote data synchronization client can be
installed as an SAP SQL Anywhere database, typically on a server or desktop com-
puter located at the edge of your network or what's called an UltraLite database,
which is SAP SQL Anywhere for mobile devices.
A remote data synchronization server process running on the SAP HANA server or a
separate machine manages the synchronization process and maintains the client
state information in the database. In the database, you'll also find the synchroniza-
tion scripts that determine authentication and that determine data to upload, down-
load, and process.
Remote data synchronization is part of the SAP HANA standard edition and included
in the free SAP HANA, express edition for developers. SAP SQL Anywhere remote
databases (synchronization clients) are licensed separately.
Learn More
For the documentation, see the fol lowing topics on the SAP Help Portal:
• "SAP HANA Remote Data Sync"
• "SAP SQL Anywhere"
Tutorials
For hands-on tutorials, see t he SAP D&T Academy videos on t he SAP Technology You-
Tube channel.
299
7 Data Integration
Technology Background
SAP Landscape Transformat ion Replication Server is a sophisticated product useful
for many use cases t o enable real-time replicat ion from SAP sources and/or non-SAP
sources to SAP targets and/or non-SAP targets. Technically, SAP Landscape Transfor-
mation Replicat ion Server is implemented via t he Data Migration Server (DMIS} add-
on for SAP NetWeaver. SAP Landscape Transformation Replication Server connects to
sou rce and target system using remote funct ion calls (RFC) or through a di rect dat a-
base connection and can also be used as part of an SAP S/4HANA environment.
300
7.6 Data Replication
,,rAdrmlstratlon t' Relevant Tables t' Steps t' Applcatlon LOgs t' Runtine Jnformation t' ActMtJes r- Expert Functions I
General Datl
Idem;ifica~ion !001! HAJIA_ACADB•IY_OOl
, Settilgs
0Actlve
Block slZe § oo, o££) evtes 0
"
Project Assignment
Appficatlon !IV3-R/3 HIGP-~IIO!I I
Project jz1wc_oo1 I SLT_SCHEMA_OOl
SUbproject I z1uuc_oo1 I HAUA_ACAOEMY_OOl
-
Sender Data
RFC Connection l•cccuneoo I
SAP Release f7o2l
1~ Sender System ~.la l>IWB Installation
·I'* ReJTIOte Login I
IReceiver Oatl
IHCll£
RFC connectlon I
SAP Releose ~
f....,,;I'
301
7 Data Integration
Because data mart replication was one of the earlier implementation scenarios fo r
SAP HANA, SAP Landscape Transformation Replication Server is also well integrated
into SAP HANA studio, as shown in Figure 7.7, which allows you to monitor t he repli-
cation process. In fact, data replication with SAP Landscape Transformation Replica-
tion Server is one of the few areas with no equivalent functionality in the SAP HANA
cockpit.
I M~f. OATA_IROVISIOH.JOfTOR· SAi' KA.HA SIWiQ .
f'tc: fdil ~ Window l::tclP
M· ~
.. · -:><> · . s l11>- I,..., .
la If· c ,ji '9 A ~ ..,. - c~ IC OuK1:i....im W Ob PtcM.1iotli~ ldlto1 M llilrr. -c
'° """""
ra. "'"'HAVl'SYSTEM) H:.tU.A.c•dtmy . &l SLT 8a~od Tablo Oala Provi$lonln9 HA.V(SVST[Ji(l .J,wp.corplO ~lu9d~ Sts>lt20U1J~:0J™ 4/' j I> lnlwY.t ~ ~
Qt. C.lt•log
~ At-Jtllo<ittd'n
SN' $ow(e S,,t-. _, KANA T.-9ct S<-"-Sde<tlofl
;.:> Pubk st'no"'!"4
-ti ""1<VCAll<MI' ~Soule.~ !ECC C~•23.£CC,..(l0) ·I
Qt. Column Vi~
~ Proc.c~tQ T•!>ft Sch..m CoN'ogur.d !HANIVCADlMV ·I
(Co. l•bln Soo.w<t DfU<I'
:m W Ttble (0002l)
ftn SAP 00: W Tat:ak Tors (00021)
• Sou1c1 Sytt""" I> ltc< ] Hod tf•m• [ u~pN.11'11f.28j:CCJO J
~ fV) 00: edlti"onship definitionf (0008l) SlT Source~~ ID[SLT SlT~Namt usphtmll1a8 )
1!J JtSJ.OGJll(S
g JtS_MlSSAGlS 0..Ulo.cl ~tM
9RS_OR0£R
~ m.OROUl..00
., !lo.id ..
·I
i:: 11s~
131 JtS_ST.t.T\IS
aD COl'l!Pif'ff COdef (nW)l)
Sdwm1
...,,
"""-"CA. DllOll
Ttbl•N-
""""'
f4'att
k-·
&:J ll'IP'to<tsf
St.rt Tn'lf:
2012-01·22 02*.lS.ocoxmxl
1~1ic.iic.• I
(ScopAepl~ ~
!ID P~UIBt"tn<~{TO)lW) """'-""'·
HAHV<CA- .........
~ctte c i ki>f0<m
w 11\PtO(tf,l
2012-0t·UOW!St~
2DU.()J•U Ol:lru:IO 000000000
"""-"CA.. ""'"
tm l•ng111git 1:471(COfl'lpot'ltl"C8C·n.e){TOO TOO! 20U-Ot·U02:2'6:ll~ 1.......... ~
~ O«~#ft Typ.s {110})
""""CA. TllOlW .........
""'"" ID '"Proco$
co '"Ploocm. 20J 2,4t.)5(M,1).Ja ~
I
·I ~
svs·- ., (R01Jme...
-
"""VCA. ,,.~, 20U-Ot·2S ()lJC1i&5 ODr.1000000
• • -
'
•(A. ""
TOOJ
~·
a:J lnPrOCC'll
R1 '""0(11$1S 20U-Ot•l5 05..0S:J6 00:00:0:0 I
1
To Wl\clt-Uscdl.hl ts"< -o' """-"CA.· f4'<•t i.,y Sditclultd 20U.(lf·l.SOMo&flJ~
'
"'"""
Humber of tklgft!
I_
I,,_ UMCl.On Pai;bpe:
,. I 1Cl '"".,,;n " · , fill! c! """ - D)l ..,_ Joblog U '-.JI t6storyl ~ Progmsl U :i I -.1. · I x • • cJ
Figure 7.7 SAP Landscape Transformation Replication SeNer: Monitoring in SAP HANA
Studio
Learn More
For the documentat ion, see SAP Landscape Transformation Replication Server on t he
SAP Help PortaL
302
7.7 Big Data
SAP Data Services integration services and SAP Landscape Transformation Replica-
tion Server.
Benefits from using the SAP Replication Server include guaranteed delivery, zero
operational downtime, and non-intrusive data handling, which means that the
source system is not aware of any ongoing replication.
Like SAP Data Services, SAP Replication Server is a standalone product 'vorks with
(almost) any source and target database. When used as part of an SAP HANA edition,
th e target is restricted to SAP HANA.
Technology Background
SAP Replication Server is originally a Sybase product developed in the 1990s. The cur-
rent release version is 16.0, released in 2017. For a matrix of supported source and tar-
get databases, see the PAM on the SAP Support Portal.
SAP Replicat ion Server replicates committed transactions. A replication agent
installed on t he source database server continuously monitors for transactions
marked for replication. The technology supports bidirectional replication to and f rom
many source and database target s, although t he version licensed with the SAP
HANA, enterprise edition w ill only support an SAP HANA target.
The replica t ion model used is publish-subscribe, which provides great flexi bility
because you can decide to replicate entire databases or just one or two tables, and
you can replicat e from a single source to multi pie targets. In addition, custom actions
can be defined to allow for additional processing on the target side.
Learn More
For the documentation, see SAP Replication Server on the SAP Help Portal.
Big data as a technology concept and product category floated to the surface around
2012 around the same time that the Hadoop initiative started and Yahoo became an
open source Apache project. Big data is not defined by its size alone; big data is a mov-
ing target, initially expressed in gigabytes. then terabytes, petabytes, exabytes, and
currently zettabytes-but always by the three Vs:
303
7 Data Integration
Technology Background
Hadoop was first released in 2006 initially but has since been developed by Apache
as open source. The two main components are storage and processing. Storage is
provided by the Hadoop distributed file system {HDFS), wh ich you can think of a sin-
gle logical disk hosted by thousands of physical computers. The processing uses t he
MapReduce programming model, which delegates the execution of the task to the
local unit. YARN (Yet Another Resource Negot iator), a project st arted at Yahoo, is t he
piece t hat provides the orchestration.
Apache Hive is a data warehouse built on top of Hadoop with a SQL-like interface to
query the data bases.
304
7.7 Big Data
Learn More
For t he product docu ment ation, see t he f ollowing topics on t he SAP Help PortaI:
• "SAP Vora"
• "SAP Dat a Hub"
Although courses on SAP Vora are st ill available on openSAP, you might want to look
fi rst into the openSAP course about SAP Dat a Hu b.
305
7 Data Integration
indexserver indexserver
SDA
Spark SQL
Adapter
Learn More
For the product documentation, see SAP HANA Hadoop Integration on the SAP Help
Portal.
7.8 Summary
In this chapter, we covered the full spectrum of SAP data access and integration tech-
nologies. Vl/e started with the new SAP HANA Data Management Suite, which bundles
SAP HANA, SAP Data Hub, SAP EA Designer, and SAP Cloud Platform Big Data Ser-
vices. Next, we unboxed SAP HANA and explored EIM, ETL, SDI, and SDQ and
explained how the data integration and data quality capabilities ofEIM in SAP HANA
relate to SAP Data Services and SAP Agile Data Preparation, the latter bringing self-
service data management to the business user.
After ETL, we turned to data federation and described SDA with its virtual tables and
adapters. SDA enables you to integrate SAP HANA into a much larger data landscape,
so you can perform in-memory analytics on both relational data sources and big data
306
7.8 Summary
clusters. The same is true for remote data synchronization, which capability enables
you to connect and synchronize SAP HANA with UltraLite databases on mobile
devices and with embedded SQL Anywhere databases on remote (edge) networks. For
real-time replication of SAP ERP systems, you can leverage SAP Landscape Transfor-
mation Replication Server for trigger-based replication at the logical level or use SAP
Replication Server for log-based replication at the physical level.
Finally, we explained how SAP HANA connects to big data, which brought us back full
circle to the SAP HANA Data Management Suite with SAP Data Hub (SAP Vora).
In the next chapter, vve'll continue our round of introductions to SAP HANA perso-
nas, proceeding with the data architect persona and addressing data distribution and
data tiering.
307
Chapter 8
Data Architecture
Less is More.
- Ad Reinhard
Data architecture is about data distribution, about performance, and about con-
trolling cost. A database never stops growing, and the data architect faces a challenge
when a database has reached the point that either you need to scale system up by
adding more resources to the machine or to scale the system out by adding more
machines. Scaling operations typically involve considerable hardware expenses. By
implementing software solutions such as data tiering and data lifecycle manage-
ment, you can offload some of your less frequently used data to extended ''vvarm"
storage or even offline "cold" storage, thus reducing the memory footprint of the
"hot" in-memory store and postponing the need to scale. To go further and to scale
up or out, you'll need to take data distribution into account, including table place-
ment, partitioning, and other data architecture topics, to ensure that all the hosts of
your newly distributed system will be optimally engaged.
In this chapter, we'll address a few key data management questions, particularly
about managing the growth of system landscapes and scaling. We'll introduce data
management topics like data tiering and data lifecycle management and describe
how this works on the SAP HANA platform. We'll cover native extension nodes and
dynamic tiering, distributed systems, and data distribution. To start, let's introduce
you to the data architect persona.
309
8 Data Architecture
What are the responsibilities of the SAP HANA data architect, and what tools are
available to do the job? In this section, we briefly describe the job role of the data
architect persona.
8.1.2 Tools
In this chapter, we'll open and close with these two key tools, described in detail:
• SAP Enterprise Architecture Designer (SAP EA Designer)
You'll use this tool to design your data architecture and collaborate to get the best
results (see Section 8.2).
• SAP HANA data warehousing foundation
This tool provides the building blocks for an enterprise data warehouse (EDW)
with a focus on data distribution and lifecycle management. The Data Distribution
Optimizer (ODO) and Data Lifecycle Manager (OLM) tools are both native SAP
HANA applications (see Section 8.6).
In addition, some other tools useful for the data architect toolkit include the follow-
1ng:
310
8.2 SAP Enterprise Architecture Designer
• SQL
Where would we be without SQL? To create table partitions (see Section 8.5.1), for
example, all you need is the SQL console (database explorer in SAP HANA) or the
SQL prompt (SAP HANA studio).
• SAP HANA cockpit
The SAP HANA cockpit includes the required administration tools to work with
distributed systems, integrates SAP HANA dynamic tiering to manage extended
storage, and enables you to monitor table partitioning and data aging. You'll even
find a data distribution optimizer included (albeit less sophisticated than the ODO
from the SAP HANA data warehousing foundation).
• SAP HANA studio
Most of the functionality found in the SAP HANA cockpit is also present in SAP
HANA studio. As development for SAP HANA studio stopped with the last SAP
HANA 1.0 release in 2016, the latest features and capabilities are no longer
included, but SQL will always be SQL, so this change is really only a change to the
user interface {Ul).
• SAP HANA Lifecycle Management {hdblcm)
To add hosts to a distributed system or to create a distributed system in the first
place, you would use the same SAP HANA Lifecycle Management tool as installed
for a single-host system (see Chapter 3, Section 3.3.3). Using hdblcm, you can also
change host roles from worker to standby, for example, or configure the internal
network of a distributed system. As a web application, hdblcm is accessible from
both the SAP HANA cockpit and SAP HANA studio.
• SAPWebIDE
Although not as important as for other roles in this book, the SAP Web IDE for SAP
HANA is a relevant tool for the data architect as well. You'll use the SAP Web IDE to
work with flowgraphs, for example.
With SAP EA Designer, you can capture, analyze, and present enterprise landscapes,
requirements, processes, and other similar artifacts in models and diagrams, all in a
collaborative environment using industry-standard notations and techniques.
311
8 Data Architecture
Artifacts can be anything and everything from use cases, business cases. require-
ments, and design documents, to project plans and documentation-all the byprod-
ucts of software development, in other words, everything except for the code
(although in some definitions released code is also included). With the SAP EA
Designer, you can create (capture) those artifacts in a single environment.
Figure 8.1 shows the homepage of SAP EA Designer (both editions) with quick links to
create new diagrams or to browse the repository to draft diagrams you're working on
as well as most recent diagrams shared by colleagues.
Figure 8.1 SAP Enterprise Architecture Designer, Edition for SAP HANA
312
8.2 SAP Enterprise Architecture Designer
• Business process
Identify, describe, and decompose business processes using the Business Process
Modeling Notation (BPMN} format.
• Enterprise architecture
To analyze and document the organization, goals and projects, processes, applica-
tions. systems, and supporting physical architecture.
• Process map
Provides a graphical view of the business architecture (people, organization, and
processes).
• Requirements lists
Provides a list of requirement documents.
As described earlier, in some cases, you won't need to manually create artifacts since
SAP EA Designer can reverse engineer the following artifacts for you:
• Requirements from Req!F files, for example, an XML standard to exchange
requirements.
• Physical data diagrams from the SAP HANA Deployment Infrastructure (HD!),
described in Chapter 4, Section 4.6, or the SAP HANA database catalog (and other
supported databases) directly.
• Data movement diagrams from SAP Web IDE flowgraphs and JSON schema dia-
grams.
• Business process diagrams can be imported from SAP Business Process Manage-
ment (SAP BPM) and the SAP Solution Manager or, of course, from plain CSV files.
In addition, in SAP EA Designer, you can link together all those artifacts across differ-
ent types.
You can imagine the sheer number of documents in many different formats created
in a software development or system migration project. For this reason, the second
asset of SAP EA Designer is equally important: the ability to view, analyze, and share
content. SAP EA Designer can serve as a central repository where employees can
browse and share diagrams, post comments, generate reports, run impact analysis,
and apply heat map color schemes based on certain criteria, to name but a few char-
acteristics.
The tool is available in two editions:
• SAP EA Designer, edition for SAP HANA
• SAP EA Designer, cloud edition
313
8 Data Architecture
Compared with SAP PowerDesigner, SAP EA Designer is more limited and restricted in
scope. For the SAP HANA edition, for example, you can only generate SQL-compliant
code for SAP HANA and not for other databases. Diagram export is limited to SAP
Solution Manager (or other SAP NetWeaver ABAP systems).
Learn More
For the documentation, see SAP Enterprise Architecture Designer, Edition for SAP
HANA at the SAP Help Portal. To learn more about the product, you can sign up for
the openSAP course "Introduction to SAP Enterprise Architecture Designer."
Typically, you scale-out when you can no longer scale-up (technically or for price/
performance reasons}, although in some cases scale-out is not an option. The general
recommendation is to scale-up before you scale-out. since managing a single system
is less complex than managing a multinode system with shared storage.
Let's take a closer look at distributed systems and both scaling up and scaling out pro-
cesses, before discussing scale-out systems in terms of configuration and potential
impact on SAP HANA extended application services, advanced model (SAP HANA XS
Advanced}.
314
8.3 Scaling SAP HANA
Technology Background
As shown in Figure 8.2, in SAP terminology, a multiple-host environment is ca lled a
distributed system.
Shared
Storage
System: PRD
Instance: HDBOl Instance: HDBOl
Host 1 Host 2
315
8 Data Architecture
With other vendors and technologies, the same concept is sometimes called a cluster
with nodes (see Chapter 2, Section 2.2.4). Although the SAP documentation is consis-
tent. in some white papers or biogs, you may read about SAP HANA clusters, scale-up
systems, multi node systems, extension nodes, and so on. Unless indicated otherwise,
you can assume that these terms all refer to the same concept.
A distributed system contains two or more hosts and can be conceived as a single
system with the same system identifier (SID), but with multiple hosts. Each host
manages an SAP HANA instance (with the same instance number). The SAP HANA
system contains a single system database and one or more tenant databases. Tenant
databases can be distributed across hosts or attached to a single host.
Do not confuse an SAP HANA distributed system with a federated database. As
described in Chapter 7, SAP HANA's federated database technology is implemented
in SAP HANA smart data access (SDA) and remote data synchronization. SDA enables
you to access remote databases (including but not limited to SAP HANA) and store
the metadata loca lly using virtual tables to facilitate table joins and data access.
Remote data synchronization enables you to synchron ize (part of) the SAP HANA
database with remote site locations or mobile devices run ning SAP SQL Anywhere.
With other vendors, both types of federation technology are sometimes called a dis-
tributed database.
8.3.2 Scale-Up
As mentioned earlier, we recommend you scale-up before scaling-out. Scaling-up
provides three advantages:
• Better performance
Performance is better because most queries involve accessing multiple tables, and
making a join in-memory on a single system is always faster than joining across
nodes.
• Simpler management
Management is easier because only a single system will need to be installed,
updated, monitored, and administered; no shared storage and internal network
will need to be managed; no data distribution scenarios will need to be considered;
and end-to-end debugging and query analysis, if needed, will be easier.
• Lower cost
Ownership costs typically should be lower because you'll need less hardware (and
less management).
316
8.3 Scaling SAP HANA
Learn More
Supported scale-out configurations are listed in the SAP HANA hardwa re direc-
tory (http://s-prs.co/v488432) with specific scale-out configurations listed for SAP
BW/4HANA, SAP S/4HANA, SAP Business Suite, and SAP BW powered by SAP HANA,
as shown in Figure 8.3.
ft I Appliances .
Cettd1ed Certrti«I Cerbhed Supported
Enterprise WS HO Intel•
Storage Pb1f0tms Solutions Systems
•
2019-04-03
Narrow your Search Search Results <l$ of
Applanc:e conllguratloos for scale-up OMl8WoH/8W4H can also be used for scale·UP SoH/S4H.
for futther intormation see atJo Home ·> 'ab: Oe'•ilt..
0 Vend<>< 1089 appliance models found
e CPU Architecture
Ctrb'ht <I. Seale-up: 8WoH/8W4H/OM/SoH/S4H. Scallf"UP: SoH/S4H
e A.pp!ianct Type
lh!I SAS bullionS16 10 Intel Br~ll EX E7 Scale-up:
SoH/S4H
7.ST•B
I
SAP Business One
Scale--oot: BWoK/BW4H/DM
10Ti8
v
Scalt·ovt: S4H 12 9TIB
v
, Seale~:
12T1B ,/
B'WoH/BW4H/DM/Soff/$.CH
; Scale-t1P: SaH/S4H
14 10.S rie ,/
e CH111lcatlon Date
14Ti8 ,/
e file System
16 l2T1B
v
e ()perotingSystems 16T1B ,/
f> Ctttific.atlon Scenarios bullionS2 2 Scale-up: 256GiB
,/
8\VoH/BW4H,••
5120.B
,/
Figure 8.3 SAP Certified and Support SAP HANA Hardware Directory
8.3.3 Scale-Out
Although scale-up is the preferred and recommended solution, scale-out also has
some advantages, such as the following:
• High availability
A distributed system prevents single point of failure. Adding a node to an SAP
317
8 Data Architecture
HANA system creates a distributed system to protect your from downtime should
anything go wrong with any one of your systems. Creating a cluster is remarkably
easy to do. You'll use the same tools for the installation and administration of a
distributed system as for a single node setup. Host auto-failover is activated auto-
matically, and you can even add a standby system for additional protection. High
availability is discussed in Chapter 9, Section 9.9.
• Extensibility
The second advantage of scale-out is that you can extend your system beyond
>vhat is supported on a single node. If your single host system only supports 16 TB
of memory but one or more tables are growing at a rate that this limit will be
exceeded, scaling out might be your only option. In fact, with availability in mind,
you may want to scale-out before such limits are reached.
• Pricing
Although the general recommendation is to scale-up (the typical TCO of a single-
host system being lower), scaling up a high-end system comes at a premium. A dis-
tributed system of eight 2 TB hosts, 1.vith perhaps two additional hosts for standby,
may have a more competitive price tag than tvvo 16 TB systems with one system
serving as hot-standby host.
318
8.3 Scaling SAP HANA
responding. Fencing also comes in 1.vith this situation. If a host no longer responds,
the standby can be activated to take over, and at the same time, the original host is
fenced away from the data it previously owned. If the failed host suddenly reawakens,
it may try to participate in transactions, and two hosts will be accessing the same
data: a sure recipe for data corruption.
SAP HANA uses a separate network zone with dedicated connections exclusively for
internal communications. As with adding hosts to the distributed system or chang-
ing host roles from standby to worker, you can use the SAP HANA Lifecycle Manage-
ment (hdblcm) to configure the interservice communication in SAP HANA. For a closer
look at network administration, see also Chapter 9, Section 9.11.1.
Learn More
For in-depth coverage of the subject, see the following white papers referenced in
the SAP HANA Administration Guide:
• SAP HANA Storage Requirements
• SAP HANA Fiber Channel Storage Connector Adm in Guide
319
8 Data Architecture
Data tiering refers to the assignment of different storage and processing systems
(called tiers) based on data access freque ncy. In this context, we often speak about
data aging and use a temperature analogy with hot, warm, and cold storage (as
described in Chapter 2, Section 2.2.6).
Figure 8.4 shows data tiering options with SAP HANA. The hot store is in-memory;
the warm store is either a database (SAP HANA dynamic tiering) or fi le-based (SAP
HANA native storage extension).
I
Hot Store Volume Performance Price
I DRAM I GB
I Persistent Memory
I
I Extension Node
I I
I
TB ms -Sx
Warm Store
Mainly Read
Occasional Writes
I Native Storage Extension
I
I Dynam ic Tieri ng
I I
PB sec -25x
••
SAP Data Hub
Read On ly (Archived) EB min -sox
320
8.4 Dat a Tiering
The cold store is either fi le-based (HDFS) or raw storage, such as Amazon Web Ser-
vices (AWS) S3, Microsoft Azure Data Lake Storage (ADLS), and similar offerings.
In this section, we'll take a closer look at the different options available for SAP HANA
for managing multitemperature datastores.
321
8 Data Architecture
can leverage disk- or flash drive-based storage to increase database capacity (by
roughly four times) at a lower price. Think of SAP HANA native storage extension as
an intelligent buffer cache that stores pages of data both in-memory and on the per-
sistence layer (on a disk or a flash drive). Statistics about the buffer cache can be mon-
itored through system views, and an advisor is available to provide load
recommendations. Note that SAP HANA native storage extension is not activated fo r
your applications automatically (yet) and requires configuration and tuning.
Learn More
For more information, see the SAP HANA Administration Guide.
SAP HANA extension nodes provides another approach to data tiering for offloading
Jess frequently accessed data fro m the "hot" in-memory store to a "warm" store. The
architecture \Vas originally designed for SAP BW (initially for "powered by HANA" and
later SAP BW/4HANA) but now also supports native SAP HANA applications. SAP BW
manages data distribution and partitioning at the application server level, which
makes SAP BW an excellent candidate for this architecture. For native applications,
you'll need to write the code to perform data management yourself or use solutions
that apply these services, such as the DDO in the SAP HANA data warehousing foun-
dation (see Section 8.6).
The extension node is a regular host in a distributed system, with the same function-
ality, but with Jess strict memory and CPU requirements (the terms "host" and
"node" are used interchangeably in this context). SAP HANA sizing guidelines usually
recommend a memory to data volume ratio of 2:1, in other words, twice as much
RAM as the size of the database (the rest of the memory is reserved for application
code, temporary structures, processing, delta stores, etc.). For an extension node, you
can use a 1:I or even 1:2 ratio (200% overload). In other words, the data volume can be
much larger than the available memory, a major benefit of using extension nodes,
since less memory is needed. For SAP BW, even different hardware configurations are
supported for the extension node.
Technically, an extension node is configured by giving the host the worker_dt role
(other database roles are worker and standby}. The extension node behaves and is
322
8.4 Data Tiering
managed like any other SAP HANA host. Data can be moved to an extension node
using either the landscape redistribution tool in SAP HANA cockpit (and SAP HANA
studio), SQL, or the ODO tool, discussed in Section 8.6.
Learn More
For the documentation, see "Extension Node" (SAP HANA Administration Guide).
Tenant Database
Database
Column Table Extended Table
SAP HANA
323
8 Data Architecture
To install or update SAP HANA dynamic tiering, add/remove a host, add a host as
standby, and perform other platform management tasks, you'll use SAP HANA Life-
cycle Management (hdbl cm). For administration, including monitoring, backup and
recovery, system replication, etc., you'll use SAP HANA cockpit or SAP HANA studio
for the older SAP HANA 1.0 release.
The integration also applies to the following:
• Backup and recovery
• High availability through standby hosts
• Automatic host failover
• System replication
Learn More
For the documentat ion, see SAP HANA Dynamic Tiering for the SAP HANA platform
on the SAP Help Portal. To learn more about the product, you can sign up for the
openSAP course "Introduction to SAP HANA Dynamic Tiering" (2018).
Tutorials
To try out SAP HANA dynamic tiering for yourself, check out the tutorials on the SAP
Developer Center: "SAP HANA Dynam ic Tiering." For hands-on "how-to" video tutori-
als of the SAP HANA Academy, see the playlist SAP HANA Dynamic Tiering.
324
8.4 Data Tiering
Tenant Database
Hot Data
t Export
HDFS (Hadoop)
S3 (Amazon Web Services)
Azure Data Lake Storage
Google Cloud Storage
Dynamic Tiering
External Storage
325
8 Data Architecture
These protocols are a more recent type ofJDBC/ODBC implementation and enable a
direct connection between the application and the database. You have nothing to
install; hence, the protocol is platform independent, with no middleware required to
translate generic application calls to specific database ones. Apart from the Wire pro-
tocol, some additional advantages vvhen using this solution include the following:
• SAP Data Hub can access cold data at the record level, as compared to file level
access with the Spark Controller.
• SAP Data Hub supports data modifications, data analysis, and data joins with other
(cold) datastore sources, while the Spark Controller only supports read-only access
and doesn't support joins.
326
8.5 Data Distribution
"horizontally" means that that each partition contains a different set of rows. Parti-
tions are transparent to applications and managed by the database.
One reason why you might need to implement partitioning is to overcome the size
limitation of column-store tables: a mere 2 billion rows. A partition has the same
limit, but a table supports up to 16,000 partitions. If the math is correct, your table
now supports 34 trillion rows. More importantly, in most cases, is that partitioning
also provides great performance benefits. In a distributed system, partitioning allows
for load balancing. If many queries want to access the same table, with partitioning,
you can divide the processing over all hosts instead of a single host.
SAP HANA
Partitioning also allows operations to be parallelized, which means that a single task
can be done at the same time, in parallel as it is called, using multiple threads. To
return to our sales table, on host A, we could read the data for the Americas; on host B,
for Asia Pacific (APAC); and on host C, for Europe, Middle East and Africa (EMEA).
Parallel operations also improve the performance of delta merge operations, as these
operations can now work at the partition level and not at the table level. For this
reason, both single-host and distributed systems benefit from parallelization and
partition-level delta merges.
327
8 Data Architecture
The same applies to partition pruning, which improves query execution perfor-
mance. The two types of partition pruning are the following:
• Static partition pruning is based on the partition definition. The query optimizer
will use the WHERE clause of the query to optimize the query execution plan.
• Dynamic partition pruning is based on the content. This process is evaluated at
runtime using statistics and used by SAP Business Suite applications, for example,
for data aging.
For the best of both worlds, you can also implement a multilevel partitioning
scheme. In a multilevel partitioning scheme, you can partition by date to separate
warm from hot data and wrap then move to a hash partition to balance the load-just
one example. You can also go hash-hash, or range-range, or you can implement
dynamic range partitions or heterogenous partitions with some partitions store in-
memory and others on extended storage (dynamic tiering). Many choices can be
made.
Code Clinic
The fol lowing code is a syntax example for table partitioning:
CREATE COLUMN TABLE MY_TABLE (a INT, b INT, c INT, PRIMARY KEY (a ,b))
PARTITION BY RANGE (a)(PARTITION 1 <= VALUES < 5,
PARTITION 5 <= VALUES < 20, PARTITION VALUE = 44, PARTITION OTHERS)
328
8.5 Data Distribution
Learn More
For the documentation, see "Table Partitioning" (SAP HANA Administration Guide).
Rocord$ HOG!od Q
·--
. ........
,.,.
·--
· ~N:•
m · ~,.,.
· ~"'•
~
••
Figure 8.8 SAP HANA Cockpit: Table Redistribution Plan
329
8 Data Architecture
A more complete offering including job scheduling is provided by the ODO tool, part
of SAP HANA data warehousing foundation, discussed in Section 8.6.
Code Clinic
The fol lowing code is a syntax example for table placement:
CREATE COLUMN TABLE TABLE_A (COL_A INT PRIMARY KEY) GROUP TYPE ZFIGL
GROUP SUBTYPE CHANGE LOG
Learn More
For t he documentat ion, see "Table Placement" (SAP HANA Administration Guide).
330
8.6 SAP HANA Data Warehousing Foundation
Code Clinic
The following code is a syntax example for table replication:
CREATE COLUMN TABLE TABLE_A (COL_A INT PRIMARY KEY) REPLICA AT ALL
LOCATIONS
Learn More
For the documentation, see "Table Replication" (SAP HANA Administration Guide).
As shown in Figure 8.9, there a different ways to build an EDW with SAP HANA. You
can either use an application (solution) to build the EDW, or you can perform the data
modeling yourself using SQL with the help of some tools. For good measure, a mixed
approach, of course, is also possible. The SAP HANA data warehousing foundation
provides the tools to build a native SAP SQL data warehouse.
331
8 Data Architecture
Data Warehouse
Using
Application Integration Processing Database Using SQL
Application
Services Services Services Services
Mixed
SAP HANA data warehousing foundation was introduced in November 2015 with SAP
HANA 1.0 SPS 10. For the latest supported SAP HANA data warehousing foundation
2.0 release for SAP HANA 2.0, all applications have been updated to SAP HANA XS
Advanced.
The ins and outs of SAP HANA data warehousing foundation belong to the domain of
the data warehouse architect persona, which is out of scope for this book. However,
for the data architect, two tools included with SAP HANA data warehousing founda-
tion should be mentioned: the DDO and the DLM. DDO and DLM are native SAP
HANA XS Advanced applications and work well together with the SAP EA Designer
described earlier. SAP HANA data warehousing foundation also includes the Data
Warehouse Scheduler, the Data Warehouse Monitor, and an editor for native data-
store objects (NDSOs), which "ve'll describe in this section.
332
8.6 SAP HANA Data Warehousing Foundation
you're satisfied with the results, you can schedule and monitor your redistribution
plans.
333
8 Data Architecture
¢ .> Cl
TC_OtM20_F"SOP_t.io_rx_o • 0.
Add T•Sk Addc.leaO< Propenies ~ i 08
~ ........"" • ..••., ~
•'
SillllrittJP.....,
... (;)
,,.. -
~
£;..«111• flM1r~
al.,.
Ir.
-+
CW•M
_..,_
·- r-------1<
r ''"
..
b.-~""'
HOS0_9~T.K
...
N0$0_~1Tl.
...
&to.ii• ....,...~
( • ,
...
r
:
""" ....
<Provfde ONaipt:lon>
...
._..
EA_....,,.""
'
11::.
f0
Figure 8.10 Designing NDSO Flowgraphs in the SAP Web IDE for SAP HANA
Learn More
For the documentation, see SAP HANA Data Warehousing Foundation for the SAP
HANA platform on the SAP Help Portal.
A trial version of the SAP HANA data warehousing fo undation, including t he SAP EA
Designer, edition fo r SAP HANA, is availa ble as a preconfigured system (solut ion) on
the SAP Cloud Appliance Library, as shown in Figure 8.11. Here, you can deploy your
own instance in matter of minutes, all preconfigured with trial licen ses included, to
discover how these products can be used.
Visit the SAP HANA Data Warehousing Foundation topic area on SAP Community to
get started.
334
8.7 Summary
••
Installed Products
SAP HANA data warehou~ foundation 2.0
•
•• --- SAP HA.NA. p&aUonn edition 2.0
---
.
•
Rttease ~te: Update_ ~ Getting Started Gulde
Aug 2, 2018, 23.'00:00 30 (Ftb 13. 2019, 1S:16!14) Ill More Information
Figure 8.11 SAP SQL Data Warehousing Trial in the SAP Cloud Appliance Library
8.7 Summary
In this chapter, we covered SAP HANA's data architectu re and described scaling, data
tiering, and data distribution. The general recommendation is to scale-up before you
scale-out but, as we've seen, both approaches have advantages. The best solution to a
problem often is to proactively prevent the issue from occurring and to tightly con-
trol the SAP HANA memory footprint.
With data tiering, you can downsize SAP HANA memory requirements by creating a
"warm" datastore for less frequently accessed data. SAP HANA native storage exten-
sion and SAP HANA dynamic tiering are two of the solutions available to implement
this kind of data tiering. If you need to offload even more data on Hadoop storage or
cheap clo ud storage and data lakes, yo u can keep track of your data using SDA. From
this point, either you can choose the SAP HANA Spark Controller to connect to
Apache Spark or use the newer SAP Data Hub connecting with SAP HANA Wire
directly to an SAP Vora distributed runtime.
335
8 Data Architecture
If you must scale-out, how can you get the best performance? One responsibility of
the data architect persona is to ensure that data partitioning and data placement are
designed properly. In some cases, table replication might boost response times. The
DDO and the DLM tools from SAP HANA data warehousing foundation can assist you
with data tiering and data distribution management automation. Finally, the SAP EA
Designer is an excellent tool for creating diagrams, models, and other artifacts, for
documenting the current state of your SAP HANA landscape, or for collaborating on
designing the next iteration, SAP HANA 3.0.
In the next chapter, we'll change our focus again and look at how you can implement
the SAP HANA platform on-premise or in the cloud. Time to meet the data center
architect persona.
336
Chapter 9
Data Center Architecture
The experts look ahead.
- Gordon E. Moore
The ancient Greeks called architects "chief builders," and it's still an apt description
for the profession 2,500 years later. One can only master a skill by doing, th rough
experience and rigorous study of the available tools and techniques. This require-
ment certainly applies to the SAP HANA architect as well when sizing a new imple-
mentation landscape, when scoping a migration, or when drafting a network security
design. Experience counts, as does a thorough understanding of the concepts and
possible scenarios you may face.
Often, seasoned professionals fulfill in this role, the old men (or women) with beards.
A q uick-and-dirty job on sizing by an SAP HANA rookie might result in a pricy hard-
ware upgrade before the project is even finished. Opening all TCP ports in the firewall,
just for a second of course, because we couldn't figure out which client connection
endpoints need to be established, dangerously exposes a system to the evildoers of
the World Wide Web. Without proper preparation, running any enterprise IT system
is a hazardous affair. SAP HANA is no exception. Time to meet the data center archi-
tect.
In this chapter, we'll introduce you to SAP HANA data center architecture, describe
the role of the data center architect, and explore some of the tools used for perform-
ing their tasks and activities. We'll cover topics like SAP HANA sizing. deployment
options, standard appliances versus customized configurations, the latest hardware
technologies, operating systems, migration tools and services, high availability and
disaster recovery, system replication, landscape management, and network adminis-
tration.
337
9 Data Center Architecture
338
9.1 Roles and Tools
In Chapter 8, we covered the data architect persona. What's the difference between
the data architect and the data center architect? Sticking with the architecture meta-
phor, think of the data architect as the interior designer, and the data center arch itect
as the actual architect. The data architect is intimately familiar with the data and
knows how the tables are related, how the data can be partitioned and distributed,
and h ow the data ages. From a role perspective, the data center architect will have lit-
tle or no idea about what is inside the SAP HANA box. He or she primarily cares about
the hardware the system requi res, how to integrate SAP HANA in the overall enter-
prise IT landscape, and how to obtain what's called four- or five-nines availability
(99.999%), vvhile protecting the in-memory platform. All topics that are of no concern
to the data architect.
Both roles are equally important, and in practice, a single person or an entire team
performs both roles. For example, when your system needs to scale-o ut, both perso-
nas will need to work together closely as is the case vvhen designing data tiering (coor-
dinating hot, warm, and cold data) across m u ltiple systems.
9 .1.2 Tools
No Swiss army knife is available for the data center architect to assist in daily tasks,
but a few handy tools are worth mentioning. In Chapter 8, we described the SAP
Enterprise Architecture Designer (SAP EA Designer), edition for SAP HANA (and its
full client cousin SAP PowerDesigner), in the toolkit of the data architect. The data
center architect is likely to find this tool useful as well. You can use SAP EA Designer,
shown in Figure 9.1, to design your IT landscape, keep an inventory, and collaborate
with colleagues.
Also, SAP Solution Manager and SAP Landscape Management are two tools specifi-
cally designed to manage complete an SAP system landscape and all its business
applications and data warehouses. Although you can manage SAP HANA databases
with SAP Solution Manager and u se SAP HANA as its database ("powered by HANA"),
the scope of SAP Solution Manager (as any Basis administrator will know) is not
restricted to SAP HANA. We'll discuss both tools in Section 9.11.
339
9 Data Center Architecture
IT landscape v i+ v •••
• < CA + v
)
..•• Walldorf
S<e
Core
0
0-~ect °"'"""
~ •llo ~ )
i0
·.
1
. ·o
"'""" Name:
Code:
warldorl
WOF =
~ [?
,...,,
,_,.. ,-mp-act-..._
-,..,;: .
W' G tnl. Core
I @.fij@fflfj
-....
-
Oett lneegtedon
.......
Plattner·Rno
7
Olly: wa11<1or1
co..>uy: Ge,,.,..,y
Implementing SAP HANA is a project, and like any project, being successful will
require a plan. A great deal of information about implementing SAP HANA is avail-
able, and as data center architects, you'll need to be familiar i,vith this material. You'll
need to size the system correctly, that is, translate business requirements into hard-
ware. You'll need to understand the different deployment options, so you can select
the right one for your project. While potentially daunting tasks, you can engage with
SAP or with implementation partners to take advantage of years of accumulated
experience implementing SAP HANA. We'll discuss both of these processes in the fol-
lowing sections.
340
9.2 Implementation Overview
.....
"" .
kl lhs UllmlJllle- ll5SUI» fiat ~oiw hour- expea lh9 US-VO ol 10.000
ESS tmll "*'*"°'<•·O· C>WJ'lllp), 10,000 ESS tnldUn ~ ( .,g, CAJS. IN\09 ~ C*ton11 ¥llomwlion). 8fld
10,000 ESS IWOt eoerwlol C•.g. b'lv« ~).
I ISearch in Tree I
Messages
,Ptvw ..
f2I F"or t9MAl5 at d~ ~al!ion lewls, chooM allClllliw rffUlt ,......_
'"""' ~ Tf'M ,.._ Sya1*im f ~ ~~
• SAP~ SOlutlonl
• Ptqect k'lloi "W11io11 • ,..,.. SAP &.isi'less SoMiorv'Soltwar Coo •IPOI..,.. C SAP &ihss SoUionlSoltwlre C.0.1'4)0M(ll Exlemicn
• SAP 8uslnoS5 &mo You can cNnQe 'fOll cnoioe on !ht prOjoCI ~ (IJOSllOMaire. A CNnge may f'OQl.ite OU. ~
• <> SAP Aon
• SAPCRM
• 0
• !I
Financia'!s
Human Cepilal "'1'"t-
-
· o E~ TI'ltougl'lpul : ~ults tor lotrtw. CompoMMS
• <> Logllllcl ExlCUliotl SW~ ~~l CPU<:1L SA.PS~. 2.-) ~SAPS(ASAP) 08$>.PS SCUCleu.torAI
. 0 Ptoduct Dev. & Edoutlon ECCSERVER E~COttCOll\OOl"Mll{ECC) S •7.000 33.000 15.000 6
. 0 ,..... "s.Mct
•
·o"°""""........,
Figure 9 .2 Quick Sizer for SAP HANA
For migrations, specific SAP Notes include sizing reports attached, which need to be
executed on the source system. Different reports exist for the different versions of
341
9 Data Center Architecture
SAP Business Suite and SAP Business Warehouse (SAP BW), so make sure you select
the right one.
Learn More
The hardwa re sizing decision tree can help you learn about greenfield and imple-
mentations and productive sizing, including sizing terminology, FAQs, and a search
t ool for sizing specific SAP applicat ions, and is available at http://s-prs.co/v488433.
Sizing SAP HANA is documented in the SAP HANA Master Guide for the SAP HANA
platform. The paragraph conta ins links to t he relevant SAP Notes and the Quick Sizer
tool. For t he application server component, you'll need to consult the SAP HANA
Administration Guide. See the following resources:
• "Sizing SAP HANA" in the SAP HANA Master Guide
• "Platform Sizing in XS Advanced" in the SAP HANA Administration Guide
Learn More
To learn more about the SAP partner ecosystem, visit the SAP PartnerEdge portal at
http://s-prs.co/v488434. For the SAP Partner Finder, go t o http://s-prs.co/v488435.
342
9.2 Implementation Overview
Filters Reset
f) location
v
( All Countries
Welcome to the SAP Partner Finder
[ All States v The SAP Partner Finder helps you easily find accredited SAP partners who best fit
your unique needs.
Postal Code City
SAP Partner Type • Sell. Service. Build, and Run indicate the category of
partnership with SAP and Platinum. Gold and Silver show the status level of the
partner in the SAP PartnerEdge Program.
f) Partner Type 0
SAP PartnerEdge Platinum Partners · represent our most strategic and
All Partner Types v
global partnership organizations.
• Solution • SAP
Authorization
I AU Categories v
delivering consistent business value to SAP customers .
[ All Solutions v
The SAP Recognized Expertise designation shows expert partners who have
acquired a specialization. depth of experience and successful customer projects in
SAP Recognized Expertise 0
a specific area. SAP solution. or industry.
343
9 Data Center Architecture
You can deploy SAP HANA in your corporate data centers or in private/public clouds
and even mix and match these deployment options. Regardless of where you deploy,
the different technical deployment options depend on how you plan to deploy,
which determines the boundaries between servers, systems, databases, and applica-
tions "powered by HANA." In this section, we'll cover all the options.
It's increasingly common for enterprises to run different solutions in different cloud
environments and combine them with on-premise deployments. Thus, multicloud is
embraced by SAP as part of the intelligent suite strategy, and SAP HANA is positioned
as a hybrid and multicloud data platform. Although often confused or used inter-
changeably, "hybrid" and "multicloud" environments are not the same. A hybrid
cloud is a development concept and concerns combining microservices in a mix of
public and private cloud environments (both on-premise and cloud-hosted). Amulti-
c/oud environment is a strategic business decision perhaps made by a chief informa-
tion officer (CIO) who prefers not to keep all the eggs in one basket. With this
approach, you may be able to negotiate better deals for cloud services when working
with multiple providers, to name one potential benefit.
344
9.3 Deployment Options
like the Data Distribution Optimizer (DDO) from the SAP HANA data warehousing
foundation.
Multiple-host, distributed systems are supported both in on-premise and in virtual-
ized environments. However, in virtualized environments, single-host systems will
be much more common (both cloud-hosted and not}, due to the complexity ofvirtu-
alizing shared storage subsystems, virtual hosts, and virtual networks.
345
9 Dat a Center Architecture
words. m ultiple applicat ions can work off a single database and off a single server. as
shown on the far right of Figure 9.4.
I
Storage Storage Storage St orage St orage
Single (Tenant) Tenant Database Syst em M ult iple Components Multiple Com ponents
Database System One Database One System
{M COD) {MCOS)
You may wonder, then, what the relative benefits are with MCOD/MCOS deploy-
ments versus a tenant database system. This is, in fact, not all that clear. The business
case for the MCOD/MCOS deployments is not as strong as in the early days of SAP
HANA, before tenant databases. MCOD/MCOS deployments both p rovide better
resource usage compared to a single SAP HANA database system. One side effect of
MCOS, however, is overhead: All SAP H.ANA processes are duplicated. One side effect
of MCOD is privacy and security. MCOD and MCOS deploymen ts are a delicate topic,
and a dedicated SAP Note discusses the conditions and provides a white list of sup-
ported SAP applications. Tenant da tabases optimize resource usage for m ultiple
applications without the overhead of MCOS and the lack of isolation of MCOD-the
best of both 1.vorlds.
Another technical deployment option not included in Figure 9.4 is virtualization.
which we'll discuss in Section 9.3.S. This option puts a hypervisor layer between the
computer and the Linux operating system. You could virtualize every deployment
option, separate configurations aren't required. The SAP Cloud Platform, SAP HANA
service in the Cloud Foundry environment is a single tenant dat abase system (the
highlighted white box in deployment type 2), and from the SAP Cloud Platform cock-
pit, you directly access the tenant database. The system database is managed by SAP,
346
9.3 Deployment Options
and as a result, you won't be able to add additional tenants. In the Neo environment,
on the contrary, you could deploy a full tenant database system (dashed box in
deployment type 3) and add/delete your own tenants.
SAP Notes
For the SAP Notes on the SAP ONE Support Launchpad, see:
• SAP Note 1661202 - Support mu ltiple applications one SAP HANA database/
tenant DB
• SAP Note 1681092 - Mu ltiple SAP HANA systems (SIDs) on the same underlying
server(s)
Learn More
Tenant database concepts are documented in the SAP HANA Master Guide, and man-
aging tenant databases is documented in the SAP HANA Administration Guide, avail-
able on the SAP Help Portal.
347
9 Data Center Architecture
SAP Notes
For relat ed knowledge base articles on the SAP ONE Support Launchpad, see SAP
Not e 2101244 - FAQ: SAP HANA Mult itenant Database Containers (MDC). MDC was
the original name for what we now call "tenant databases."
vmware·
• Get ·out.of·tl'le-~ high ~i.ty or99.9" wotl'I autotnated r.,.,11 • ~ .n nours vs. d~"'''"' rapid and auton\&1ed ~
tOlt><aooe • Enwre C<ll'\Sls.~enc:y and ~b ty across environments through
• MAICll'r.QC uptime w<th ~IC ros.1.wt oncl fa1~r tcmpl.\10$
• l!xt>ttieflee zero 00wnt11·nt or daia ~sv.htf'I MiQIJ.!lil#lg •~
~lrOM "<>St tO l'IO«
348
9.3 Deployment Options
Technology Background
Virtualization technology has been around since t he early days of computing but
only reached a broad audience in 2005, when VMware launched a free player for vir-
tual machines on t he PC. Today, virtua lization is ubiquitous: All cloud-based comput-
ing is virtual ized, and we're now starting t o move to t he next phase w ith containers
and server-less computing.
Virtua lization separates computer hardware (processor, memory, storage, network)
from the operating syst em and allows you to create compute virtual environments
called virtual machines. In Linux terminology, the core of t he operating system, the
kernel, is also known as the supervisor, and since virtualization supervises t he super-
visor, t his is called a hypervisor. Different flavors of hypervisor are available. Some
hypervisors run on bare meta l (hard wa re), while others req uire an operating system
(software) or are a bit of both, like a Linux kernel-based virtual machine (KVM).
SAP HANA supports all three technologies, for example, VMware vSphere (software);
Fujitsu, HP, or Huawei physica l partitions {hardware); hybrid solutions like LPAR (log-
ical partitions) from Hitachi and IBM Power Systems; or KVM fro m SUSE and RedHat .
learn More
The virtualization topic is only briefly addressed in the SAP HANA Master Guide, while
solution-specific mat erial is covered in SAP Notes. All certified virtualization vendors
provide extensive documentation and best practices about running SAP HANA in
their environments.
SAP Notes
For related knowledge base articles on the SAP ONE Support Launchpad, see SAP
Note 1788665 - SAP HANA Support fo r virtualized/partitioned (multi-tenant) envi-
ronments.
349
9 Data Center Architecture
When first released to customers in June 2011, SAP HANA was only available as an
appliance, a delivery method SAP introduced for its SAP Business Warehouse Acceler-
ator (SAP BW Accelerator) some years earlier. Although this delivery method suited
SAP and its hardware vendors-appliances provide a tightly controlled operating
environment, which facilitates development and quality assurance and thus acceler-
ates in novation - not every customer welcomed this approach. To accommodate
customer requests and preferences, SAP introduced tailored data center integration
(TDI), which provides more flexibility and allows you to leverage your existing hard·
ware and infrastructure for SAP HANA deployments. Both appliance and TD! config-
urations are subject to certification, published in the SAP HANA hardware directory.
9.4.1 Appliance
A computer appliance is preinstalled software on predefined hardware. As SAP is not
a hardware vendor, the appliance delivery method required the involvement of dif-
ferent hardware partners. Fujitsu and HP were among the first to provide certified
configurations, followed by Cisco, Dell, and Hitachi. Models, CPU architectures, mem-
ory sizes, and other specifics are published by SAP in the SAP HANA hardware direc-
tory, shown in Chapter 8, Section 8.3.
Certifications expire, and new ones are added continuously, so be su re to check the
directory first. At the time of this writing (su mmer 2019), over 1,400 different certi-
fied appliances are listed, plus another 500 have expired. Under CPU architecture, for
example, you'll find the latest Intel Cascade Lake processors, preceded by Skylake and
Broadwell, and the no longer valid Haswell, Ivy Bridge, and Westmere architectures.
Memory configurations go up to 24 TiB, compared to 9 TiB for certified infrastruc-
ture-as-a-service (laaS) solutions. Different appliance types are available for scale-out
and scale-up, as described in Chapter 8. In addition, in the SAP HANA hardware direc-
tory, you'll also find a list of certified enterprise storage configu rations for network
attached storage (NAS) and storage area networks (SAN), the most common technol-
ogies used to provide remote storage to computer systems. With fiber optic connec-
tions, accessing remote storage is as fast as accessing local storage devices. However,
SAN and NAS provides a more manageable and cost-effective storage infrastructure
for enterprise environments.
350
9.4 On-Premise SAP HANA
All good news, of course, but the flipside of TD I is that the customer is now responsi-
ble for the proper installation of both the operating system and SAP HANA and for
getting the right kind of support and service from the hardware partner and OS pro-
vider. To support you in a TDI implementation {apart from the SAP HANA hardware
directory). SAP also introduced a certification requirement for the person perform-
ing the installation: SAP Certified Technology Specialist - SAP HANA.
In addition, the installation media contains a hardware configuration check tool,
which SAP strongly recommends using as part of an SAP HANA go-live check as
offered by SAP Digital Business Services. The hardware configuration check tool is a
command line tool, which checks whether your hardware (processors, memory, net-
work, storage) and software (required packages and updates) comply to SAP HANA's
requirements, as shown in Figure 9.6.
Learn More
For the details about the TOI program, see:
• SAP HANA Tailored Data Center Integration - Frequently Asked Questions
• SAP HANA Network Requirements -white paper (2018)
• SAP HANA Storage Requirement s - w hite paper {2017)
351
9 Data Center Architecture
SAP Notes
For related SAP Notes and knowledge base articles on the SAP ONE Support Launch-
pad, see:
• SAP Note 2613646 - SAP HANA TDI Phase 5
• SAP Note 2501817 - HWCCT 1.0 (2220)
ti' tOOC~m<»f<J.J7bl6l.mo..~orp:-'sJur"1onC!wd:lool 0 X
1~0-fc337b361:/hana/•n•tall/S£RVER/hard~areConf.9urationCheckTool t . / hwcct -f land•c ape_t • st_cf9_ t empla t e . jaon ~
hwcct-2. 00 . 041 . 00 .1560320256 (2019-06-12 08 , 26 , 49)
Configured tests:
1 EvalOS
validateCloeks ource •
For optimal performance and the fastest response times, SAP HANA greatly benefits
from using the latest hardware technologies, most of which are fairly obscure and
hard to digest without a PhD. However, you should be familiar with two specific hard-
ware technologies: Intel Optane persistent memory and IBM Power Systems. Many
other hardware technologies were good candidates for this chapter, but we decided
to put these two technologies in the spotlight.
352
9.5 Hardware Technologies
Technology Background
Persistent memory is a new technology, not to be confused with the NVRAM (non-
volatile random-access memory) we find in the BIOS of our PCs (ROM/EPROM) or the
fl ash storage from our mobile devices, USB drives, or SSDs. The technology was ini-
tially developed by Intel and Micron Technology under the name 30 XPoint and is
now commercialized as Optane (Intel).
DRAM and persistent memory access times are measured in nanoseconds (10-9 ), SSD
in microseconds (10- 6 ), and HOD in milliseconds (10- 6 ). At a human scale, if one CPU
cycle of 0.4 nanoseconds of actual latency is counted as 1 second of scaled latency,
the resu lt would be 4 minut es (scaled) latency for DRAM, 15 minutes for PMEM, 7- 17
hours for SSD, and 1-9 months for HOD.
Intel Optane DC persistent memory modules are available in capacities up t o 512 GB
per module. For DRAM, 128 GB is the maximum capacity but, because of availability
and price, 64 GB and even 32 GB modules are much more common. As long as prices
for large RAM modules remain high, persistent memory will promise a lower TCO.
This new technology brings several advantages to the SAP HANA database. Startup
times for large datasets have been significantly reduced, which is huge for both
planned and unplanned downtime. Persistent memory also impacts data tiering
architectures since you can now keep much more "warm" data in-memory and don't
have to offload tables to (extended) storage.
In addition, scaling considerations may also need to be reevaluated. In general, scal-
ing out is more cost-effective when commodity-style hardware is used versus the
premium hardware required for high-end scale-up systems. Unfortunately, getting
the same performance from a scale-out system is harder to achieve and requires care-
ful table placement, distribution, and maybe even replication to avoid saving money
353
9 Data Center Architecture
Code Clinic
Below is an example showing t he syntax creating a table with persistent memory
storage applied t o select ed colu mns of a table:
CREATE COLUMN TABLE PMTABLE (Cl INT PERSISTENT MEMORY ON, C2 VARCHAR
(10) , C3 INT PERSISTENT MEMORY OFF)
The fol lowing syntax example shows how to unload tables from memory:
UNLOAD PMTABLE DELETE PERSISTENT MEMORY;
Learn More
For more information about SAP HANA and Intel Optane DC persistent memory, visit
http://s-prs.co/v488436 and http://s-prs.co/v488437.
For t he docu mentation, see the SAP HANA Administ ra tion Guide "Persistent Mem-
ory" on the SAP Help Portal.
Support for PMEM hardware to store hot dat a in persistent memory is listed in the
feature scope description as a database services feature for both the standard and
the enterprise edit ion.
354
9.5 Hardware Technologies
SAP Notes
For related knowledge base articles on the SAP ONE Support Launchpad, see SAP
Note 2700084- FAQ: SAP HANA Persistent Memory.
Figure 9.7 shows the IBM homepage for the SAP HANA server infrastructure.
Learn More
For more information about SAP HANA on IBM Power Systems, visit http://s-prs.co/
v488438.
SAP Notes
For related knowledge base articles on the SAP ONE Support Lau nchpad, see SAP
Note 2055470 - HANA on POWER Planning and Installation Specifics - Central Note.
355
9 Data Center Architecture
SAP HANA on Power has thousands of customers in just 3 years. That"s the fastest
infrastructure adoption rate for SAP HANA anywhere. ,
When acquired as an appliance, the operating system running SAP HANA won't be
one of your concerns, since this will be the responsibility of the hardware vendor.
With the introduction of the TOI program described in Section 9.4.2, however, you are
now responsible to provide a proper configuration of the host environment.
Server-side, SAP HANA only runs on Linux, wh ich for those less familiar with operat-
ing systems is a Unix-like open source OS, first released in 1991 and with a market
share of roughly two-thirds of the server market. Because Linux is open source, many
different Linux distributions exist that bundle different functionalities, for example,
optimized to act as a web server or as a desktop computer.
356
9.6 Operating System Platforms
In this section, we'll briefly introduce the global technology partners SUSE and Red
Hat as enterprise Linux providers for SAP.
9.6.1 SUSE
SUSE Linux Enterprise Server (SLES) for SAP applications is an optimized Linux plat-
form for SAP NetWeaver, SAP HANA, and SAP S/4HANA. It's based on SUSE's primary
server Linux distribution and available for Intel x86 and IBM Power Systems architec-
tures, for both on-premise and cloud deployments.
As shown in Figure 9.8, SUSE promotes SLES for SAP applications as the reference
platform for SAP HANA, running 90% of the environments (and as the underlying OS
for the SAP Cloud Platform).
Products 6 Solutions Support 6 Services Partne rs Communitie s About Free Dow nloads
SAP ~ANA
357
9 Data Center Architecture
Technology Background
SUSE is a German software company founded in 1992 and markets Linux for enter-
prises. The acronym (originally SuSE) comes fro m Software- und System -Entwicklung
(Software and Systems Development) and is reflective of SAP's Systeme, Anwend-
ungen und Produkte in der Datenverarbeitung (Systems, Applicat ions, and Products
in Data Processing). SUSE's main distribut ion is SUSE Linux Enterprise Server (SLES).
For t he open source community, SUSE sponsors t he open SU SE project.
Learn More
SUSE has been an SAP global technology partner for over 20 years. For more informa-
t ion about SAP HANA and SUSE, visit http://s-prs.co/v488439.
For more information about SLES, see http://s-prs.co/v488440. This web page
includes links to best practice documents.
SAP Notes
For related knowledge base articles on the SAP ONE Support Launchpad, see SAP
Not e 1944799 - SAP HANA Guidelines for SLES Operating System Installation.
358
9.6 Operat ing System Platforms
shown in Figure 9.9. RHEL is available for both cloud deployments and the Intel x86
and IBM Power Systems on-premise architectures.
OATASHEET OOWNLOAD
• Award-winning Red Hat Red Hat Enterprise Linux for SAP Solutions features additional content specific to
support operating SAP landscapes. The core operating system retains the same kernel with
all SAP·related content delivered thrOt19h child channels. providin9 a consistent
infrastructure across SAP and non·SAP environments.
The RHEL for SAP Solutions subscription contains a channel for SAP applications and
one for SAP HANA. The following software components are included with the SAP
HANA channel:
• XFS file system
• Required C++ runtime compatibility libraries
• Tuned profiles for "sap-hana" and "sap-hana-vmware" (preconfigured operating sys-
tems for specific workloads)
• Resource agents for monitoring
359
9 Data Center Architecture
Learn More
For more information about SAP HANA and RHEL, visit http://s-prs.co/v488441.
SAP Notes
For related knowledge base articles on t he SAP ONE Support Launchpad, see:
• SAP Note 2397039 - FAQ: SAP on RHEL
• SAP Note 2009879 - SAP HANA Guidelines for Red Hat Enterprise Linux (RHEL)
Operating System
360
9.7 Infrastructure-as-a-Service Providers
between different SAP HANA offerings plus a multitude of other hosted SAP solu-
tions, like SAP S/4HANA, SAP C/4HANA, SAP Business Suite, and so on. For SAP
HANA, options include BYOL; SAP HANA, express edition; SAP Clo ud Platform, SAP
HANA service; and different trials for SAP HANA and SAP HANA-based solutions
through the SAP Cloud Appliance Library. To help you get started, AWS provides
excellent documentation and launch templates, as shoY1•n in Figure 9.10.
_,
aws a r1 English • ~
~
AW'S Oocum~ • Quid: Sbrt c.tadn. • SAP~ Quid: SUit •SAP HANA on the A'WS Ooud:: (Juldt Start All!fcrcnce Deployment
SAP HANA on AWS Q.
SAP HANA Quid: Surt SAP HANA on the AWS Cloud: Quick Start Reference Deployment
OoC\1-tMlon • Tllk Gukle B Deployment Guid e
~wch m SobarttSon Rodholuishnon, Harpreet Singh, and Kuong·Shjh Lee-Solutions Architects, Amazon Web
0 Homt: Strvkts
D Ocploymc::nt stc-p5 This Quick Start reference deployment guide provides det.ailed instructions for deploying SAP HANA on the
Amazon Web Services (AWS) Ooud by using AWS CloudFormation templates.. The Qul<k: Start builds and
0 Troubteshooting
configures the AWS environment for SAP HANA by provisioning AWS resources such as Amazon Elastic
0 Support Compute Cloud (Amazon EC2), Amazon Etastk Block Store (Amazon EBS}, and Amazon Virtual Private
0 S«urity Ooud (Amazon VPC).
0 Resourc~ This guide is for IT infrastructure architects, system administrators, SAP Basis architects. and SAP Basis
0 Appendix A:. Subscribing to RHEL f<w administrators who are ptannlng to Implement or extend their SAP HANA workto.ads on AWS.
SAP
Note
0 Appendix~ Subscribl1"'9 to SUS for
SAP If you a re implementing SAP Business One, version for SAP HANA, follow the instructions in the
0 ApP4J:ndi• C: St<urity gnwps
SAP Business One. vtrsion for SAP HANA, Quick Start refe<tnct deployment guide.
0 Fttdbadc If you have an AWS account and you're already famitlat with AWS services and SAP HANA. you can launch
0 Document revtslons the Quick Start to build one of the architectures shown in the Architecture section in a new or existing
virtual private doud (VPC). Each deptoyment takes 2S-60 minutes to complete, depending on the setected
configuration. If you're new to AWS or SAP HANA, please review the architectureSt read the implementation
details, and follow the step-by-step instructions provided later in this guide. If you want to take a took
under the co>Jers, you can ..new the AWS CloudFormation templates that automate the deployment.
Learn More
For more information about SAP HANA on AWS, visit http://s-prs.co/v488442. For the
documentation, see http://s-prs.co/v488443.
361
9 Data Center Architecture
SAP Notes
For related knowledge base articles on t he SAP ONESu pport Launch pad, see:
• SAP Note 1656250 - SAP on AWS: Support prerequisit es
• SAP Note 1964437- SAP HANA on AWS: Supported AWS EC2 products
Learn More
For more information about SAP HANA on Azure, visit http://s-prs.co/v488444 (with
links to t he documentation).
SAP Notes
For related knowledge base articles on t he SAP ONESu pport Launch pad, see:
• SAP Note 2015553 - SAP on Microsoft Azure: Support prerequisites
• SAP Note 2316233 - SAP HANA on Microsoft Azure (Large Inst ances)
362
9.7 Infrastructure-as-a-Service Providers
GCP Marketplace. SAP HANA BYOL is available as a single-host system (GCP uses the
term "node") and in multiple-host distributed scale-out configurations (on bare
metal hosts delivered through managed services).
Learn More
For more information about SAP HANA on GCP, visit http://s-prs.co/v488445. For the
different SAP HANA gu ides (for pla nning, deployment, operations, high availability
and disaster recovery planning, etc.), as shown in Figure 9.11, go to http://s-prs.co/
v488446.
0.. oocs Support console fi)
.......
Getting suP90tt f« SAP on GCP
SA.P HANA monl totfng agent user g uid-e
PrOYidet 1f"4tr1.1C110!\t for lftst*""9 •nd conf9Jrlft9 Google• MOM0M9 ~for SAPtiA."'A. ¥wflich •ltow• you lO
'tlf'W $AP HANA. S)'oltm mttrc:s in Googl• S1~kd~r J..loMonnCJ
SAP Notes
For related knowledge base articles on the SAP ONE Support Launchpad, see SAP
Note 2456406 - SAP on Google Cloud Platform: Support Prerequisites.
363
9 Data Center Architecture
Learn More
For more information, see t he following:
• IBM: http://s-prs.co/v488447
• Alibaba : http://s-prs.co/v488448
• Huawei: http://s-prs.co/v488449
SAP Notes
For related knowledge base articles on the SAP ONE Support Launchpad, see SAP
Note 380654- SAP support in public cloud environments.
9.8 Migration
There are many different types of SAP HANA migration projects. What is in scope all
depends on our point of departure and our objectives. Do we want to move our SAP
business applications from a more traditional type of database to SAP HANA, or is the
goal to upgrade a legacy database application? Do we vvant to change application ven-
dor and migrate a business application suite? Or do we want to go from on-premise
into the cloud and migrate the SAP Business Suite to SAP S/4HANA Cloud? Whatever
the source and target environment, migrations are rarely successful without a solid
plan. In addition, except maybe for the largest organizations with years of in-house
experience, most companies will prefer to involve SAP or one of its partners to lever-
age migration project expertise and benefit from implementing best practices.
In this section, we describe the most relevant migration topics relating to SAP HANA.
364
9.8 M igration
SAP
Oracle DB2
ASE
In the second wave, code splits vvere made to optimize the application code to run on
the in-memory platform with redundant aggregates and indexes removed. The result-
ing "simplified" code line was reflected in the "Simple" branding of SAP business
applications of this phase, like Simple Finance, for example. "Run Simple" was a major
365
9 Data Center Architecture
theme at SAP at the time and this also applied to the easier-to-use SAP Fiori user inter-
face (Ul) and other aspects of running your business. A little later the "S/4" branding
was introduced to clearly distinguish the suite of business applications from SAP R/3,
for example, SAP S/4HANA (SAP Business Suite for SAP HANA) and SAP BW/4HANA
(SAP BW for SAP HANA). At the same, development projects were started to optimize
the code for running in the cloud, \vhich gives us SAP S/4HANA Cloud and other cloud-
based applications.
Learn More
To download SUM, visit http://s-prs.co/v488450. For the documentation on DMO,
see Database Migration Option of Software Update Manager 2.0, User Guides for Sys-
tem Maintenance Tools on the SAP Help Porta l. The DMO guide for SAP HANA as tar-
get database is included as a PDF download.
SAP Notes
For related knowledge base articles on t he SAP ONE Support Launchpad, see SAP
Note 2644872 - Database Migration Option (DMO) of SUM 2.0 SP04.
366
9.8 Migration
Unlike SUM, the SAP Advanced SQL Migration tool is not part of the software logistics
family. This tool is available free of charge to SAP partners but for access and support,
you'll need to contact the SAP migration solutions team.
367
9 Data Center Architecture
Learn More
For more information about the SAP Advanced SQL Migration tool, check out the
information sheet "Simplify SQLDatabase Migration to SAP Databases" at http://s·
prs.co/v488451.
Learn More
For more information about the Database Migration Factory, see the information
sheet "Migrate applications to SAP Databases with Help from SAP and Partners" at
http://s-prs.co/v488452.
High availability and disaster recovery both cover business continuity and address
the question, "How much downtime can your business afford?"
High availability is a property of a system. You can eliminate single points-offailure
(SPOFs) by adding hardware and software redundancies to make the systemfault tol-
erant and by building infault resiliencies (i.e., the ability to quickly resume operations
after system outage). In these ways, you can try to guarantee uptime, often expressed
in an availability percentage, e.g. 99.99% (also called "four-nines availability"), which
is a maximum downtime ofl minute a week or less than 1 hour a year. High availabil-
ity involves hardware, software, and operations, not just a single product.
368
9.9 High Availability and Disaster Recovery
Disaster recovery covers the ability of a system to resume operations after earth-
quakes, explosions, wildfires, hurricanes, terrorism, blackouts, and so on. Again,
disaster recovery is a system property as well as a set of policies and procedures in
which the human factor plays an important role.
Two key SAP HANA measures for high availability and disaster recovery are as follows :
• Recovery period objective (RPO)
RPO defines the maximum permissible period of time during which operational
data may be lost and impacts, for example, your backup freq uency.
• Recovery time objective (RTO)
RTO is the maximum permissible time required by the system to recover. If a sys-
tem restore takes too long, you might need to implement synchronous system
replication.
A complete high availability solution for SAP HANA will involve the following ele-
ments:
• Hardware partner or cloud provider
• The operating system
• Data center management best practices
• Many redundant components
• Monitoring systems
The list goes on, with one thing in common-the solution is transparent to the SAP
HANA as a product.
Focusing on what the in-memory platform brings to the table to support high avail-
ability, let's look at the following benefits:
• Service auto-restart
Service auto-restart is provided by a watchdog process called the hdbdaemon. This
operating system process, part of each SAP HANA system and running on each
host, is automatically started and continuously monitors the availability of all the
other processes. If a process goes down, hdbdaemon will start that process up again.
• Host auto-failover
Host auto-failover provides fault recovery for distributed (scale-out) systems with
standby hosts. Like service auto-restart, host auto-failover is built-in and auto-
mated. When an active worker host fails, the standby host will step in, vvhich is per-
formed at the host level, not the service level and does not require any external
369
9 Data Center Architecture
Learn More
High availability is documented in t he "Availability and Scalability" chapter of t he
SAP HANA Administration Guide on t he SAP Help Portal. In addition, t he SAP product
group has published a number of white papers on the topic (see SAP Notes box).
An openSAP course is ava ila ble on t he high availability/disast er recovery topic: "High
Availability and Disaster Recovery with the SAP HANA Platform." Visit openSAP.com
website for the latest information.
370
9.10 System Replication
SAP Notes
For re lated notes and articles on the SAP ONE Support Launchpad, component HAN-
DB-HA, see:
• SAP Note 2057595 - FAQ: SAP HANA High Availability
• SAP Note 2407186- How-To Guides & Whitepapers For SAP HANA High Availabil-
ity
9 .10.1 Configuration
To configure system replication, you can use a command line tool, the familiar
administration environment of SAP HANA cockpit (or SAP HANA studio, for earlier
releases), or SAP Landscape Management. You'll need to define the log replication
task in one of the following modes:
• Syn chronous in m emory
Transactions are committed on the primary system after receiving a response
from the secondary system that the log was received and stored in memory.
• Syn chronous on disk
Transactions are committed on the primary system after receiving a response
371
9 Data Center Architecture
from the secondary system that the log was received and persisted (written to
disk). This approach guarantees consistency but delays the transaction slightly.
With the synchronous in-memory mode, data loss could occur when both systems
fail at the same time. Synchronous on disk mode can run with the full sync option,
which requires log buffers to be persisted on both the primary and secondary sys-
tems.
• Asynchronous
Transactions are committed on the primary system after sending the log without
>vaiting for a response. No commit delays will occur, but this mode is more vulner-
able to data loss.
You'll need to balance both RPO (data loss) and RTO (downtime) with performance
considerations and site location. In the case of the primary system no longer being
available, you can configure the secondary system as the new master in an operation
called a takeover. Takeovers can be made transparent to client applications that sup-
port invisible takeovers. A takeover with a handshake ensures that the secondary sys-
tem is fully in sync with the primary system before the takeover is executed, thus
avoiding the possible data loss that comes with synchronous in memory configura-
tions. When connectivity to the primary system has been restored, you can then per-
form afailback operation, which means that the original primary system is made
. .
primary again.
Another interesting feature of system replication is secondary time travel, which
enables you to access, on the secondary system, data already deleted in the original
system. You can achieve this time travel by stopping the secondary system and then
restarting at a specific time stamp. You can then replay log entries until the you reach
the point you want to capture, for example, just before some important delete oper-
ation. When done, you can restart the replication in normal mode again. While you
travel in time, logs continue to arrive from the primary system, so you must have
enough disk space to allow for this continued operation.
372
9.10 System Replication
2) to the primary system in data center A (tier 1) and connect the secondary system in
data center C (tier 3) to the secondary system in data center B, not to the primary, add-
ing another level of redundancy and avoiding single points-of-failure.
Asynchronous Asynchronous
Primary (A) Secondary (C) Secondary (E)
Synchronous Synchronous
373
9 Data Center Architecture
Learn More
SAP HANA system replication is documented in a dedicated guide on the SAP Hel p
Portal, which explains basic concepts, how to set it up, how to perform takeover and
failback, secondary time travel, operation and maintenance, troubleshooting, secu-
rity aspects, and a system view reference.
SAP Notes
For related notes and articles on the SAP ONE Support Launchpad, component HAN-
DB-HA, see:
• SAP Note 1999880 - FAQ: SAP HANA System Replication
• SAP Note 1984882 - Using HANA System Replication for Hardware Exchange
with minimum/zero Downtime
• SAP Note 2405182 - List of Analytical Apps that are enabled to read from Active/
Active (read enabled) SAP HANA node in SAP S/4HANA
Data centers and cloud computing can't exist without a network. A network is a cen-
tral component in any data center architecture and is essential to performance, secu-
rity, and business continuity of enterprise applications. Network administration is a
huge topic, of course, even when restricted to SAP HANA networking.
Landscape management provides a set of tools, a suite ideally, with all pieces acting
in harmony. For SAP, landscape management contains the following tools:
• SAP Solution Manager: Addresses application lifecycle management for SAP busi-
ness applications.
• SAP Landscape Management: Enables running SAP systems on virtualized and
cloud infrastructures.
Although not specifically designed for SAP HANA, both tools run on the in-memory
platform and can be used to control different aspects of landscape management.
We'll discuss both tools in the following sections, but first, let's take a closer look at
network administration.
374
9.11 Network Administration and Landscape Management
375
9 Data Center Architecture
default, SAP HANA systems count three separate network interfaces to enable the
establishments of the different zones.
Learn More
For more informat ion, see t he "Network Admin istration" chapt er in the SAP HANA
Administration Guide and network-related chapters in the SAP HANA Security Guide,
all fo und on the SAP Help Portal.
Additional information is presented in the SAP HANA Network Requirements white-
paper (2018).
SAP Notes
For related notes and articles on t he SAP ONE Support Launchpad, see:
• SAP Note 2477204 - FAQ: SAP HANA Services and Ports
• SAP Note 2222200 - FAQ: SAP HANA Network
376
9.11 Network Administrati on and Landscape Management
o.tlntel bV SAP
......
R~ Rtpliea1ion Status Contigur...
......
Update SAP HANA
Learn More
For more information about SAP Landscape Management, visit the expert page for
the SAP Landscape Management topic on SAP Community.
SAP Notes
For relat ed notes and articles on the SAP ONE Support Launchpad, see SAP Not e
2050S37- Support for SAP HANA in SAP Landscape Management.
377
9 Data Center Architecture
y « :
Overview
. ~ F\j Screen On/00 ll) Aelresh ~
'9 . :::;::: :::=:: 11 . ~ S'f'lttmConflgur • ~· SAPFRtl vt:cal!Y.lbdb 02 Last.refresh 1,. 01. 2..,
IOSyKtmFRN ~""
=..:.:
~~·~
~·~·""
::::
'~=--~~~~~~~~~~~~~~~~~~~~~~~~-
OJrrent Aleits
SAP HAJlA database: cmabase Adtl't'llStraDOn Oi>e1'3ti0nal State 1 WjOOk'QS w ·t b HIGH pri:IBy
.., . , OJrrent Status
61 ser.;crs ift maed
•P.i.!!l<I!"'
"" 9il. """'
Ptrlom'QtlCt
Start Tme Of Fht Stowted S.MCe
Sort rme Ol l.ast: St1tted SeMCe
16.04.2019 J3:S8;36
16.07.2019 1'1:10:41
• Threads
• Exi>tt1M Sottmtl\tJ
• Aetlve Stltemet'lts Producoon System
• SQl Plan Qche Yes ( SystemD) • H09)
• lCHd History
.......
-
• t.ono-Runnno SVR't m OotfitiOtlS Vef110n 2.00.0)1.00.1SJ974§299 Ch/.hl!'!a2soOJ l
>• Peffonnance Mrehouse 17.10.2018 05:41:35
>• Con~mbn SUSE IJ"lll)( Entf:rprlse ~ 12.•3 ( U1IOX_
>• Jobs G009~
>• Diagnostics
>• Svste.m Wotn'latiOn • ,!!),
>• DOOJmenQtion
"' ml System und.iae>e
• Svstf'm Confbuntion
• oatatiase Conne<:tions
Database Memory and CPU Database Dist usaoe
• OB connection MontOf
• Cen~I catendar
-'---- -----'
• t.andSQOt S.l>Hof'l(OtrlO
CWURqt
28;80 GB/ 194..00 GB
I
t oo vollme SxtlPo!s Su -====,.,
31,13 G8/ 91,97 GB
378
9.12 Summary
Although you could use the OBA Cockpit for SAP HANA monitoring and stop/start
operations, the OBA Cockpit does not provide the tenant provisioning and system
replication support of SAP Landscape Management, which, on the other hand, does
not provide end-to-end tracing of the entire stack and the root cause analysis.
Learn More
For more information about SAP Solution Manager, visit the product home page to
find out what's included and learn about the latest features or visit the more focused
SAP Solution Managerfor SAP HANA page on the SAP Support Portal.
SAP Notes
For related notes and articles on the SAP ONE Support Launchpad, see SAP Note
2222220 - FAQ: SAP HANA DBACOCKPIT.
9.12 Summary
In this chapter, we've covered the different aspects of SAP HANA data center architec-
ture and looked at sizing, technical deployment options (MCOD, MCOS), database
tenants (MDC), virtualization, appliances, and the data center integration program
TOI. We highlighted the latest hardware innovations in persistent memory from
Intel, described the alternative processor architecture of IBM Power Systems, and
provided an overview of the supported SUSE and Red Hat Linux operating systems.
Several infrastructure-as-a-service providers were introduced-AWS, Microsoft
Azure, and GCP (the hyperscalers)-that enable you to run SAP HANA in the cloud.
Next, we looked at migration from AnyDB, SUM OMO, and the SAP Advanced SQL
Migration tool together with the migration services provided by SAP Digital Business
Services and the different SAP service partners as well as global SAP hardware and
software partners. We looked at high availability support, business continuity, and
system replication. And finally, we addressed network administration topics and
landscape management with SAP Landscape Management for SAP systems and SAP
Solution Manager for SAP business applications.
Now that we've met the different SAP HANA personas, for the last chapter of this
book, we'll look at some of options for training and product support as well as oppor-
t unities to connect.
379
Chapter 10
Training and Support
Je gaat het pas zien als je het door hebt.
(You 'II only see it, when you get it.)
- Johan Cruyff
In this final chapter, \ve'll return to the topic of training and support. In the previous
chapters, '"'hen and where appropriate, '"'e listed relevant resources for further infor-
mation, training, books, and tutorials. In this chapter, we'll take a broader perspective
for a comprehensive look at your training and support options.
We'll begin by listing and describing the available SAP HANA courses from SAP Edu-
cation and also the different SAP HANA certifications. For those less interested in cer-
tification, or maybe with a more restricted budget, we'll also explore options for free
online training, like the free openSAP courses and the SAP HANA Academy tutorial
videos on YouTube.
We'll continue with a look at the different services offered by SAP Support and the
SAP service organization and also describe some of tools available to you, in particu-
lar, the SAP Support Portal.
In the last section of this chapter, the final part of this book, we'll venture out into
wider world of online communities, events, and alliances. As you'll discover, hun-
dreds, even thousands, of events are organized each year by SAP, its partners, and
others, where you can meet fello'v travelers on yo ur SAP HANA journey.
10.1 Training
What do you want to learn today? The SAP Education website welcomes you with this
question followed by a large search bar to help you find answers as quickly as possi-
ble. With over 1,500 products on the shelf, what's on offer might still be a little intim-
idating fo r the uninitiated, for those new to SAP in general or ne\v to SAP HANA in
particular. In this section, we'll cover what you need to know about SAP Education.
381
10 Training and Support
We all know that the best things in life are free, and this includes free training. Gone
are the days when the only option for SAP training was to travel to an office to attend
classes; now you can get excellent online training, free of charge. You might be fam il-
iar with massive online open courseware (MOOCs) from platforms like Coursera and
edX. SAP has a similar offering, called openSAP, which we'll describe in this section.
Additionally, for less-structured learning, free online training is also available on
YouTube with tutorial videos from the SAP HANA Academy, the SAP Technology
channel, SAP Community, and other channels.
Learning Journeys
SAP Education has offered courses on SAP HANA since the very first releases, and
today, the curriculum is comprised of several learning journeys. A learning journey is
a suggested sequence of courses, and a visual guide, that may include certification.
Three learning journeys are available for SAP HANA:
• SAPHANA
• SAP HANA data provisioning
• SAP HANA modeling
Different tracks for developers, administrators, and consultants cover the relevant
skills and topic areas, similar to the personas we've used throughout this book. Figure
10.l shows the developer track for the SAP HANA learning journey.
Learn More
For more informat ion about learning journeys and to access a search t ool to help you
fi nd the right learn ing j ourney out of the 200 currently available, visit http://s-prs.co/
v488453.
382
10.1 Training
Become competent
The content you will find here provides you with in·depth knowledge of the topic, and provides you with the option to become cert1hed.
l ABAP p<ogramlng certiflcatkln track tor specialists. F« details ple;ase Check ctn1fiie.atjc)n t•c.
I
,~.t._fo_Cl_~--~J l.t. fo Cl ~ , ,'- o _
.t._ (c:_ Cl_ _ ~I liJ
l SAP HANA tUtive Oevolopmont corbfic:1ti0n tracks. f°' dttOillS please chock certification tile.
~ C_HANAOEV
Application
Development for SAP
. I SAP Certified Development Associate
•
HANA
ri1 Cf!rtsflC.1tJoc'I (3 h)
~ SAPHA.NA2.0
_J
Nol 5'.We what to eit;>eet? Check out our sample quesbons1
'--------------~1~
Stay current
Want to ensure you stay in the know? Here you will find the content you need to stay up•lo•date.
•
~ Thers 1t! Col'lgratulattons on completlf'\8 the ~.lrnine Journey!
383
10 Training and Support
Learn More
For more information about t he SAP Learning Hub, visit:
• http://s-prs.co/v488454
• http://s-prs.co/v488455
To t ry out t he SAP Learning Hub, go to:
• http://s-prs.co/v488456
384
10.1 Training
~ overview More •
OveMew Start Leaming • A$k Oue$tions Join Live Sessions Videos About this Room
Training Courses
If,.ye zoom in on SAP HANA, what courses does SAP Education have available for us?
Table 10.l Jists some currently available courses. The course name typically includes
the release, for example, "SAP HANA 2.0 SPS 04", which has been left out so we don't
overload the table. The course code is not release specific and serves as a good label
for searching inside the SAP Education website.
HA 100 Introduction 2-day overview cou rse cove ring architecture, modeling,
data management, and development.
HA200 Installation and 5-day det ailed cou rse covering installation, system
Adm inistration administration, backup and recovery, conf iguration and
troubleshooting using the SAP HANA cockp it.
385
10 Training and Support
HA201 High Ava ilability and 3-day advanced course covering scale -out, system rep li·
Disaster Tolerance cation and multitenant database container (MDC) sys-
Administration tern management.
HA21S Using Monitoring and 2-day advanced course covering troubleshooting, root-
Performance Tools cause analysis, SAP capture and replay. and work load
management.
HA2SO Data base M igrat ion 2-day advanced course covering the Database Migration
Option (OMO) of the Software Update Manager (SUM)
for system maintenance of SAP systems.
HA3SO Data Management 4-day advanced course covering federation and extract,
transform, and load (ETL), for example, SAP HANA smart
data access (SDA). SAP HANA smart data integration
(SDI), SAP HANA streaming analytics, and SAP Land-
sea pe Transformation Rep lication Server.
HA400 ABAP Programming 3-day advanced cou rse focusing on how to develop and
for SAP HANA optimize ABAP code for SAP HANA.
HA4SO Application Develop- 3-day advanced course covering native development for
ment for SAP HANA SAP HANA and the SAP Cloud Platform (OData, SAPUIS,
Node.js).
386
10 .1 Training
Figure 10.3 shows the search results for the SAP HANA software solution guaranteed
to run at the time of writing. Products "powered by HANA" like SAP Operational Pro-
cess Intelligence or SAP Business Warehouse (SAP BW) are also listed, which explains
why over 200 trainings exist. Th e complete list without the Guaranteed to Run filter
also includes (free) openSAP courses or special formats (half-day trainings).
Software solution v
HAlOO • SAP HANA Introduction
SAPS/4HANA
Sc$$JO/t$ filtered/
SAP HANA Sessions >
SAP BW/4HANA
SAP BW powered by SAP HATD20 · Delta Course SAP HANA LO to SAP HANA 2.0 Installation
and Administration
Availability )
Country )
Se5Sions >
Language )
Classroom HA201 • SAP HANA 2.0 SPS03 ·High Availability and Disaster
Tolerance Administration
Timeframe )
Sessions fl/terl!d!
Sessions >
Sessions filtered!
Sessions filtered!
Figure 10.3 SAP Educat ion : Search Results for SAP HANA
387
10 Training and Support
SAP Certification
Getting certified can provide a boost for your career, and SAP certifications are highly
valued assets on the job market. Yet not everyone is a certification enthusiast. Some
will say that exams only test your knowledge and not any experience-a driving the-
ory test, not a driver's license. While true for most IT certification programs (and we
can certainly empathize 'Nith a seasoned professional failing an exam for lack of
study). the opportunity to become certified is a good one, allowing you to review all
the topic areas and get out of your comfort zone. You're not likely to pass any SAP
HANA exam without serious study regardless of ho"llv many years you've been work-
ing vvith the platform. The questions are too specific and too detailed, so you need to
have done your homework and peruse the small print in the manual.
Only SAP certifies SAP HANA. In other words, a direct link exists between SAP HANA
certification and the associated SAP HANA training courses. However, participation
in any of the trainings is not a requirement. As most of the material is also covered in
the freely available SAP HANA documentation, you should be able to pass studying
the guides alone. If you take this approach, make sure you carefully parse the topic
area description of the exam and maybe do\vnload the course index of the associated
training, so you know exactly what to study and what to skip.
Before starting your preparation, ahvays check the certification page on the SAP Educa-
tion website. Figure 10.4 shows an example for the C_HANATEC_lS exam, but check the
website for the most recent version. On this page, you'll find information about topic
areas on the exam and their relative weights, so you'll know where to focus. For each
topic area, the associated training courses will be listed, and you'll also find sample ques-
tions, exam duration, and cut score. You can book an exam directly from SAP Education.
388
10.1 Training
Description Notes
• Thi "$\PC..MoHI fll(hi IOlotJi A~'OCi* • SAi' HAMA • to-~SAl>•-••dteo<•••llS Book this product to consume
l.0-(~............4.n """ .,. wnctdlo'* ed.1Ub0n~M$.-'CllWW:ls-on. .~·to ......
·-
"'"''"W.1"-~ecl ~ l'lll>e•NOl t"'- $A1' .... )'Ollf (lf!1dgl)Ot1 t:Un't. Ql.lln"°"'... tnt )'OIJI"
within Certification Hub
HANA 2 0($PSOJ') lo; lhe ~ ot M $AP KAMA .lbol1f1 IO "'1tly ltlf ~ )'Ool " - ptlt(t n See alleert1f1cahons 1nduded 11'1
teit:hrldoet ~ '"" (~ bo.Mdt Oft ....
~ioC.,iOoO. . . P*tthrqll~etW..-..'iA You-l'IOllllCoooed!Ouwo..,,...._ _ __ subscription
,...._ 9f'ld .,,...,.,.r'"911
tiy .,,~1.oe.i t.o~
•
W-WU.W'!A.ut.M)l'llftt(noKU»IO~
""'IM .wi SN> HI.NA fl"Qjk'l INl'f\..........,. &ol ~~Ol'IO..,$APJ>')lf!l'fl). 0 CER006 • SAP Certif.cation an the
~tPP"n--~~fl"9Ctc.lltyll't
~LF"'1hlfm«e. ~·SAP~T.,.,,..,. C'-'
Auoc...tt • SAP l'.AHA io· (-11e:MlOll _ _..,'"-
,,,. ,,,.~1.i....1.,.~•~SAP " Unrt~ States of Amfl'"iCJI
HAN4 t.....,...i by h (WoMlol at! SAPHANA
l«tw>olQO'~ Q Cert1t1ealiot1 H ub Subscl'1pt.on
Topic Areas
""-""""°""'""'~lll'l~lhlt"';8)'"9-W"""'.... 9"W111~-"""~INl-l'--ft,_....,..,,
nOI COM~ e lt&JlotftMt (LWl't. $~,............ il!e rWI: 10 "'(IC!Me " " t Ul'l'I ~ (IOl*t.i1Mf1"4. *"Chl'IW) el.., U... 'K Add lo basket
..ttAZ00(SAPIW"A2-09'S03)
389
10 Training and Support
Table 10.2 shows the currently available certification exams. The xx in the name
stands for the exam edition as each edition matches a specific SAP HANA release. Two
levels of certification are offered:
• The associate certification is the entry-level exam and certifies that you know the
core (the C in the exam code) concepts. The exam consists of 80 questions, and
you have 3 hours to complete the test.
• The SME or subject matter expert exam (E for expert) contains 40 questions with a
90-minute time limit. This certification comes on top of an Associate certification.
So, if you already hold an associate certification for ABAP, you can enhance that
certification with an SAP HANA SME certification, for example, E_HANAAW_xx, to
demonstrate that you can successfully apply your ABAP skills to SAP HANA.
Currently, no professional certifications for SAP HANA exist, but from time to time,
delta (D_)exams are offered, also with 40 questions and a 90-minute time limit.
All SAP certifications remain valid for the past two versions. Because of the quick
sequence of SAP HANA releases previously, twice a year, SAP HANA certifications had
390
10.1 Training
quite short lifespans. Fortunately, as we've seen, as of 2018, only a single release will
be issued each year, so your certification remains valid for a more reasonable 3 years.
You can share your achievements with Acclaim from a third-party organization.
Acclaim uses digital badges in the Open Badges format, enabling you to show off all
your certifications from SAP, IBM, Microsoft, Oracle, and so on in a single place. Digi-
tal badges are also available (when enabled) on your SAP people profile.
Learn More
For more information about SAP Education and SAP certifications, visit http://s-
prs.co/v488457.
openHPI
The HPI, founded in 1999, is Hasso Plattner's privately financed institute, associated
with the University of Potsdam and focused on IT systems engineering. openHPI was
launched with the course "Jn-Memory Data Management" taught by Hasso Plattner
himself. The course lasts for 6 weeks and focuses on the management of enterprise
data in column-based, in-memory databases.
The history of enterprise computing and the characteristics of enterprise applica-
tions are addressed, while changes in hardware and other topics we briefly discussed
in Chapter 1 and Chapter 2 are covered in this course in detail. For a solid understand-
ing and to go more in-depth into topics like tuple reconstruction, materialization
strategies, and aggregate functions, this course fo r you. Figure 10.5 shows Hasso Plat-
tner in action. Although SAP HANA is not mentioned explicitly, Hasso Plattner does
talk about the blueprint of the SanssouciDB, which was the noncommercial univer-
sity prototype for SAP HANA. You can still watch the original course on YouTube, or
better yet, enroll in the 2017 edition, with updated material.
391
10 Training and Support
..
Figure 10.5 openHPI: In-Memory Data Management, Prof. Hasso Plattner
Learn More
For more informat ion about openHPI, visit openhpi.com. For t he "In-Memory Data
Management" course (2017 edition), see http://s-prs.co/v488458.
open SAP
Following up on the success of the openHPI course, SAP launched its own MOOC plat-
form, aptly named openSAP, to provide free training and promote SAP innovations.
The focus, this time, was on software development for the SAP HANA platform, and
the first course was taught by Thomas Jung, chief product expert at SAP HANA prod-
uct management at the time. If you're interested in the topic, you can still watch this
course with updated content today.
Not all openSAP courses are about SAP HANA of course, as you'll find courses ranging
from analytics to user experience. However, a fair number of courses have SAP HANA
392
10.1 Training
as a main ingredient, and we'd like to h ighlight a few. For starters, we highly recom-
mend "An Introduction to SAP HANA by Dr. Vishal Sikka", already mentioned in
Chapter 2. The course is short but provides unique insight into the genesis of SAP
HANA and concisely summarizes its key strengths. In the first part, Vishal Sikka talks
about how he came up with the name of HANA as short for "HAsso's Nevv Architec-
ture" while driving home from his Palo Alto office after having just returned from a
vacation in Hawaii.
Another interesting short course is "Jn-Memory Data Management in a Nutshell."
This course summarizes the 6-week openHPI course mentioned earlier in a little
under 2 hours, enough to give you a good understanding of the basic concepts of in-
memory data management yet indispensable when pursuing further training in the
domain of SAP HANA development.
Other SAP HANA-related courses are more specific to the different roles we've dis-
cussed in this book, and we've listed a number in Table 10.3.
Persona Course
All "An Introduction to SAP HANA by Dr. Vishal Sikka" (20 14).
Administ rator, enterprise "High Ava ilability and Disaster Recovery with the SAP
architect HANA Platform" by Prasad lllapani, et al. (2016).
This course covers high availability and disaster recove ry
concepts and support, including backup and recovery (3
weeks).
393
10 Training and Support
Persona Course
Business architect, data archi- "Introd uction to SAP Enterprise Architecture Designer"
t ect, and enterprise by Volke r Saggau, et al. (2018).
architect The cou rse introduces and the too l and covers main
usage scenarios (4 weeks).
394
10.1 Training
Most of these courses are taught by the SAP HANA product managers in charge of the
specific product or technology of the course, like the "Prepare for Your SAP HANA
Certification - Development Associate" course taught by Thomas Jung, as shown in
Figure 10.6.
I >Course
Discussions
>Reactivation request
Introduction to C_HANADEV_ 14 Certification Exam
.......... ,.,...,
• Mch"8 1\¥1 a piKe of papet
eo..w -~.,..~
·-···------ -
........>#.A "" . qt.,, r;........,.......... """"'-
.....,I. '-'"'""'" .... .....i • • U(..,...•• - +• .-
I @ Some subUtles f<>< th;s video have been maeh;ne-t,anslated: Ge, man. F•ench. Span;sh
<Previous
..
Fig ure 10.6 open SAP: Pre pa re for You r SAP HANA Certification
If you finish the whole course, or at least a substantial part, you'll receive a confirma-
tion of participation and a digital badge, as shown in Figure 10.7. If you get enough
points for the tests and the final exam (which should not be too hard for most
courses), you'll get a record of achievement with your score, which you can share on
your SAP profile, on Linkedln, or through other social media channels.
395
10 Training and Support
Learn More
For more information about openSAP, visit https://opensap.com/.
396
10.1 Training
- HOME
SAP HANA Academy
55.450 subKribtrs
>
........
Welcome to the SAP HANA++ Academy
Corne o\nd Join us and substrlbt to our channel. Thank you for
watching.. Video by t~ SAP HANA Academy.
AEAOMM:E:
Featured Pleytists
SAP Cloud Platform Multlt enant SAP Leonardo lntemet of Things Using SDI ln the SCP HANA SAP Cloud Platform Oh:eo"fl)' SAP Cloud Platfotm De¥eloper
Business Applicotions SAP HANA A~dcm( SeNlce Center Onboarding
SAP HA.HA Acad«ny VIEW FlA.L PUY\.IST SAP HANA Academy SAP HANA Academf SAP HANA Aea<lemy
VIEW FULl PLAYUST VIEW FVLL PLAYUST VIEW FUl.L Pl.AY\.1$T VllW FVl.L PLAYUST
YouTube Playlists
The channel is divided into several sections, and after Featured and What's New, sec-
tions closely map to our SAP HANA personas: Database Management (database
administrator), Modeling and Analytics (data analyst), Provisioning (data architect),
Application Development and Delivery (application developer), Predictive Analytics
(data scientist), and more. In each section, you'll find a collection of playlists where
related tutorial videos are bundled. Some playlists cover a more generic topic (SAP
HANA security) while others cover specific products (SAP Data Hub). You'll also find
playlists about new features and functionalities, like the What's New series, or about
specific tasks and activities, like modeling and design with SAP HANA.
397
10 Training and Support
Most playlists are not rigidly structured; you can pick and choose. like you would
handle a book of recipes or a reference book.
GitHub Repositories
Code samples are posted to the GitHub, as shown in Figure 10.9, to save you to trou-
ble of entering some of the boilerplate code yourself and possibly introduce a typo or
two (alas, such things do occur). Instead, you can focus on the important parts of the
code where the actual magic happens.
1 contnbt.nor
app. ust(
);
});
Learn More
To stay informed about new releases and the latest updates, you can subscribe t o the
channel. If you have a Linked In account, you can join their network of 15,000+ SAP
HANA professionals or follow them on Facebook and Twitter (@SAPHANAAcademy):
398
10.1 Training
• http://s-prs.co/v488459
• http://s-prs.co/v488460
You'll also regularly find the SAP HANA Academy posting biogs on SAP Community
(see Section 10.3), with information about new video tutorial series.
- SAPHANA
SAP HANA
Leverage ul·nll?fl'I01 y database technology to proce~s m.assrve amounts of data 1n real time.
Build a Basic SAP HANA XS Advanced Application Create Calculation Ve~ with XS Advanced
Tline tulvflJ . ~1 gu•de )'OU through It 1,.,,1 >l~ to S<l up a ~.\ult1·Ta1g.:t Model c:alcvlabon VIC'~ v. th XS Advarlttd aiJCJ 1n1SJ1er1it11l IJ;;:ijit dal.t pr•vllcy
' -·
Figure 10.10 SAP HANA on the SAP Developer Center
399
10 Training and Support
You can filter tutorials by level (beginner, intermediate, advanced}; by product (SAP
HANA); and/or topic (SQL, OData), and most tutorials are bundled in groups, for
example, Build a Basic SAP HANA XS Advanced Application (5 tutorials, 1 hour). Addi-
tionally, to add gamification to the mix, you can undertake a tutorial mission and
have your progress recorded on the SAP Developer Center, so you can keep track of
your achievements and missions accomplished (also listed in your SAP people pro-
file). The tutorials on the SAP Developer Center are step-by-step guides with code
snippets, clear prerequisites, next-step pointers, and links to additional information.
Learn More
For more information about t he SAP Developer Center, visit http://s-prs.co/v488467.
To stay up to date, you can subscribe to SAP Developer News, a month ly newsletter
with a developer focus to inform you about the latest developments, highlighting
biogs, (free) trainings, upcoming events, new tutorials and how-to guides, and recent
developer t rials and toolkit releases. On a more personal level, you can also t alk to
and meet -and-greet the experts behind t he SAP Developer Center at global events
like SAP Tech Ed, or probably a bit closer to home, on the many CodeJams and SAP
Inside Track events (see Section 10.4.3).
400
10.2 SAP Services and Support
Learn More
For more information about the SAP Digital Business Services, visit http://s-prs.co/
v488462.
401
10 Training and Support
is open 24/7. No need to get on the phone; v.rait times are minimized, and ticket over-
head reduced. For the real-time service, you can connect with support professionals
using expert chat.
~CHE 54.lppon launcl'ipad Kn~ecise ease Enter seatdt retm <;fO ~ s.· v
Down1oads
Incidents
lnst9llatiOM
Favorite Incidents SChedute an Expert Expert Ch.at Ask an Expert Peer
_ ....
Lkense Keys Book • Live Session Get Real-Tme SuPPQft Submit a Ouescion
Products
.........
All
on YoursiOe
0
0
0
I l'.0 0 ~ ..
AO..
Systems
Upcoming St$$ion$ Btlfn a chat ses.sion fOf limited prod'U<:1$
Use<•
Welcome
Another enabler for next-generation support comes from machine learning algo-
rithms, which are now also mining the huge support database of problems and solu-
tions, questions and answers. The goal is to move from reactive to proactive support,
and ideally even preventive support, able to predict and prevent issues from occur-
ring. An ambitious goal, fo r sure, but these goals are already at work when you inter-
act with the SAP ONE Support Launchpad and receive suggestions powered by
artificial intelligence (Al) when creating incidents or doing a search.
Finally, the support process is made digital. In a traditional scenario, the product and
the support service are often separate entities. Different environments and different
devices add further complexity. The objective of digitization is to bring the support
experience into the product. You can see this principle in action in SAP CoPilot. From
within an SAP product, should you get stuck or run into trouble, you can interact
402
10.2 SAP Services and Support
directly with product support with all the contextual information automatically col-
lected.
Product Support
For each product, including of course SAP HANA, you'll find a dedicated page on the
SAP Support Portal (the SAP HANA page is shown in Figure 10.12). Featured Content
shows the top five knowledge base articles, the top five SAP Notes, recommended
articles, and related pages. Tabs provide access to a complete list of all (almost 1,000)
knowledge base articles to be searched and with links to the full documentation set of
the latest releases, a list of Guided Answers, and the latest biogs and questions posted
to SAP Community.
403
10 Training and Support
SAP My Support v Producb '"' Toots y Manfcoanoo y Offcnng.s a Progrn.ITl!I v Appllicn11on Ufccyclo Manngcmcnt ... Q LJ u·t· lrA
../ Hotnews fOJ HANA ../ Product OYer view page for HANA
../ Important secu:nty notes for HANA ..; SAP HANACommun1tyPage
../ SAP HANA Troubleshooting and Performance Analysis Gulde ./ HANA Product Support WIKI
..! Top S SAP HANA KBAs: ./ SAP HANA Memo<y Usage Explained
./ FAQ.SAPHANAMe<nl)()' K13Al999997 ..; SAP HANA Storege Requ1femeots
.; FAQ; SAP KANA KBA 2000003 ..; SAP r-~NA Netwof'k ReQuwements
.,/ How To: Data M.ain11gtl'ntt"lt IOI' Tt<hnec.31TablH KBA ..; How to Ptrlorm Systttn Replttahon lor SAP HANA
2388483 .; Network Conhgw-ot 1on for SAP HANA System Rcplic:it10n
../ FAQ· SAP HANA SQl Optlmzatlon KBA 2000002
../ How To: Interpreting SAP HANA Mini Check Resul!s KBA Tools:
1999993
..; SAP HANA OumpVie\\·er KBA 2491748
../ Top 5 SAP HANA Notes
./ SAP HANASltter KBA 2399979
../ SQL Statement Collect.on tor SAP HANA. SAP Note 1969700
../ SAP HANA 1.0 Revision and t1.ia1ntenance Strategy SAP Note Video Tutorials:
2021789
../ SAP HANA. Supported Optfat1ng Systems · SAP Note ../ SAP HANA Ac.ademy technical biogs and videos
2235581 ../ SAP HANA Academy SAP HANA Memory Management
../ SAP HANA Gulde«1ne-s for SLES Operatlog System lnmttat1on ..; SAP HANA Academy SAP HANA Support• Out ot Memory Oump
SAP Note 1944799 Anatys.1s
../ Hard'ovare Configur ation ChE>ck Tool Ct>ntraJ Note · SAP Note
1943937 Stay Connect ed:
Software: ..; How to Sobscnbe to SAP Product Support *SAP HANA" YlhatsApp
Stoadcast Channe-1
../ Software Download for SAP HANA PlATfORM EDITION (lO & 2.0)
Follow 0 0 e Cl) G
Figure 10.12 SAP Support Portal: Product Support f or SAP HANA
Learn More
For more informat ion about services and support from SAP, visit http://s-prs.co/
v488463 and, for the SAP Support Portal, go to http://s-prs.co/v488464.
Product support for the SAP HANA platform edit ion can be found at http://s-prs.co/
v488465.
404
10.2 SAP Services and Support
405
10 Training and Support
for platform lifecycle man agement tasks. Ahvays start with the SAP HANA Master
Guide, the entry point for installation planning. The SAP HANA Master Guide cov-
ers topics we addressed in Chapter 1: use cases, architectures, deployment options,
implementation choices, and, above all, where to find more information about
each of these topics. Then for each of the components (server, client, studio). you'll
find a dedicated installation guide. As mentioned earlier, you may have expected
an installation guide here as well for the SAP HANA cockpit or for SAP HANA
dynamic tiering, but these functionalities are considered separate product catego-
ries and have their own product homepages.
• Administration
In the Admin istration section, you'll find the mother of all guides, the SAP HANA
Administration Guide, well over 1,000 pages, and the Troubleshooting and Perfor-
mance Analysis Guide, once part of the SAP HANA Administration Guide but now a
separate guide. Not entirely consistent, you'll also find in this section the SAP
HANA cockpit guide for administration and another guide dedicated to tenant
databases. You'll find the same text of these guides in the main SAP HANA Admi-
nistration Guide, so some overlap does exist.
• Security
On the topic of secu rity, you'll we find two guides: the conceptual Security Guide
and the shorter Securi ty Checklists and Recommendations Gu ide. Both are recom-
mended reading, not only for security administrators but also for system admin-
istrators and developers. The Securi ty Guide will explain, for example, how
authentication is designed in SAP HANA and what its implications are. For a step-
by-step guide to actual tasks related to security, you 'll need to return to the SAP
HANA Administration Guide.
• Development
Development has always been a large section, which for the uninitiated can be a lit-
tle overwhelming. Fortunately, an information map can help yo u navigate the
documentation landscape by presenting the information by guide (which guide
covers what); by task (which tasks is documented where); or by scenario (database
or application development, client-interface, security). The Getting Started Guide
offers several tutorials, so you can get a feel for how things work. However, to get
to the heart of the matter, you'll have to consult the dedicated development
guides about each of the technologies.
• Refere nce
A separate section. but mostly development related is Reference. In this section,
you'll find guides that you'll probably only use for reference, as they are not
406
10.2 SAP Services and Support
intended to be read from cover to cover. You'll find a guide referencing SQL com-
mands (SAP HANA SQL and System Views Reference}, SQLScript, JavaScript, core
data services (CDS). Predictive Analysis Library (PAL}; a number of application pro-
gramming interface (API) guides; and more.
WNt' -,.. +11 ttw W HANA Plltfotm 2 0 SAP HANA ~ism.I.,.. Cli...oe IOf W r"' loadtt Gu~ I« $.AP HANA
... ....,.....,_
t"'-'Oifl.e.ut......1•-•..n.t··~ HANA Pi.I"-'"'
-ar.bo_..___ _
n.~..,...hl).to
_
-••htt.I.•--
---
Hew ll)(,,,..._ ......... ~. aowloc:it_,. W~'IAd.t'..,...tol'Wlllhi_..,.d.lllt_,..,
.....
,....,, ~
rn
for SAP HA.HA PL.tform
Ftature Scope $.APHANAT-t~ nw s...1>-"' SQl.-s.,..e....v-~
Description l"-10~........_n_.... .. ww.""' °"""'-.,,. $QC. .......... - 1 f d ""w llA.'Ui
rutin Sc~ Onc.,..,t'°" 1or SAP HA.NA.
1-...W """"*- '°'
lhe-- tnel ~ ol w
~ltw1~$APMA"IA_.....,.._
$APHANAC«i.pt
......
~. . . .- . .~$Ql........ ..,_._......,.,.
~
SAP HANA Mnlt• O.. ~ Tio.$AP..w.A..... ( ..... NWiod ...
Security
-.,_.....,.,....
(t,11y~ ltr , . . _ . lho _...,uen o1,- W ~-!Auo.Ol'l~--...
_ ..,.lllr...
O)"t.na.. - ... .,,,.,. llAAA _ ----
.....
SAP HANA $tf"#r l...it ot>Otl......, Updl~
-
~-ID......... Ww.M---lo
-llOln!.tae....Sl4'dhhWKANA"'*· II• WO'JIPI~~_.....,.-,..
$JP}W(A~",,.....,.,b)OI
~ Training and Education SAP (.nl.,Pf,.. ~Ul'I o.tllf*. e6to0tl ~ ,fl, SAP HANA Opt ions and
lot SAP 11AHA IJ\\11.U Addltional Capabilities
1.1-fl'W'C..loumty SAP HANA~t c.ii:~~_,,,_'f0¥0f'Pl"'UllOtl~
~.....,........,_,,..._"""
w--.--...,.,..~llcoo-W
lffmrc Jollm.y SAP HANA YoOll"'C . , . , . _ . , . _ 'M<tt- AA'U.. .,. .... tna.""HN<AOflll_..,.
~ .... ~oyo;e... ,,.. .......
""'""'..lout!WY $AP HANA AO'lwll$t,_IOll ~u.~~-. ...._w
"°""''~ n..SA1'-AOOl_ ...... ~k>Mbeltw
407
10 Training and Support
Depending on the product, other sections may also appear. For SAP HANA, you'll see
a list of options and "additional capabilities," which concerns unbundled functional-
ities not specific to any edition or option. Exactly what feature and functionality is
included in each edition or option is documented in the Feature Scope Description
(available directly at http://s-prs.co/v488466). When available, the SAP Help Portal
will also list the learning journeys mentioned in Section 10.1.1.
Learn More
To access the product documentation fo r the SAP HANA platform on the SAP Help
Portal, visit http://s-prs.co/v488467. On the homepage of the SAP Help Portal, you
can browse the product hiera rchy and find out relevant learning journeys, which
links to SAP Commun ity, the SAP Developer Center, SAP Support, and SAP Education.
408
10.2 SAP Services and Support
• g.:;,•1a
v Search In: SAP Notes & KBAs 1532 document(s) found Sort By: Rflfv•nc• v !! (!o ISl B Ill!
101
D
Eddon, bJI lklMSot key tu:tt Pfo
HAN'-08 (SAP HANA o.utw>M)
°'
Vot.t\<e b0.1#11 SAP HA..'U. t::~is<t &11.ttpMt tiitMOH E~ b1.M
SAP He4p PMail 20+ 2400024. HOW·T-0: SAP HANA Adm1nlwat1on and Monltonng
SUccim.FKtors eonvni..lity 144 *""'
YOV lilt k'ltetseed 11\Mst JQClke$ ~ tnd lnCll"lilol'.._• W HAHA ~M.
Incidents
SAP Support recommends you first search the knowledge base if you encounter an
issue with the product before submitting an incident. A best practice/how-to article
about creating support incidents and an incident wizard can help you with the pro-
cess. A good investment of your time would be to famil iarize yourself with this task
beforehand and not wait until a critical business function fails. Incident manage-
ment is a smooth-running machine and learning how to best interact with this
machine for your own benefit makes sense.
Guided Answers
A more recent support innovation are Guided Answers. Common or complex issues
with SAP products are cast into a decision tree, and by answering filtering questions
on the topic, you'll be guided to a possible solution for the issue, typically in the form
of a knowledge base article or an SAP Note with detailed information. As shown in
Figure 10.15 for SAP HANA, for example, Guided Answers are available for the follow-
ing topics:
409
10 Training and Support
Guided Answers are even available to help you find the right SAP HANA component
for your issue.
ES""Guided Answers
ln.teractiv& documentation designed to help troubl&shOOt issues, navigate processes and guide through taskS.
Seardl
Product: SAP HANA. platform editiOn Component SV-lGN Decails = Release &atus Released 10 Cuscomtr
Product: SAP HANA, platform edition Cornc><>nen1: HAN·OB Details ";" Release Status: Released •o Cuslomet
Product: SAP HANA, p&a:lform ttd1tion Componenl; HAN·OB·ENG-6W Details 7 Release Status: Relea:Secl to Customer
Software Downloads
Software Downloads on the SAP ONE Support Launchpad is the single location to
download licensed SAP software. The process is simple, although finding the right
download when you're looking at specific bits and pieces can be a challenge. For SAP
HANA, in general, you can access the right download either by alphabetical index (H
for HANA), by category (SAP in-memory), or by search (try HANA platform). Searching
may be the most convenient as browsing the index can be a bit of a labyrinth.
Note that you'll see only the software your company has been licensed for, so if your
search results in a blank list, contact your SAP administrator. The menu under your
410
10.3 SAP Commun ity
Learn More
To access the SAP ONE Support Launchpad, go to http://s-prs.co/v488468, which
requires a support accou nt (S-user).
For Guided Answers, go to http://s-prs.co/v488469.
SAP Notes
For information about how to create a support incident, see SAP Note 1296527- How
to create a support incident.
SAP Community is a great resource for anyone working with SAP software, whether as
a business user, a consultant, a software developer, or a student. You can go to SAP
Community to search for information, ask questions and find answers, share your
knowledge, and connect with your peers. At the time of writing (summer 2019), about
2.8 million users have signed up, and the site receives 287,000 visits a day.
As shown in Figure 10.16, the main sections of SAP Community are Questions and
Answers and Biogs. Finding information is easy using search, but you can also browse
the different topic areas. Some topics concern a technology. for example, ABAP devel-
opment; others a product like the SAP Cloud Platform or SAP S/4HANA, but you'll
also find an industry focus, which includes SAP solutions for the oil and gas industry
or for the public sector. To facilitate search, all questions, biogs, and other material
are tagged. The required tag should match the topic area. but you can also create your
owns. These tags, in turn. can then be followed. You could, for example, follow the
SAP HANA tag.
411
10 Training and Support
Learn More
To learn and st ay up to date about the latest SAP HANA developments, SAP Commu-
nity is a great resource. If you don't have an account yet, sign up and get involved! For
information about how to get started on SAP Comm unity, see http://s-prs.co/
v488470. You should consider su bscribing t o t he Community Voice newslett er.
Note that SAP Community biogs are posted to http://s-prs.co/v488471, while SAP
(HANA) Product Marketing and Management also post s SAP HANA-related biogs to
http://s-prs.co/v488472.
412
10.4 SAP Events
Every year, SAP organizes two huge conferences : SAPPHIRE NOW and SAP TechEd.
Although these conference overlap in content somewhat-you can discuss SAP road-
maps at both events- the dress code is quite distinct. Generally, the suits go to SAP-
PHIRE NOW, the hoodies to SAP TechEd. Similar to SAP TechEd in concept but
dedicated to SAP HANA, the SAP HANA Operation Expert and Developer Summits are
held once a year at different locations but typically at SAP offices. CodeJams and SAP
Inside Track bring a taste of SAP TechEd back home. At a much smaller scale, these
events may or may not even be organized by SAP, but you'll likely find one near you.
We'll explore these events further in this section.
SAPPHIRE NOW has a business focus and is often used for major announcements
about new products and strategic directions. A major networking event (who doesn't
want to go to Florida in the spring?), SAPPHIRE NOV\' is held together with the ASUG
annual conference and the SAP Global Partner Summit.
If your focus is SAP HANA, then SAPPHIRE NOW \Viii be the place where you can learn
about what's planned for the future as well as share experiences about implementa-
tions, realized return on investment (ROI), migration best practices, and similar top-
ics.
Learn More
For information about the SAPPHIRE NOW conference and to watch replays of the
latest event, visit http://s-prs.co/v488473.
SAP TechEd is a technical education event intended, as you might have guessed, for a
more technical audience: consultants and software developers. For the last few years.
SAP TechEd has been held in the fall at three locations: Las Vegas, Barcelona, and Ban-
galore. During SAP TechEd, you can learn about IT security and architecture, system
management and database administration, business process and business intelli-
gence (Bl), and, of course, software development.
413
10 Tra ining and Support
The conference lasts a whole week with pre-events and after-parties included. Hun-
dreds of sessions are held, impossible to attend them all, but fortunately, the SAP
TechEd app can help you manage your session schedules. SAP TechEd is great place as
well to finally meet the faces behind the avatars; that is, the people with whom you
held all t hose online conversations.
For review- or for the early morning sessions you might have missed- and for those
not able to attend, you can watch session replays on the event \vebsite. For 2018, 40
sessions focused on SAP HANA and related products or technologies. Figure 10.17
shows some highlights.
SAP TECHED I Online Home 2018V;deos v A<cn;ve v Biogs So<lal SAPTechEd v .1. ~
.........
0. ..... By Name
ciear fllttrs
•••
.. "
Location v
' "...: ·®~ ~
Scu1onTypo v
v
u1n. C - •t .,. ..-,.-..,.
----:-~-~
1 & ....
! ;
oo ~- · ·
; - . ..
""
· ·!
II! •••
.'Cl~ 41
''' 4'1
2018 LT124 • Building Intelligence and LT122 · Connect to SAP Cloud IT124 • SIRAX • Improving OLTP
Automatk>n into SAP HANA. Platform. SAP HANA Service performance with SAP HANA.
2018 Las V.gas Using SQI. from Aiiywh~ro. 2018 2018 81rcelona
Las Vops
.. . -
OAl'M · - ' " ' • " ' - -
' - .
uui . -...-..IH- •"'"c.do...
...
_ _ t_
OU1" • ........
.. '
..__ ,.._
.....,Cllowi> •.--
..
...
DAT200 • Pertorma nee and LT123 • MOYlr1g from the Studio DAT107 • Mlgratln& from Classk Contact vs
Workload Man-aement for SAP to the Cockpit Functionality In to Advanced SAP HANA
HANA. 2018 Las Vegas SAP HANA. 2018 Las Vegas Extended Appllcatlon Se~.
2018 l as Vegas
--·
.. .
OAT lU , . . . _ . • A.Qro!0.--1'1
' ,' .. ..
OAnl4 . Discover the JSON LT126 • UsJng Smart Data LT128 · Overview of Machine
Document Store in SAP HANA. lnte-gration f« SAP Cloud learning Capabilities from SAP
2018 las Vegas Platfotm. SAP HANA Se-Nice. HANA. 2018 l as Vegas
2018 las Vegas
View More
414
10.4 SAP Events
Learn More
For information about t he SAP Tech Ed conference and to watch replays of the latest
edition, visit http://s-prs.co/v488474.
For SAP TechEd 2018, openSAP also created a recap course with over 30 sessions
incl uded. See t he website for future sessions http://s-prs.co/v488475.
Aside from the global conferences, SAP also (co-)organizes and promotes many local
events. CodeJams are one example. Part code, part network event, you can share your
knowledge about SAP/SAP HANA software development, tools, and technologies in a
casual setting.
SAP Inside Track started when two SAP mentors decided to take the TechEd Commu-
nity day back home and organize a get-together in London, 2008. Since then, hun-
dreds of SAP Inside Track events have taken place, another great way to meet like-
minded SAP professionals. Just like the Code Jams, anyone can organize an SAP Inside
Track event.
Learn More
For information about SAP Inside Track, visit the SAP Inside Track area on SAP Com-
munity: http://s-prs.co/v488476.
For an up-to-date list of all events, including CodeJams, check http://s-prs.co/
v488477.
The SAP HANA Operation Expert and Developer Summit is an exclusive event for
experienced SAP HANA customers with panel discussions and breakout sessions
offering opportunities to share SAP HANA experiences and new ideas with SAP devel-
opment and product management staff. Announcements are made on the SAP Com-
m unity website.
415
10 Training and Support
Besides SAP corporate events, many other initiatives invite business users, students,
and innovators to connect to come up with the "next big thing."
SAP user groups represent 350,000 customers worldwide with the SUGEN (SAP User
Group Executive Network) serving as a hub to brings them all together. SAP user
groups are independent, not-for-profit organizations where you can share experi-
ences, exchange knowledge, and provide SAP with feedback. SAP user gro ups fre-
quently present at the global events we just mentioned but also have a presence at
the more regional initiatives. SAP sponsors the user groups and organizes workshops
and webinars. Figure 10.18 shows the SAP user groups website with a range of guides
and tools to support the groups.
Knowledge for
SAP User
Group5
Welcome to the SAP User Groups Knowledge
Transfer Webpage!
.......
Our webinars are dechcated to se1 the success
of our customers and partners.. We regularly
provKle you with the ne-Hest information to keep
you up·to·date.
Our Mission
\'le enable~, Croup$ to Adopt. Tnnt. and Innovate by provldlr'lig
~ aoc~s to c..;port15oe ;)n<I bo$t pro1cti(.(1$ kif fl\St.l!lcd system.
416
10.5 User Groups, Alliances, and More
The Americas' SAP Users' Group (ASUG) is the largest user group with more than
100,000 members with chapters, special interest groups (SIG), and even its own
ASUG University. Next in size is the Deutschsprachige SAP-Anwendergruppe (DSAG),
counting 60,000 members from over 3,300 companies, large and small. Most user
groups organize their own events, and they can be a great alternative resource for
information about SAP products and technologies, including SAP HANA. Connecting
with your local user group is highly recommended.
Learn More
For more information about SAP user groups in general, visit the microsite http://s-
prs.co/v488478. For ASUG, see http://s-prs.co/v488479, and for DSAG, go to http://s-
prs.co/v488480.
Learn More
For Customer Influence, Customer Engagement Initiatives, and Continuous Influence
Session (Idea Place), see http://s-prs.co/v488487.
For the SAP User Experience Community, go to http://s-prs.co/v488482.
417
10 Training and Support
In 2019, for the sixth time, SAP organized an open house at its headquarters in Wall-
dorf, inviting students, professors, and others interested in database research to join
and get an overview of database research at SAP and to meet the architects of SAP
HANA, SAP Data Hub, and the technology platform. The open house is organized by
the SAP HANA database department. Besides inventing new technologies, other
activities include consultancy and academic guidance for students on internships,
patents, publications, papers, and research. Research is done in collaboration with
several universities in Germany and Switzerland.
Learn More
For more information about SAP University Alliances, visit http://s-prs.co/v488483.
Learn More
For more informat ion about the Hana Haus, visit http://s-prs.co/v488484.
For the SAP Innovation Center Network, go to http://s-prs.co/v488485.
418
10.6 Summary
HANA, you might check out the annual BI, Analytics & HANA conference, and in the
past, they have also organized an SAP HANA Administration Bootcamp.
Learn More
For more informat ion about SAPinsider, visit http://s-prs.co/v488486.
10.6 Summary
In this chapter, we covered several options for SAP HANA training. We listed the
courses available from SAP Education and the possible certifications, but also high-
lighted many options for training at low or no charge. For instance. you can follow
MOOCs about SAP HANA from openSAP or watch the hands-on video tutorials from
the SAP HANA Academy on YouTube.
For tutorials, another great resource is the SAP Developer Center. From beginner to
advanced level, for data science topics, SAPUIS, OData, or SAP HANA XS Advanced,
you'll find something new to learn each day.
In the second part of this chapter, we focused on SAP support and services. We listed
the different services available for SAP HANA projects and the SAP Support tools you
can use to download software, get your license, search the knowledge base, or create
an incident.
Finally, we also looked at opportunities to get together, virtually with SAP Commu-
nity and in real-life during an SAP event, from mega conferences like SAP TechEd to
the more intimate get-togethers of SAP Inside Track. Although not specific to SAP
HANA, we also touched on user groups and other events like the SAPinsider con-
gresses as alternatives to meet and greet.
419
The Author
421
Index
423
Index
424
Index
425
Index
426
Index
E F
E-Academy ............................................................... 384 Fact extraction ....................................................... 241
Eclipse ........................................................................... 99 Failback ..................................................................... 372
IDE .......................................................................... 150 Fast restart option ................................................ 119
Editions ........................................................................ 67 Fault resiliency ...................................................... 368
cloud ......................................................................... 68 Fault tolerant .......................................................... 368
express .............................................................. 67, 87 Feature Scope Description .................. 68, 70, 408
platform ........................................................... 67, 87 Federated database .............................................. 316
standard ................................................................. 69 Fencing ..................................................................... 319
Efficiency ..................................................................... 82 File system layout ................................................ 138
Encryption ..................................................... 249, 271 Flowgraph ............................................. 217, 293, 312
algorithm ............................................................ 276 Forrester Wave ................................................... 41, 42
background ........................................................ 271 Function library ....................................................... 61
backup .................................................................. 275 Fuzzy search .................................................. 239. 240
client-side ............................................................... 80
enable ................................................................... 276 G
network ................................................................ 272
network zones ................................................... 272 Geocoding ............................................................... 231
Enterprise data warehouse (EDW} ................. 310 Geographic information system (GIS) ......... 228
build ...................................................................... 331 Getting Started Gu ide .................................. 72, 406
Enterprise information management GitHub ............................................ 77, 153, 207, 398
(EIM) ............................................ 33, 286, 291, 292 Go ................................................................................ 192
Enterprise Semantic Services (ESS) ................ 296 background ........................................................ 192
Entity extraction ................................................... 241 Go driver .................................................................. 192
EPM-MDS ................................................................. 198 Google BigQuery ................................................... 295
esserver ........................................................................ 61 Google Cloud Platform (GCP) ................... 85. 362
Event .......................................................................... 243 SAP HANA guides ............................................ 363
Event stream processing ............................ 32, 243 Governan ce, risk, and compliance (GRC) .... 249
Event-drive n architecture (EDA) .................... 243 Graph algorithm ................................................... 233
Exact search ............................................................ 239 Graph database ...................................................... 232
Execution agent .................................................... 167 Graph engine .......................................................... 233
Expensive statement trace ............................... 117 Graph processing ........................... 32, 83, 214, 232
Expensive Statements app ............. 111, 117, 156 background ........................................................... 78
Extensibility .................................................. 177, 318 Graph workspace viewer .......................... 216, 234
Extension node ............................................ 321, 322 Graphical calculation view ............................... 161
configure ............................................................. 322 GraphScript ............................................................. 233
External Machine Learning Library (EML) Grid ............................................................................. 231
architecture ........................................................ 225 Guided Answers ................................. 118. 403, 409
code snippets ..................................................... 226 topics .................................................................... 409
External Machine Learning library (EML) ... 225 troubleshooting ................................................ 267
Extract, transform, and load (ETL) ..... 33, 54, 295
Extraction ................................................................ 240 H
Hadoop ..................................................................... 245
background ................................................. 76, 304
427
Index
428
Index
Internet ofThings (IoT) ............................... 32, 291 Linked database ..................................................... 297
security ................................................................. 248 Linux .......................................................... 98, 132, 356
Invisible takeover .......................................... 81, 372 command line ...................................................... 97
Live intelligence ....................................................... 44
J Log replication task ............................................. 371
Logon ticket ............................................................ 260
Java ............................................ ................................. 149
background ........................................................ 163 M
Java Archive (JAR) file .......................................... 183
Java Database Connectivity (JDBC) ......... 99, 183 Machine learning ................ 32, 80, 214, 218. 288
background ................................................. 80, 184 SAP Support ....................................................... 402
JavaScript ................................................................. 149 Maintenance ...................................................... 46, 47
background ........................................................ 163 cycles ........................................................................ 47
JavaScript Object Notation ()SON) ................. 175 releases .................................................................... 47
JSON document store .......................................... 174 MarketScapes ............................................................ 42
background ........................................................... 79 Massive online open courseware
SQJ. ......................................................................... 176 (MOOCs) .............................................................. 382
JSON web tokens ()WT) ....................................... 260 Master data table .................................................. 330
Ju pyter notebook .................................................. 189 Matrix ........................................................................ 225
Measure .................................................................... 162
K Memory access ......................................................... 53
Memory management .......................................... 96
K-anonymity .......................................................... 270 Memory Usage app .............................................. 119
Kerberos ................................................................... 259 Microsoft Azure .............................................. 85, 362
background ........................................................ 260 Microsoft Excel ...................................................... 187
Kernel profiler ........................................................ 117 Middle tier .................................................................. 30
Key performance indicator (KP!) .................... 108 Migration ................................................................. 364
K-means .................................................................... 231 AnyDB to SAP HANA ...................................... 365
K-nearest neighbors (KNN} ............................... 242 custom applications ....................................... 367
Knowledge base articles ..................................... 408 SUM DMO ........................................................... 366
Kubernetes .............................................................. 304 third-party applications ................................ 368
Miscellaneous algorithm ................................... 222
L Modeling perspective ......................................... 150
Monitor Landscape dashboard ....................... 114
Landscape management .................................... 374 Monitor Performance app ................................ 120
Learning journey .................................................. 382 Monitor Statements app ................................... 110
SAP HANA ........................................................... 382 Monitoring
Licensing .............................................................. 46, 68 performance ...................................................... 108
enterprise ............................................................... 68 proactive ............................................................. 122
r un ti me ................................................................... 68 Moun t point ........................................................... 138
standard ................................................................. 68 Multicloud environment .................................. 344
Ligh tweight Directory Access Protocol Multicontainer database (MDC) system ........ 60
(LDAP) ................................................................... 268 Multidimensional database ............................. 187
authentication .................................................. 155 Multidimensional expressions
background ........................................................... 79 (MDX) .......................................................... 160, 201
Linguistic search ................................................... 239 Mu ltidimensional services (MOS) ................. 198
429
Index
430
Index
431
Index
432
Index
SAP Event Stream Processor ............................ 243 SAP HANA cockpit (Cont.)
background ........................................................... 75 manage landscape .......................................... 107
SAP HANA 1.0 ............................................................ 72 memory analysis .............................................. 120
SPS 03 ....................................................................... 72 memory resource management ................ 119
SPS 04 ...................................................................... 73 offline administration ................................... 101
SPSOS ....................................................................... 73 privileges .................................................... 263, 264
SPS 06 ...................................................................... 7 4 replay monitor .................................................. 116
SPS07 ....................................................................... 75 replication .......................................................... 302
SPS 08 ...................................................................... 75 security .............................................. 124, 249, 281
SPS 09 ...................................................................... 7 6 streaming analytics ........................................ 245
SPS JO ....................................................................... 77 system configuration ..................................... 106
SPS 11 ........................................................................ 77 sys tern overview ............................................... 108
SPS J2 ........................................................................ 78 system replication ........................................... 371
SAP HANA 2.0 ............................................................ 78 table redistribution ......................................... 329
develop apps ...................................................... 180 tracefiles ............................................................. 117
native development ........................................ 164 updates ................................................................ 102
PAM ... .. .. .. ... .... .. .. ........................ .. .. .. .. .... .. ............. 133 user groups ................................ .... .. .. .. .. .. .. .. .. .. .. . 25 6
SAP HANA cockpit ........................................... 101 user management ........................................... 254
SPS OJ ....................................................................... 79 workload analysis ........................................... 112
SPS 02 ....................................................................... 80 SAP HANA Data Management Suite ............. 287
SPS03 ....................................................................... 80 SAP HANA data \Varehousing
SPS04 ...................................................................... 81 foundation ................................................ 310, 331
SAP HANA Academy ............................................ 396 t ria I version ........................................... .. .. .. .. .. .. . 3 34
GitHub repositories ......................................... 398 SAP HANA database interactive termina l ..... 99
YouTu be playl is ts .. .. .. .. .. .. .. .. .. .. .. .. .. .. ................. 397 SAP HANA Deployment Infrastructure
SAP HANA Accelerator for SAP ASE .................. 57 (H DI) .. .. .. .. .. .. .. .. ...................................................... 171
SAP HANA Administration Guide ........... 72, 406 administration .................................................. 144
SAP HANA app lication lifecycle application /ifecycle management ........... 174
manage n1ent ........................ 103, 139. 140, 173 CDS ........................................................................ 171
SAP HANA client ................................................... 149 diserver ................................................................... 61
SAP HANA Cloud Services ................... 37, 45, 288 versus repository .............................................. 172
SAP HANA cl usters .................................................. 64 SAP HANA dynamic tiering ....................... 66, 323
SAP HANA cockpit ......................................... 97, 101 arch i tee tu re .................... .................................... 3 23
alerts .................................. ........ ........................... 121 background ................................................. 76, 324
anonymization views ..................................... 270 esserver ................................................................... 61
auditing ............................................................... 279 history ..................................................................... SS
authentication .................................................. 123 SAP HANA Enterprise Cloud ............................... 87
background ............................................ 76, 77, 79 background ........................................................... 88
backup sch edu Ier .. .. .. .. .. .. .. .. .. .. .. .. .. ................... 126 SAP HANA Finder """""""""""""""""""""""""" 39
backups .. ... .... .. .. .. ...................... .. .. .. .. ................... 125 SAP HANA hardware directory ................... 36, 77
cloud ......................................................................... 88 SAP HANA Interactive Education
data architecture .......................... ................... 311 (SH IN E) ................................................................. 206
editions .................................................................... 68 background ........................................................... 7S
encryption ........................................................... 276 dashboard .................................................. 208, 209
home ..................................................................... 115 deployn1ent options ........................................ 207
manage keys ...................................................... 277 getting started .................................................. 208
433
Index
SAP HANA interactive terminal ..................... 182 SAP HANA Web-Based Development
SAP HANA Lifecycle Management ............... 130, Workbench ................................................ 152, 164
281,318 background ........................................................... 74
SAP HANA Master Guide ...................................... 27 SAP HANA XS ............................................ 28, 65, 164
SAP HANA native storage extension ..... 66, 321 administration .................................................. 104
SAP HANA One ............................................... 86, 360 artifacts ................................................................ 164
SAP HANA Operation Expert and background ........................................... 74, 80, 165
Develope r Summit .......................................... 415 CL! ........................................................................... 144
SAP HANA platform lifecycle deprecation ......................................................... 164
management tool ............................................ 103 encryption ........................................................... 277
SAP HANA run time tools .................................. 102 network administration ................................ 375
SAP HANA Security Checklists and packages .............................................................. 174
Recommendations .......................................... 263 privileges .............................................................. 266
SAP HANA service broker .................................. 180 runtime roles ...................................................... 165
SAP HANA smart data access (SDA) ...... 33, 277, security ................................................................. 281
297, 316 user management ............................................ 253
background .................................................... 74, 77 SAP HANA XS Admin tool ....................... 142, 164
data source ......................................................... 297 SAP HANA XS Advanced ............. 65, 77, 163, 165
SAP HANA smart da ta integration administration ........................................ 102, 104
(SDI) ................................................................ 33, 292 application lifecycle management ... 139, 174
background ........................................................... 76 background .................................................. 80, 166
connection adapters ....................................... 293 CL! ........................................................................... 167
dpserver .................................................................. 61 Cloud Foundry ................................................... 179
SAP HANA smart data quality (SDQ) ........... 231, configure .............................................................. 168
292, 294 diserver ................................................................... 61
background ........................................................... 76 encryption ........................................................... 277
SAP HANA spatial serv ices ....................... 228, 231 install ..................................................................... 137
background ........................................................... 75 network administration ................................ 375
SAP HANA stream ing analytics .............. 32, 214, platform lifecycle management ................. 141
217,243 roles ........................................................................ 165
arch i t.ectu re ........................................................ 244 routing .................................................................. 167
background ................................................. 76, 243 runtime engines ................................................ 166
streaming server ................................................. 61 runtime versions ............................................... 166
studio .................................................................... 245 scale-out ............................................................... 319
SAP HANA studio .......................................... 99, 150 security ................................................................. 281
data architecture ............................................. 311 user management ............................................ 253
deprecation ............................................... 100, 151 SAP HANA XS Advanced Admin tool ............ 104
install .................................................................... 100 SAP HANA XS Advanced cockpit ........... 104, 143
modeler perspective ........................................ 151 advantages ......................................................... 168
privileges ............................................................. 265 SAP HANA XS Advanced Migration
replication .......................................................... 302 Guide ..................................................................... 208
security ................................................................ 250 SAP HANA, en terprise edition ........................... 46
system configuration ..................................... 106 SAP HANA, express ed ition .................. 46, 67, 87,
trace files ............................................................. 117 102, 201
SAP HANA transport for ABAP (HTA) ........... 174 background ........................................................... 78
cloud ...................................................................... 202
434
Index
SAP HANA, express ed it ion (Cont.) SAP Replication Server ................................ 33, 302
deployment options ........................................ 202 background ........................................................ 303
Docker ................................................................... 203 SAP S/4HANA .................................................. 55, 366
download manager ......................................... 205 SAP Sol ution Manager ... 105, 174, 339, 374, 378
GCP ........................................................................ 203 background ........................................................... 77
getting started ................................................... 204 SAP SQL Anywhere ............................................... 298
install .................................................................... 202 background ........................................................ 298
rnaster password .............................................. 205 SAP Streaming Analytics ................................... 243
server-only .......................................................... 202 SAP Support ................................................... 400, 401
virtual machine ................................................ 202 SAP Support Portal ............................................... 403
SAP HANA, platform edition ............................... 67 product support ............................................... 403
SAP HANA, runtime ed ition ................................ 47 SAP TechEd .............................................................. 413
SAP HANA, standard edition ............................... 46 SAP University Alliances ................................... 417
SAP Help Portal ............................................ 405, 407 SAP User Experience Commu nity ................. 417
administration .................................................. 406 SAP user groups .................................................... 416
development ...................................................... 406 SAP Vora .......................................................... 289. 304
Feature Scope Description ............................ 408 background ........................................................... 77
installation and upgrade .............................. 405 SAP \Veb Dispatcher ................................... 142, 165
reference .............................................................. 406 SAP \Veb IDE ........................................................... 152
security ................................................................. 406 background .................................................... 76, 78
what's new .......................................................... 405 CDS ........................................................................ 171
SAP Information Lifecycle Management .... 292 data architecture ............................................. 311
SAP Information Steward .................................. 292 editions ................................................................... 68
SAP Innovation Center Network .......... 417, 418 features ................................................................ 152
SAP Inside Track .................................................... 415 full -stack .............................................................. 179
SAP Landscape Management ......... 79, 105, 339, SHINE .................................................................... 207
371,374,376 SAP \Veb IDE for SAP HANA .................... 102, 152
dashboard ........................................................... 377 analytics .............................................................. 217
SAP Landscape Transformation calculation view ............................................... 161
Repli cation Server ........................... 33, 300, 331 enablefeatures ................................................. 218
background ........................................................ 300 features ................................................................ 153
configure ............................................................. 301 integration ......................................................... 287
SAP Learning Hub ................................................. 384 privileges ............................................................. 265
SAP Master Data Governance (SAP MDG) .... 292 streaming analytics ........................................ 245
SAP MaxDB ................................................................. 56 SAPinsider ............................................................... 418
SAP NetWeaver ......................................................... 58 SAPPHIRE NOW .............................................. 38, 413
distributed system .............................................. 64 keynote ................................................................... 38
SAP News Cen ter ...................................................... 82 roadmap ................................................................. 43
SAP Note ................................................................... 405 SAPUI5 ............................................................... 74, 149
SAP ONE Support Launchpad ................ 401, 408 Scale-out ................................................... 63, 314, 344
expert chat .......................................................... 402 administration .................................................. 129
SAP Partner Finder ............................................... 342 advantages ......................................................... 317
SAP PartnerEdge portal ...................................... 342 configure ............................................................. 318
SAP PowerDesigner .............................................. 314 Scale-up .................................................................... 314
SAP Predictive Analytics .................................... 227 advantages ......................................................... 316
background ........................................................ 227 persistent memory .......................................... 354
435
Index
436
Index
437
Index
438