SAP HANA 2.0 - An Introduction (2019) [PDF]

  • 0 0 0
  • Gefällt Ihnen dieses papier und der download? Sie können Ihre eigene PDF-Datei in wenigen Minuten kostenlos online veröffentlichen! Anmelden
Datei wird geladen, bitte warten...
Zitiervorschau

Denys van Kempen

SAP HANA®2.0 An Introduction

~ Rheinwerk Pub

sh

ng

Contents Preface .....................................................................................................................................................

17

1

Introduction

27

1.1

What Is SAP HANA? ............................................................................................................

27

1.2

Key Capabilities ....................................................................................................................

30

1.2.1 1.2.2

Application Development .................................................................................. Advanced Analytical Processing ......................................................................

30 31

1.2.3 1.2.4

Data Management ............................................................................................... Database Management ......................................................................................

33 33

Key Benefits ...........................................................................................................................

34

1.3.1 1.3.2 1.3.3

Reduce Complexity .............................................................................................. Run Anywhere ....................................................................................................... Real Results .............................................................................................................

35 36 38

1.4

Finding Customer Stories and Use Cases ..................................................................

39

1.5

Industry Analysts .................................................................................................................

41

1.5.1 1.5.2

Gartner and the Magic Quadrant ................................................................... Forrester Wave and IDC MarketScapes .........................................................

41 42

1.6

The Road Ahead ....................................................................................................................

43

1.7

Licensing and Maintenance ............................................................................................

46

1.7.1 1.7.2

Licensing .................................................................................................................. Software Maintenance .......................................................................................

46 47

1.8

Summary .................................................................................................................................

49

2

Technology Overview

51

2.1

In-Memory Database Concepts .....................................................................................

52

2.1.1 2.1.2

52 54

1.3

Database History in a Nutshell ........................................................................ SanssouciDB ...........................................................................................................

7

Contents

2.2

2.3

Contents

System Architecture Overview .....................................................................................

57

2.2.1 2.2.2

Implementation Scenarios ............................................................................... Services and Processes .......................................................................................

57 58

3.3.1 3.3.2

Platform Lifecycle Management ..................................................................... Product Availability Matrix ...............................................................................

131 133

2.2.3 2.2.4 2.2.5 2.2.6

Memory and Persistence ................................................................................... Single-Host and Distributed Systems ........................................................... Database and Application Server ................................................................... Data Tiering ...........................................................................................................

62 63 65 66

3.3.3 3.3.4

Installation and Update ..................................................................................... Application Lifecycle Management ................................................................

135 139

Editions ....................................................................................................................................

67

2.3.1 2.3.2 2.3.3 2.3.4

SAP HANA, Platform Edition ............................................................................. SAP HANA, Express Edition ............................................................................... SAP HANA, Cloud Edition ................................................................................... Licensing, Options, and the Feature Scope Description ..........................

67 67 68 68

What’s New: Support Package Stacks and Revisions ......................................... 2.4.1 2.4.2

3.3

3.4

SAP HANA Lifecycle Management ............................................................................... 130

Application Server Administration .............................................................................. 141 3.4.1 3.4.2

SAP HANA XS Admin Tool .................................................................................. Deploying SAP HANA XS Advanced Applications ......................................

142 142

3.5

Summary ................................................................................................................................. 145

70

4

Development

SAP HANA Platform Edition 1.0 ....................................................................... SAP HANA Platform Edition 2.0 .......................................................................

72 78

4.1

Role and Tools ....................................................................................................................... 148

Deployment Options .........................................................................................................

84

2.5.1 2.5.2

On-Premise ............................................................................................................. Cloud Deployments .............................................................................................

85 85

2.6

Summary .................................................................................................................................

93

3

Administration

95

3.1

Role and Tools .......................................................................................................................

96

3.1.1 3.1.2

The SAP HANA Administrator .......................................................................... Tools .........................................................................................................................

96 97

System Administration .....................................................................................................

105

3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6

105 108 118 123 124 129

2.4

2.5

3.2

8

System Configuration ......................................................................................... Performance Monitoring and Analysis ......................................................... Resource Management ...................................................................................... Security .................................................................................................................... Backup and Recovery .......................................................................................... Additional Responsibilities ...............................................................................

4.1.1 4.1.2

4.2

The SAP HANA Developer .................................................................................. Tools ..........................................................................................................................

147

148 150

SQL and SQLScript ................................................................................................................ 154 4.2.1 4.2.2 4.2.3

SQL ............................................................................................................................. SQLScript ................................................................................................................. ABAP Managed Database Procedures ...........................................................

154 156 158

4.3

Analytic Modeling ............................................................................................................... 160

4.4

SAP HANA Extended Application Services ............................................................... 163 4.4.1 4.4.2

SAP HANA XS .......................................................................................................... SAP HANA XS Advanced .....................................................................................

164 165

4.5

Core Data Services ............................................................................................................... 169

4.6

SAP HANA Deployment Infrastructure ...................................................................... 171

4.7

Application Lifecycle Management ............................................................................. 173

4.8

JSON Document Store ....................................................................................................... 174

4.9

SAP Cloud Platform ............................................................................................................. 177 4.9.1 4.9.2 4.9.3

Cloud Foundry and Neo ...................................................................................... SAP Cloud Application Programming Model ............................................... SAP Cloud Platform, SAP HANA Service ........................................................

178 179 180

9

Contents

2.2

2.3

Contents

System Architecture Overview .....................................................................................

57

2.2.1 2.2.2

Implementation Scenarios ............................................................................... Services and Processes .......................................................................................

57 58

3.3.1 3.3.2

Platform Lifecycle Management ..................................................................... Product Availability Matrix ...............................................................................

131 133

2.2.3 2.2.4 2.2.5 2.2.6

Memory and Persistence ................................................................................... Single-Host and Distributed Systems ........................................................... Database and Application Server ................................................................... Data Tiering ...........................................................................................................

62 63 65 66

3.3.3 3.3.4

Installation and Update ..................................................................................... Application Lifecycle Management ................................................................

135 139

Editions ....................................................................................................................................

67

2.3.1 2.3.2 2.3.3 2.3.4

SAP HANA, Platform Edition ............................................................................. SAP HANA, Express Edition ............................................................................... SAP HANA, Cloud Edition ................................................................................... Licensing, Options, and the Feature Scope Description ..........................

67 67 68 68

What’s New: Support Package Stacks and Revisions ......................................... 2.4.1 2.4.2

3.3

3.4

SAP HANA Lifecycle Management ............................................................................... 130

Application Server Administration .............................................................................. 141 3.4.1 3.4.2

SAP HANA XS Admin Tool .................................................................................. Deploying SAP HANA XS Advanced Applications ......................................

142 142

3.5

Summary ................................................................................................................................. 145

70

4

Development

SAP HANA Platform Edition 1.0 ....................................................................... SAP HANA Platform Edition 2.0 .......................................................................

72 78

4.1

Role and Tools ....................................................................................................................... 148

Deployment Options .........................................................................................................

84

2.5.1 2.5.2

On-Premise ............................................................................................................. Cloud Deployments .............................................................................................

85 85

2.6

Summary .................................................................................................................................

93

3

Administration

95

3.1

Role and Tools .......................................................................................................................

96

3.1.1 3.1.2

The SAP HANA Administrator .......................................................................... Tools .........................................................................................................................

96 97

System Administration .....................................................................................................

105

3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6

105 108 118 123 124 129

2.4

2.5

3.2

8

System Configuration ......................................................................................... Performance Monitoring and Analysis ......................................................... Resource Management ...................................................................................... Security .................................................................................................................... Backup and Recovery .......................................................................................... Additional Responsibilities ...............................................................................

4.1.1 4.1.2

4.2

The SAP HANA Developer .................................................................................. Tools ..........................................................................................................................

147

148 150

SQL and SQLScript ................................................................................................................ 154 4.2.1 4.2.2 4.2.3

SQL ............................................................................................................................. SQLScript ................................................................................................................. ABAP Managed Database Procedures ...........................................................

154 156 158

4.3

Analytic Modeling ............................................................................................................... 160

4.4

SAP HANA Extended Application Services ............................................................... 163 4.4.1 4.4.2

SAP HANA XS .......................................................................................................... SAP HANA XS Advanced .....................................................................................

164 165

4.5

Core Data Services ............................................................................................................... 169

4.6

SAP HANA Deployment Infrastructure ...................................................................... 171

4.7

Application Lifecycle Management ............................................................................. 173

4.8

JSON Document Store ....................................................................................................... 174

4.9

SAP Cloud Platform ............................................................................................................. 177 4.9.1 4.9.2 4.9.3

Cloud Foundry and Neo ...................................................................................... SAP Cloud Application Programming Model ............................................... SAP Cloud Platform, SAP HANA Service ........................................................

178 179 180

9

Contents

Contents

4.10 Client Interfaces ...................................................................................................................

181

5.3

Spatial Data Processing .................................................................................................... 228

4.10.1 4.10.2

SAP HANA Client Installation ........................................................................... SQLDBC ....................................................................................................................

181 183

5.4

Graph Data Processing ...................................................................................................... 232

4.10.3 4.10.4 4.10.5 4.10.6 4.10.7 4.10.8 4.10.9 4.10.10

JDBC .......................................................................................................................... ODBC ........................................................................................................................ ODBO ........................................................................................................................ Python ...................................................................................................................... Node.js ..................................................................................................................... Go .............................................................................................................................. ADO.NET .................................................................................................................. Ruby ..........................................................................................................................

183 184 187 188 190 192 193 194

5.5

Series Data Processing ....................................................................................................... 235

5.6

Text Analytics and Search ................................................................................................ 237

4.11 Web-Based Data Access ...................................................................................................

195

4.11.1 4.11.2 4.11.3

5.6.1 5.6.2

Search ....................................................................................................................... Text Analysis ..........................................................................................................

238 240

5.6.3

Text Mining ............................................................................................................

242

5.7

SAP HANA Streaming Analytics .................................................................................... 243

5.8

Summary ................................................................................................................................. 246

OData ....................................................................................................................... Information Access .............................................................................................. XMLA ........................................................................................................................

196 198 200

6

Security

4.12 SAP HANA, Express Edition .............................................................................................

201

6.1

Roles and Tools ..................................................................................................................... 248

4.12.1 4.12.2

Deployment Options .......................................................................................... Getting Started .....................................................................................................

202 204

4.13 SAP HANA Interactive Education .................................................................................

206

4.13.1 4.13.2

Deployment Options .......................................................................................... Getting Started .....................................................................................................

207 208

4.14 Summary .................................................................................................................................

210

6.1.1 6.1.2

6.2

248 249

User Management .............................................................................................................. 251 6.2.1 6.2.2 6.2.3 6.2.4

6.3

The SAP HANA Security Architect ................................................................... Tools ..........................................................................................................................

247

Implementation Scenarios ................................................................................ User Types and User Groups ............................................................................. Authentication ...................................................................................................... Authorization .........................................................................................................

252 254 256 261

Data Privacy and Protection ........................................................................................... 268 6.3.1 6.3.2 6.3.3

Data Masking ......................................................................................................... Data Anonymization ........................................................................................... Encryption ...............................................................................................................

268 270 271

5

Advanced Analytics

213

5.1

Roles and Tools .....................................................................................................................

215

6.4

Auditing ................................................................................................................................... 278

5.1.1 5.1.2

The SAP HANA Data Scientist .......................................................................... Tools .........................................................................................................................

215 215

6.5

SAP HANA XS Security ....................................................................................................... 281

Predictive Analytics and Machine Learning ............................................................

218

6.6

Additional Security Considerations and Concerns ............................................... 281

5.2.1 5.2.2 5.2.3 5.2.4 5.2.5

220 220 222 225 227

6.7

Summary ................................................................................................................................. 282

5.2

10

Application Function Library ............................................................................ Predictive Analysis Library ................................................................................. R Integration .......................................................................................................... External Machine Learning Library ................................................................ Automated Predictive Library ..........................................................................

11

Contents

Contents

4.10 Client Interfaces ...................................................................................................................

181

5.3

Spatial Data Processing .................................................................................................... 228

4.10.1 4.10.2

SAP HANA Client Installation ........................................................................... SQLDBC ....................................................................................................................

181 183

5.4

Graph Data Processing ...................................................................................................... 232

4.10.3 4.10.4 4.10.5 4.10.6 4.10.7 4.10.8 4.10.9 4.10.10

JDBC .......................................................................................................................... ODBC ........................................................................................................................ ODBO ........................................................................................................................ Python ...................................................................................................................... Node.js ..................................................................................................................... Go .............................................................................................................................. ADO.NET .................................................................................................................. Ruby ..........................................................................................................................

183 184 187 188 190 192 193 194

5.5

Series Data Processing ....................................................................................................... 235

5.6

Text Analytics and Search ................................................................................................ 237

4.11 Web-Based Data Access ...................................................................................................

195

4.11.1 4.11.2 4.11.3

5.6.1 5.6.2

Search ....................................................................................................................... Text Analysis ..........................................................................................................

238 240

5.6.3

Text Mining ............................................................................................................

242

5.7

SAP HANA Streaming Analytics .................................................................................... 243

5.8

Summary ................................................................................................................................. 246

OData ....................................................................................................................... Information Access .............................................................................................. XMLA ........................................................................................................................

196 198 200

6

Security

4.12 SAP HANA, Express Edition .............................................................................................

201

6.1

Roles and Tools ..................................................................................................................... 248

4.12.1 4.12.2

Deployment Options .......................................................................................... Getting Started .....................................................................................................

202 204

4.13 SAP HANA Interactive Education .................................................................................

206

4.13.1 4.13.2

Deployment Options .......................................................................................... Getting Started .....................................................................................................

207 208

4.14 Summary .................................................................................................................................

210

6.1.1 6.1.2

6.2

248 249

User Management .............................................................................................................. 251 6.2.1 6.2.2 6.2.3 6.2.4

6.3

The SAP HANA Security Architect ................................................................... Tools ..........................................................................................................................

247

Implementation Scenarios ................................................................................ User Types and User Groups ............................................................................. Authentication ...................................................................................................... Authorization .........................................................................................................

252 254 256 261

Data Privacy and Protection ........................................................................................... 268 6.3.1 6.3.2 6.3.3

Data Masking ......................................................................................................... Data Anonymization ........................................................................................... Encryption ...............................................................................................................

268 270 271

5

Advanced Analytics

213

5.1

Roles and Tools .....................................................................................................................

215

6.4

Auditing ................................................................................................................................... 278

5.1.1 5.1.2

The SAP HANA Data Scientist .......................................................................... Tools .........................................................................................................................

215 215

6.5

SAP HANA XS Security ....................................................................................................... 281

Predictive Analytics and Machine Learning ............................................................

218

6.6

Additional Security Considerations and Concerns ............................................... 281

5.2.1 5.2.2 5.2.3 5.2.4 5.2.5

220 220 222 225 227

6.7

Summary ................................................................................................................................. 282

5.2

10

Application Function Library ............................................................................ Predictive Analysis Library ................................................................................. R Integration .......................................................................................................... External Machine Learning Library ................................................................ Automated Predictive Library ..........................................................................

11

Contents

Contents

7

Data Integration

285

7.1

Roles and Tools .....................................................................................................................

286

7.1.1 7.1.2

The SAP HANA Data Integration Architect .................................................. Tools .........................................................................................................................

286 287

SAP HANA Data Management Suite ...........................................................................

287

7.2.1 7.2.2

SAP Data Hub ........................................................................................................ SAP Enterprise Architecture Designer ...........................................................

288 291

7.2.3

SAP Cloud Platform Big Data Services ..........................................................

291

Enterprise Information Management ........................................................................

291

7.2

7.3

7.3.1

SAP HANA Smart Data Integration and SAP HANA Smart Data Quality ...........................................................................................................

292

SAP Data Services ................................................................................................. SAP Agile Data Preparation ..............................................................................

295 296

7.4

Data Federation with SAP HANA Smart Data Access ..........................................

297

7.5

Remote Data Synchronization ......................................................................................

298

7.6

Data Replication ..................................................................................................................

300

7.6.1 7.6.2

SAP Landscape Transformation Replication Server .................................. SAP Replication Server ........................................................................................

300 302

Big Data ...................................................................................................................................

303

7.7.1 7.7.2

SAP Vora .................................................................................................................. SAP HANA Hadoop Integration .......................................................................

Summary .................................................................................................................................

7.3.2 7.3.3

7.7

7.8

8.3.2 8.3.3 8.3.4 8.3.5

8.4

8.5

8.4.1 8.4.2

Persistent Memory ............................................................................................... SAP HANA Native Storage Extension .............................................................

321 321

8.4.3 8.4.4 8.4.5

SAP HANA Extension Nodes .............................................................................. SAP HANA Dynamic Tiering .............................................................................. SAP Data Hub and the Spark Controller .......................................................

322 323 325

Data Distribution ................................................................................................................. 326

332 333 333

304 305

9

Data Center Architecture

306

9.1

Roles and Tools ..................................................................................................................... 338

309

8.1

Roles and Tools .....................................................................................................................

310

The SAP HANA Data Architect ......................................................................... Tools .........................................................................................................................

310

8.2

SAP Enterprise Architecture Designer ........................................................................

311

8.3

Scaling SAP HANA ...............................................................................................................

314

8.3.1

315

12

Data Distribution Optimizer ............................................................................. Data Lifecycle Manager ...................................................................................... Native Datastore Objects ...................................................................................

Summary ................................................................................................................................. 335

Data Architecture

Distributed Systems ............................................................................................

326 329 330

8.7

8

8.1.1

Table Partitioning ................................................................................................. Table Placement and Distribution .................................................................. Table Replication ..................................................................................................

SAP HANA Data Warehousing Foundation .............................................................. 331 8.6.1 8.6.2 8.6.3

9.1.1 9.1.2

8.1.2

316 317 318 319

Data Tiering ............................................................................................................................ 320

8.5.1 8.5.2 8.5.3

8.6

Scale-Up ................................................................................................................... Scale-Out ................................................................................................................. Configuring Scale-Out Systems ....................................................................... Scale-Out for SAP HANA XS Advanced ..........................................................

310

9.2

338 339

Implementation Overview .............................................................................................. 340 9.2.1 9.2.2

9.3

The SAP HANA Data Center Architect ........................................................... Tools ..........................................................................................................................

337

Sizing SAP HANA ................................................................................................... Implementation Partners ..................................................................................

340 342

Deployment Options .......................................................................................................... 344 9.3.1 9.3.2 9.3.3 9.3.4 9.3.5

Hybrid and Multicloud ........................................................................................ Single-Host and Distributed Systems ............................................................ Technical Deployments (MCOS and MCOD) ............................................... Tenant Databases ................................................................................................ Virtualization .........................................................................................................

344 344 345 347 348

13

Contents

Contents

7

Data Integration

285

7.1

Roles and Tools .....................................................................................................................

286

7.1.1 7.1.2

The SAP HANA Data Integration Architect .................................................. Tools .........................................................................................................................

286 287

SAP HANA Data Management Suite ...........................................................................

287

7.2.1 7.2.2

SAP Data Hub ........................................................................................................ SAP Enterprise Architecture Designer ...........................................................

288 291

7.2.3

SAP Cloud Platform Big Data Services ..........................................................

291

Enterprise Information Management ........................................................................

291

7.2

7.3

7.3.1

SAP HANA Smart Data Integration and SAP HANA Smart Data Quality ...........................................................................................................

292

SAP Data Services ................................................................................................. SAP Agile Data Preparation ..............................................................................

295 296

7.4

Data Federation with SAP HANA Smart Data Access ..........................................

297

7.5

Remote Data Synchronization ......................................................................................

298

7.6

Data Replication ..................................................................................................................

300

7.6.1 7.6.2

SAP Landscape Transformation Replication Server .................................. SAP Replication Server ........................................................................................

300 302

Big Data ...................................................................................................................................

303

7.7.1 7.7.2

SAP Vora .................................................................................................................. SAP HANA Hadoop Integration .......................................................................

Summary .................................................................................................................................

7.3.2 7.3.3

7.7

7.8

8.3.2 8.3.3 8.3.4 8.3.5

8.4

8.5

8.4.1 8.4.2

Persistent Memory ............................................................................................... SAP HANA Native Storage Extension .............................................................

321 321

8.4.3 8.4.4 8.4.5

SAP HANA Extension Nodes .............................................................................. SAP HANA Dynamic Tiering .............................................................................. SAP Data Hub and the Spark Controller .......................................................

322 323 325

Data Distribution ................................................................................................................. 326

332 333 333

304 305

9

Data Center Architecture

306

9.1

Roles and Tools ..................................................................................................................... 338

309

8.1

Roles and Tools .....................................................................................................................

310

The SAP HANA Data Architect ......................................................................... Tools .........................................................................................................................

310

8.2

SAP Enterprise Architecture Designer ........................................................................

311

8.3

Scaling SAP HANA ...............................................................................................................

314

8.3.1

315

12

Data Distribution Optimizer ............................................................................. Data Lifecycle Manager ...................................................................................... Native Datastore Objects ...................................................................................

Summary ................................................................................................................................. 335

Data Architecture

Distributed Systems ............................................................................................

326 329 330

8.7

8

8.1.1

Table Partitioning ................................................................................................. Table Placement and Distribution .................................................................. Table Replication ..................................................................................................

SAP HANA Data Warehousing Foundation .............................................................. 331 8.6.1 8.6.2 8.6.3

9.1.1 9.1.2

8.1.2

316 317 318 319

Data Tiering ............................................................................................................................ 320

8.5.1 8.5.2 8.5.3

8.6

Scale-Up ................................................................................................................... Scale-Out ................................................................................................................. Configuring Scale-Out Systems ....................................................................... Scale-Out for SAP HANA XS Advanced ..........................................................

310

9.2

338 339

Implementation Overview .............................................................................................. 340 9.2.1 9.2.2

9.3

The SAP HANA Data Center Architect ........................................................... Tools ..........................................................................................................................

337

Sizing SAP HANA ................................................................................................... Implementation Partners ..................................................................................

340 342

Deployment Options .......................................................................................................... 344 9.3.1 9.3.2 9.3.3 9.3.4 9.3.5

Hybrid and Multicloud ........................................................................................ Single-Host and Distributed Systems ............................................................ Technical Deployments (MCOS and MCOD) ............................................... Tenant Databases ................................................................................................ Virtualization .........................................................................................................

344 344 345 347 348

13

Contents

9.4

9.5

Contents

On-Premise SAP HANA .....................................................................................................

350

9.4.1 9.4.2

Appliance ................................................................................................................ Tailored Data Center Integration ...................................................................

350 351

Hardware Technologies ...................................................................................................

352

9.5.1 9.5.2

Intel Optane Persistent Memory .................................................................... IBM Power Systems .............................................................................................

10 Training and Support

381

10.1 Training .................................................................................................................................... 381

353 355

10.1.1 10.1.2 10.1.3

SAP Education ........................................................................................................ openHPI and openSAP ........................................................................................ SAP HANA Academy ............................................................................................

382 391 396

Operating System Platforms ..........................................................................................

356

10.1.4

SAP Developer Center .........................................................................................

399

9.6.1 9.6.2

SUSE .......................................................................................................................... Red Hat ....................................................................................................................

357 358

Infrastructure-as-a-Service Providers ........................................................................ 9.7.1 9.7.2

Amazon Web Services ........................................................................................ Microsoft Azure ....................................................................................................

9.7.3 9.7.4

Google Cloud Platform ....................................................................................... Public Cloud Providers ........................................................................................

362 364

Migration ................................................................................................................................

364

9.8.1 9.8.2 9.8.3 9.8.4

AnyDB to SAP HANA ............................................................................................ Software Update Manager Database Migration Option ........................ Custom Applications ........................................................................................... Third-Party Applications ....................................................................................

365 366 367 368

High Availability and Disaster Recovery ...................................................................

368

9.10 System Replication .............................................................................................................

371

9.6

9.7

9.8

9.9

10.2 SAP Services and Support ................................................................................................. 400

360

10.2.1 10.2.2

SAP Digital Business Services ........................................................................... SAP Support ............................................................................................................

401 401

360 362

10.2.3 10.2.4

SAP Help Portal ...................................................................................................... SAP ONE Support Launchpad ...........................................................................

405 408

10.3 SAP Community .................................................................................................................... 411 10.4 SAP Events .............................................................................................................................. 413 10.4.1 10.4.2

SAPPHIRE NOW ..................................................................................................... SAP TechEd ..............................................................................................................

413 413

10.4.3 10.4.4

CodeJams and SAP Inside Track ....................................................................... SAP HANA Operation Expert and Developer Summit ..............................

415 415

10.5 User Groups, Alliances, and More ................................................................................ 416 10.5.1 10.5.2

SAP User Groups ................................................................................................... Customer Engagement Initiatives ..................................................................

416 417

10.5.3 10.5.4 10.5.5

SAP University Alliances and SAP HANA Database Campus .................. HanaHaus and the Innovation Center Network ........................................ SAPinsider Magazine and Conferences .........................................................

417 418 418

9.10.1 9.10.2

Configuration ........................................................................................................ Multitier and Multitarget ..................................................................................

371 372

9.10.3

Active/Active Read-Enabled System Replication .......................................

373

9.11 Network Administration and Landscape Management ....................................

374

10.6 Summary ................................................................................................................................. 419

375 376 378

The Author .............................................................................................................................................

421

379

Index ........................................................................................................................................................

423

9.11.1 9.11.2 9.11.3

Network Administration ................................................................................... SAP Landscape Management ........................................................................... SAP Solution Manager ........................................................................................

9.12 Summary .................................................................................................................................

14

15

Contents

9.4

9.5

Contents

On-Premise SAP HANA .....................................................................................................

350

9.4.1 9.4.2

Appliance ................................................................................................................ Tailored Data Center Integration ...................................................................

350 351

Hardware Technologies ...................................................................................................

352

9.5.1 9.5.2

Intel Optane Persistent Memory .................................................................... IBM Power Systems .............................................................................................

10 Training and Support

381

10.1 Training .................................................................................................................................... 381

353 355

10.1.1 10.1.2 10.1.3

SAP Education ........................................................................................................ openHPI and openSAP ........................................................................................ SAP HANA Academy ............................................................................................

382 391 396

Operating System Platforms ..........................................................................................

356

10.1.4

SAP Developer Center .........................................................................................

399

9.6.1 9.6.2

SUSE .......................................................................................................................... Red Hat ....................................................................................................................

357 358

Infrastructure-as-a-Service Providers ........................................................................ 9.7.1 9.7.2

Amazon Web Services ........................................................................................ Microsoft Azure ....................................................................................................

9.7.3 9.7.4

Google Cloud Platform ....................................................................................... Public Cloud Providers ........................................................................................

362 364

Migration ................................................................................................................................

364

9.8.1 9.8.2 9.8.3 9.8.4

AnyDB to SAP HANA ............................................................................................ Software Update Manager Database Migration Option ........................ Custom Applications ........................................................................................... Third-Party Applications ....................................................................................

365 366 367 368

High Availability and Disaster Recovery ...................................................................

368

9.10 System Replication .............................................................................................................

371

9.6

9.7

9.8

9.9

10.2 SAP Services and Support ................................................................................................. 400

360

10.2.1 10.2.2

SAP Digital Business Services ........................................................................... SAP Support ............................................................................................................

401 401

360 362

10.2.3 10.2.4

SAP Help Portal ...................................................................................................... SAP ONE Support Launchpad ...........................................................................

405 408

10.3 SAP Community .................................................................................................................... 411 10.4 SAP Events .............................................................................................................................. 413 10.4.1 10.4.2

SAPPHIRE NOW ..................................................................................................... SAP TechEd ..............................................................................................................

413 413

10.4.3 10.4.4

CodeJams and SAP Inside Track ....................................................................... SAP HANA Operation Expert and Developer Summit ..............................

415 415

10.5 User Groups, Alliances, and More ................................................................................ 416 10.5.1 10.5.2

SAP User Groups ................................................................................................... Customer Engagement Initiatives ..................................................................

416 417

10.5.3 10.5.4 10.5.5

SAP University Alliances and SAP HANA Database Campus .................. HanaHaus and the Innovation Center Network ........................................ SAPinsider Magazine and Conferences .........................................................

417 418 418

9.10.1 9.10.2

Configuration ........................................................................................................ Multitier and Multitarget ..................................................................................

371 372

9.10.3

Active/Active Read-Enabled System Replication .......................................

373

9.11 Network Administration and Landscape Management ....................................

374

10.6 Summary ................................................................................................................................. 419

375 376 378

The Author .............................................................................................................................................

421

379

Index ........................................................................................................................................................

423

9.11.1 9.11.2 9.11.3

Network Administration ................................................................................... SAP Landscape Management ........................................................................... SAP Solution Manager ........................................................................................

9.12 Summary .................................................................................................................................

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 translytical by its competitor Forrester. Next-generation database, NewDB, and hybrid database (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 platform with its own built-in application server, text analytics, application and business functions, predictive analysis, big data and Internet of Things (IoT) connectors, spatial 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 enterprise- 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.

Who Should Read This Book? Nearly ten years of innovation has resulted in an overwhelming number of features and functions, acronyms, editions, product names, technologies, and terminology. Even at SAP, employees have had trouble distinguishing the SAP HANA Enterprise Cloud (referred to as HEC) from the previously named HANA Cloud Platform (referred to as HCP). There is a single SAP HANA service, b ut there are two environments. The platform supports three different types of replication technology: trigger-based replication; log-based replication ; and extract, transform, and load (ETL). SAP HANA smart data streaming (SDS, now SAP HANA, streaming analytics}; SAP HANA smart data access (SDA, using federation technology); SAP HANA smart data integration (SDI) with SAP HANA smart data quality (SDQ) for ETL; and smart data tiering {SAP HANA dynamic tiering) are all available, but how do these smart technologies relate to the

17

Preface

intelligent enterprise? What are 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)? 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 perfectly 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.

How This Book is Organized For readers completely nevv to the topic, you'll appreciate the key business benefits and capabilities we'll describe in Chapter I and the technology overview we provide in Chapter 2. In Chapters 3 to 9, we'll introduce the different SAP HANA personas. We'll wrap up the book in the final chapter with options for training and support.

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 overlap may occur, for example, with DevOps (we'll cover all the terminology and concepts throughout the book). In smaller organizations, the data integration architect persona and the administrator persona might be the same person and simply represent 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 responsibilities. 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 anyone 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 management and database management); and what its key benefits are. We'll look at customer 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 systems, 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 technologies. 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, studios, and cockpits. You'll learn how to configure system parameters, analyze performance and address resource management, and make backups and perform recoveries. In this chapter, we'll also describe how to install and update components and applications; what is called, in SAP HANA terminology, platform lifecycle 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 modeling profile and the application development profile. Both the information modeler 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 artifacts 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 Procedures (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 edit 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 technologies 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 practice, 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 inflight 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 solution 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 distribution. Data tiering is compared to temperature, with frequently accessed hot data, warm data, and cold data. Data distribution is particularly relevant in multiplehost, 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 capacity or for reasons of availability (the domain of the data center architect), data placement 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, technical 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 systems, and infrastructure-as-a-service (IaaS) providers (also known as hyperscalers) and address migration and migration services, network administration, and landscape 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 Education as well as no- or low-cost options like openSAP, tutorials from the SAP Developer 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 opportunities 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 perspect ives, and similar topics.

Code Clinic In this box, we'll provide code snippets to illust rat e th e topic, fo r example: SELECT

"Hello World!" FROM DUMMY;

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. Offici 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 Community to get started. To continue, you can use the Tutorial Navigator to find many others.

Acknowledgments and Dedication 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 participating). 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 Accelerator 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 enablement. 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 developers, 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 radicality was no redundant data. Never store data twice... that was the start of HANA. - Dr. Hasso Plattner HANA is for everyone. -Cerrit Kazmaier

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.

1.1

What Is SAP HANA?

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 database. Modern, because SAP HANA is being contrasted with the traditional disk-based

27

1 Introduction

database architecture. In the documentation, "SAP HANA" and "in-memory" are synonyms. Although the HANA acronym once stood for "HAsso's New Architecture" and fo r "High performance ANalytical Appliance", the product name SAP HANA these days is no longer spelled out. For most, "SAP HANA" is just a byword for "inmemory." The second part of the phrase points out that SAP HANA is both a database and a platform. SAP HANA processes transactions and analytics on a single system or, in other words, performs both online transactional processing (OLTP) and online analytical processing (OLAP). The "online" in OLTP and OLAP once expressed the novelty that transactions occurred in real time and not with punch cards updating the system overnight. Analytics, however, still requires special processing to get the data out of the system of record and into multidimensional cubes. With SAP HANA, this special processing is not required because it's a single database system, with a single data copy. SAP HANA is a platform because different technologies are integrated with the database server. When you start up an SAP HANA system, you're also starting up an application server. This functionality is built-in and promotes the concept of in-database processing and keeping a single data copy. The application server provides both a runtime and a development environment and is called SAP HANA extended application services (SAP HANA XS). Besides database and application services, the platform also includes a graph engine and a spatial engine; both are built-in as well and are accessible through the same SQL interface used fo r transactions and analytics. Other advanced analytics "capabilities," as features and functions are usually called, concern the execution of predictive analytics and business functions, and the manipulation of unstructured data (as opposed to structured relational data). To connect SAP HANA with the outside world (and the outside world with SAP HANA), you'll rely on integration services. These services provide connectivity to big data data sources, Internet of Things (IoT) devices, and external R and machine learning engines, but also address data replication, data quality, and data management needs in general. Finally, SAP HANA is deployable on-premise or in the cloud (running anywhere, as often expressed). The term "on-premise" refers to running the system in your own corporate data center. In this case, you'll rely on certified hardware and certified engineers to install and operate the platform. Deploying in the cloud refers to running SAP HANA anywhere else. Many options are available (public and private cloud, managed services, pay-as-you-go), 'Nith the latest offering being SAP HANA Cloud Services.

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 onpremise 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. The characteristics of SAP HANA we mentioned earlier- as database and as platform, in-memory, on-premise and cloud-are typically presented as shown in Figure 1.1.

SAP HANA On-Premise I Hybrid I Cloud In-Memory I Multicore Advanced Ana lytics Integration Services

Spatial Graph

Replication or Virtualization

Search

Any Data Source

Text

~6d

t> \/ ~

Predictive

App lication Services

Streaming Seri es

Develop and Run Applications

Machine Learning

One Data Copy Database Services

Figure 1.1 Characteristics of SAP HANA

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.

1.2 Key Capabilities Now that we've formulated some concise answers to the question "What is SAP HANA?'', let's examine our subject briefly from the four main angles: application development, analytical processing, data management, and database management.

1.2.1 Application Development

After the mainframes and dumb terminals of the early days in computer science history, the 1980s brought us a personal computer on every (office) desktop. In software architecture, in this two-tier model both the client (presentation) and the server (data storage) are running part of the application (business) logic. Internet technologies of the 1990s introduced the three-tier model. Applications no longer required a full client; now a browser sufficed. Except maybe for a bit of JavaScript, almost all logic was moved to the (web) application server. For various reasons, the same thing happened on the side of the data tier, and although great software has been made using this framework, by putting the brain in the middle, the database was downgraded to a mere datastore (or a data dump, some would say). Imagine an office where all the data resides in the basement. To process each business rule, clerks would need to request information from the people downstairs, who might need to locate a box jam-packed full of records and drag it upstairs. The clerk might pick out an order or t\.YO, ignoring the rest. and then make a change, sending the poor database guy back down to the basement to safely return the records to storage. That's three-tier data processing at its worst: slow and inefficient. Storage on disk makes data access slow. To mitigate this problem, developers have been tempted to load as much data as possible into the middle tier (SELECT*} for caching and processing. However, this approach to keeping end users satisfied vvith the response times resulted in a lot of wasted resources. Figure 1.2 shows these multitier architectures alongside SAP HANA.

30

1.2

Q

...... il!Ji . ...... .

Presentation Business Logic

-

~

-·-

Q

--

111111

......

il!Jl ......

Business Logic

Q

Presentation 111111

--

Business Logic

....--·-

Key Capabilities

Presentation

Control Flow Logic

-- -~Iii~-·••••••

~

••••••

Calculation Logic

Datastore

Data store

Data store

2-Tier

3-Tier

SAP HANA

Figure 1.2 Multitier Architecture

On the SAP HANA platform, code pushdown dictates that, whenever possible, business 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. 1.2.2 Advanced Analytical Processing Advanced analytical processing adds additional capabilities to the database. In a more traditional architecture, these technologies usually reside either on the application server tier or on another system all together. With SAP HANA, these technologies are all integrated on a single platform. SAP HANA includes a spatial engine, for example, which enables you to perform all geospatial processing in-memory as well as enrich transactions with geospatial data for advanced analysis. You don't need to manage a separate spatial database, and you won't need to integrate this database with your analysis environment (or maybe even with your system of record). This spatial engine is built-in, integrated, and runs in-memory. With an in-memory database, not only has slow disk access during processing been eliminated, the technology can benefit from massively parallel multicore processing (MPP) computing resources available to the platform.

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 technologies 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 combine it with business transactions. In addition. you can also combine graph with spatial processing and business transactions, and vice versa. 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, logistics, 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 algorithms are executed as an application function, which you can think of as a databasestored procedure written in a more sophisticated programming language to handle the required complex computations. Besides the application functions used by predictive analytics, SAP HANA also supports many business functions like deprecations, forecasts, net present value, and other commonly used functions by SAP business applications. The same application function technology is also implemented to execute machine learning TensorFlow functions. Predictive analytics

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 platfo 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 technologies 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 "inmemory" on a multicore computing platform.

32

1.2

Key Capabilities

1.2.3 Data Management What about big data? We know that the scale of big data is a moving target. By the time we can store petabytes in memory, data volumes will have grown to exabytes, zettabytes, yottabytes, and even onwards. Thus, for SAP HANA, the objective is not to store all data in-memory, but to provide connectivity and intelligent processing. With data virtualization services, you can connect the platform to data sources that are too large (data lakes) or too ephemeral (data streams) to store in-memory. SAP HANA smart data access {SDA) enables you to create virtual tables in the database and use the metadata to join remote sources to local database objects while the actual data remains in the place it is stored. If some of your data needs to be replicated, the SAP HANA platform offers enterprise information management (EIM) technologies to facilitate data integration and enhance data quality. For data provisioning- that is, the whole process of making data available to users and applications - to be properly managed and secured, d ifferent replication technologies are available to bring data from any source into the platform. For SAP data sources, you can use SAP Landscape Transformation Replication Server. For data sources that require additional processing, for example, to merge different data sources, also known as extract, transform, and load (ETL), you can use SAP HANA smart data integration (SDI). The third option is SAP Replication Server, which performs replication at the database log level. This option provides great performance even for large volumes. Data replication and integration is the topic of Chapter 7.

1.2.4 Database Management Focusing now on the core database management layer, note that SAP HANA as a database contains both columnar and row (and object) storage; in other words, SAP HANA is a hybrid database. High compression rates on column store tables, together with the elimination of redundant data structures (aggregates) and the exclusion of business data that is no longer "actual," enable you to put entire enterprise datasets inmemory. To make this capability affordable and efficient, SAP HANA uses different data tiering technologies (persistent storage, native storage extensions, extended storage) to separate frequently accessed "hot" data from "warm" an d even "cold" data; only the most relevant data is kept in-memory. We'll dive into this topic in Chapter 2.

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 processors are supported. 896 processor cores enable some serious MPP. Non-uniform memory access (NUMA)-awareness and single instruction multiple data (SIMD) support 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 provides 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 covered Chapter 9.

1.3

Key Benefits

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 delicate 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 writing), this feature is almost unrecognizable compared to how it was initially implemented 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. 1.3.1

Reduce Complexity

Since 2010, SAP's ad campaigns have gone from "Run Better" to "Run Simple" to "Run Live" to "the Best Run" and, more recently, to the "Intelligent Enterprise." Reducing complexity was a recurring theme in all of these campaigns. We'll explore the technical side in more detail in Chapter 2, but from the outset, SAP HANA was designed to simplify the enterprise landscape. By leveraging currently available hardware technology, multicore processors, and large memory configurations on the one hand and keeping just the raw data on the other. all enterprise data could be stored in-memory. With a single data copy, there's no need to maintain complex IT landscapes with separate systems to provide the necessary ETL technology to replicate transactional data to enterprise data warehouses (EDW) for business intelligence (BI) and analytics. You'll see in Chapter 2, when we discuss sizing systems for SAP HANA, that the removal of aggregates and other superfluous data structures can significantly reduce data volume. Compressed and stored in memory, calculations can now be made onthe-fly on raw transactional data for real-time analytics, not on the stale numbers from intermittent data replications. Real-time analytics, combining OLTP and OLAP, as mentioned earlier, is a characteristic feature of the SAP HANA database. A single database with one data copy provides a less complex IT landscape than a transactional system combined with one or more data warehouses plus an ETL factory in between. Landscape complexity is further reduced when you consider SAP HANA as a platform. Application services, supporting applications developed to be "powered by HANA", no longer require the traditional three-tier stack. Business logic processing now mainly takes place inside the database, not on a separate system connected with a dedicated pipeline to the database to pump all the data back and forth. For business rule processing, SAP HANA uses not only database-stored procedures written in SQLScript, a proprietary procedural SQL language extension similar to other database programming languages, but also uses application and business functions. These functions contain complex and performance-critical algorithms written in a more low-level programming language and are linked dynamically to the database kernel. We'll describe these functions in Chapter 5.

35

1 Introduction

To continue the argument, besides application services and an application development environment to both build and run applications, the SAP HANA platform also provides several different types of analytical processing engines (introduced in Section 1.2.2). Normally, these engines would each require separate hardware and additional system management operations. With SAP HANA, spatial, graph, series, and text processing engines as well as predictive analytics and streaming analytics are all integrated with the platform, and by "integrated," we mean that the technology is built-in. Except for streaming analytics, these engines can't be removed and come included with the platform. All these advanced analytics processing technologies (standard analytics is a core database feature) benefit from in-memory processing. They execute on the data without the need for data replication or for plumbing to connect these services to interact with operational business transactions. And we mentioned earlier but vvant to stress. these technologies also complement each other. You can enrich IoT streaming data vvith spatial data and use this as input for predictive analytics. Or, you can combine text analysis with predictive analytics and the graph engine. The result of less complexity is a lower total cost of ownership (TCO), the standard business benefit qualifier. Although using the latest processor technology and large memory configurations won't come cheap, many hardware and cloud infrastructure partners are competing with certified SAP HANA configurations. This does provide some interesting offers and certainly enough choice. The alternative, a more traditional BI landscape with a multitude of systems, also requires a considerable amount of hardware (although '.Ve do find a lot more commodity systems here). However, when you factor in IT; the operations needed to keep the traditional BI system landscape up and running; all the ETL gears greased to support the data flow from system of record to EDW, data marts, and BI. the total picture looks quite different, and for this reason, simplification (or reduced complexity, if you prefer) with the associated reduced overall spend has been heralded as a key SAP HANA business benefit.

1.3.2 Run Anywhere

Next to a lower TCO, the second item on the CIO wish list is agility, that is, being quick to adapt to changing circumstances. For SAP HANA, this requirement is fulfilled with a range of deployment options. We'll address the SAP HANA hardware directory in Chapter 9 when we dive into the topic of data center architecture, but as a sneak preview, let's just mention that over 1,000 certified configurations are available from 13

36

1.3

Key Benefits

different hardware partners. most of them household names. For cloud deployments, 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 management yourself. The different deployment options are shown in Figure 1.3, along with the fourth category 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.

SAP HANA Enterprise Cloud SAP HANA on Pu blic Cloud (laaS) SAP Cloud Platform, SAP HANA Service SAP HANA Cloud Services

Hybrid

----

111111

111111

----

Appliance

• Tailored Data Center Integration (TDI)

Figure 1.3 SAP HANA Deployment Options

37

1 Introduction

1.3.3 Real Results The real results obtained with SAP HANA have been the topic of many customer case studies and other SAP publications. Results have also been presented on stage during various SAP conferences, starting with the product launch keynote at SAPPHIRE NOW in Orlando, Florida, in 2010. In the 2019 keynote, "Experience the Intelligent Enterprise," Hasso Plattner opened with a recap of SAP HANA's in-memory revolution. The presentation showed a picture of the whiteboard containing the first calculations and ideas, taken at the Hasso Plattner Institute, University of Potsdam, in 2006, together with some impressive numbers for SAP HANA, tagged as the "Foundation of the Intelligent Enterprise": • 50,000+ customer licenses • 72 terabytes, largest customer on scale-out • 48 terabytes. largest customer on a single node • 100+ m illion transactions processed daily for a single customer • 7 petabytes of SAP HANA licensed productively 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 deployments. 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 highlights on the event website http://s-prs.co/v488402.

38

1.4

Finding Customer Stories and Use Cases

~SAPPHIRENOW 1 ~m~~~ Home

Agenda ...,

ASUG

Sms1ons "'

Show Floor

May 7-9, 20191CXlando, Florida

Exhibitors

Venue & FAQs ...,

~

On Demand ...,

SAP Keynote - Experience the Intelligent Enterprise Duratiol'I: 90

Folk>w SAPPHIRE NOW

0 0 Cl:) C)

Follow ASUG

0 0 Cl:) C)

Figure 1.4 SAPPHIRE NOW 2019 Keynote

1.4

Finding Customer Stories and Use Cases

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 performance management, human resources, manufacturing, marketing, predictive analytics, sales, service, and supply chains, to name a few. All industries are represented; 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 format is either a video testimonial or a reference PDF for you to download or share.

39

1 Introduction

424 results

Filter

0

,..,..._. SoluUon

O

'

-

Learn How AES Big Sky Creates a Platform for Future Innovation (90·seconds version) 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 0

All lnn: •

Rt2i0n: •

Europe (FfritLl'I)

IIl

Etwlromaent Neo ~ovider:

Ewope (Ned'liertands)

RellOn

oescnl)l.on: ·none--

De'SCf'C)tllOn: -none-

,,

& Neo Amsterdam

If

ID

Description

If

SAP •

Europe (Amsterdam)

-non~

ID

Learn how global a~unts and subaccounts relate to each other and find recommendations for setting up your atcount model

Figure 2.7 SAP Cloud Platform Cockpit: Subaccounts

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

SAP Cloud Appliance Library

The SAP Clo ud Appliance Library, shown in Figure 2.8, is a tool that enables yo u to deploy the latest SAP on-premise solutions in the cloud. A "solution" in this context refers to a preconfigured environment (the "appliance"), typically an SAP HANA database backend system and a (\"lindows) client frontend system, with in some cases a bastion or jump host for added security (a VPN access point). SAP

Infrastructure-as-a-Service Providers

SAP Cloud Appliance Library Solution A

~;:~

Solution B

I

Solution C

~--

Solution D

~ ........

Amazon Web Services (AWS)

----------- --

_ ~~-1-ns-t-an_c_e-~I

-------------~~-'_ns_t_an_c_e_~

-- ... _......

Microsoft Azure

~-----~---..i

-~

Instance

I

Instance

~----~

....................................

.--~-.... -.... -....-....-~-~---_-1_n-s~t_a-n~c~e~~~------, Solution Z Google Cloud Platform Figure 2.8 SAP Cloud Appliance Libra ry

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 several steps, such as hardware and infrastructure setup, the installation of the operating 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 solutions 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 education 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 HANA,

EXpms Edition C!li9

EID

0

Activated

create IMtance

•••

e

Available

Creatt lnsQOCt





Aval!abte

Create Instance

•••

e

Available

create 1nsuince



Amazon V\'eb services, h.iiCrosott Atu1e, Google Cl.oud Pla:fOfm

e

AvaUable

Create lnstal'ICe



Amazon V\'eb services, h.iiCrosott A.lure , Googlt Cl.oud PlatfOfm



AvaHable

Create lnstal'ICe



Amazon V\'eb serv'ices, h.,icr0$0tl Azure , Goog.te Cloud Platf«m



Available

Create lnstal'ICe

Mazon Y..'eb Strvicts. h.t icrosott Azure,

e

Available

Create Instance

•••

e

Avanable

Create 1nst11t1Ce

•••

Amazon \\'eb Services, h.ticrosott Ature. Google Cl.oud Platf«m



Available

creatt Instance

Amazon \\'eb Services, h.ilcrosott Ature. Google Cl.oud Platf«m



Available

creite Instance

Amazon V\'eb seMc:es, Microsoft Azure, Google Cl.oud Platf0tm



Available

Create Instance

Amazon V\'eb Services. Goog\e Cloud Pla~f0tm

.a

SAP Model Company lor Fashion and Vertical Business V2 with CAA add·On

SAPS.E I sep 4 , 2018 SAP NetWeaver AS ASAP 7.52 SP01 on

SAP ASE 16.0

•·;·'·'*

SAP SE I '-"8 29. 2018

All'lazon 'A'eb servkes, t-.bcrosott Azure. Google Cloud Platf0tm

All'lazon V\~b Stl'Ylces, Microsoft Azure, Google Cloud Platf0

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 chapter, we reviewed the history of databases and the genesis of the in-memory platform. We described system architectures, various processes and services, memory and persistence, scale-out configurations, databases and application servers, and data tiering. 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 innovation 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 Platform, SAP HANA service. In the following chapters, we'll focus on the different personas working with the platform, 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 We shape our buildings and afterwards our buildings shape us. - Winston Churchill

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 management, 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 administrator 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

3.1

Role and Tools

Let's start by looking at the responsibilities of the SAP HANA administrator persona and the tools at his or her disposal. In this section, we'll briefly describe the job role and associated tools.

3.1.1

The SAP HANA Administrator

The system administrator's responsibility is to make sure the system serves its users as best as possible. Each system will be different as will be most use cases. Many documented system parameters can be set (and an even larger number of undocumented ones). Default values cover the most common settings but might require adjustment for particular situations. You'll rely on your system administrators to be familiar with these parameters. They'll need to determine which parameters can be safely tweaked and adjusted and which would be best left alone. Assuming initial system sizing was performed adequately, one job of the administrator is to manage system resources. Memory management- SAP HANA is an inmemory database, after all- is important, bu t if suddenly all your storage is full, you'll be in trouble. Would you benefit by placing your log volume on solid-state drives (SSDs), and how should you configure the native storage extension optimally? Something may go wrong, which causes something else to fail, and the chain reaction continues (in other words, Murphy knocks on our door). Have we practiced database restore routines enough, or are our routines fully automated and can we trust they won't fail? Besides business continuity concerns, the system administrator is also responsible for keeping an eye on system performance. A system may be accessible, but if response times are not acceptable, the system does not serve its purpose well. Workload management provides a solution to separate different types of system usage. You don't want long-running jobs to impact ad hoc queries. How can you manage peak loads? For this issue, the admission control feature presents several choices. You've seen in the previous chapters that SAP HANA is both a database and a platform and includes application server runtimes. Like the database, the application server needs administration as well. You'll need to manage system resources, provision users, address security, and troubleshoot issues. As the technology is quite distinct, you'll be using different tools. The required skillset, however, is quite similar.

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 management. 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 cockpit, a web-based tool that integrates both application and platform lifecycle management 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. Linux Command Line

The SAP HANA server runs on Linux. Thus, basic operating system administration skills and a certain familiarity with Linux administration tools would certainly benefit the administrator. You'll have access Linux tools such as vi, secure shell, top, man, kill, and, for when you're confused, whoami. To install the SAP HANA server, you'll need root level access to the operating system, and for best performance, you'll need to understand file systems, mount points, storage subsystems, and the configuration of the network interfaces. Probably the most used SAP HANA command is HOB, which is actually a script that runs the commands to start and stop a local SAP HANA instance or that lists process information (from ps}. Most of the actual commands are executed with the sapcontrol utility, the same program used with SAP NetWeaver. As you can't connect your screen and keyboard directly to the SAP HANA server {practically speaking), you'll use a terminal program to connect to the system. When using a Linux client or macOS, you can use the Secure Shell (SSH) program. On the Windows platform, you can use PowerShell or a third-party program, like PuTTY, as shown in Figure 3.1.

97

3 Administration

x

0

4cadm@mo-lcaae8fcb. mo :/usr/sap/H4C/HOB96> [email protected] :/usr/sap/H4C/HOB96> HOB sage : /usr/sap/H4C/HOB96/HDB { startlstoplreconflrestartlversionlinfolprocladminlkilllkill-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 [email protected] :/usr/sap/H4C/HOB96> [email protected] :/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

Figure 3.1 Running Linux Command Line Tools Using PuTTY

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

SAP HANA Database Interactive Terminal

Every database understands SQL. The tool included with every SAP HANA server and client installation to enter SQL statements is the SAP HANA database interactive

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 reference 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 automate script executions (housekeeping and backups, often in combination with the Linux cron scheduler), hdbsql can be quite useful. The complementary tool hdbuserstore 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.

SAP HANA Studio

SAP HANA studio has a lot of fans . The tool is a plugin for the open-source Eclipse integrated development environment (IDE). Eclipse has its origins in the Java world as an IDE client tool, so a Java runtime (IRE) is required, and database server connectivity is provided with Java Database Connectivity (JDBC) (see Chapter 4, Section 4.10.3).

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 administration. 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 provided 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 modeling.

·-.

Development for SAP HANA studio ended with the last SAP HANA 1.0 support package 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 functionality. 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). hdbstudio - System: SYSTEM08@1HA0

: gg '1' .EI



fo SytteMS tl !If· lil I

~ 0

;Ji- ·

!S e ~

0

I I S'YSTEMOMHAO tl

rfi SYSTEMOB@HAO (SYSTEM)

... mo·lc331b341.JnO.sap.c«pOO

L.,t Update: M.y 2 7, 2019 1:11:24 PM

ie-

(9>

~uv.I: 6lO • Seconds

0

fa •

• {5SYSTEM086'HAO !SYSTEM)

.. (lt.c.~ioo

ls.vie'"1 Hosts Aed i$111bUtion Sys~•m RepbbGn J Hol.1: 'l} ~Wet-: A«i... HoSI Pot1 StMc• ... 0t11ll Slt tl Tlm a.. c~

x

) . . (Otlttnt

> Qt. Pt1Msioning > Qt. SKurity

lSJ HAOOHAO(SYST"q

> ~ SV$T(MO$CH4( (C0 lnttrV•t ~

~ttm ...fom1ation~Dw~sis Flies Tr1ce~rlbon

q;

Hcxt • mo·fc3J7bl61.mo.-

Systtm

) [) •ttriibul:~lnl

) Ii (.C~NO'.lnii ) 13 di~ttvtt.ini



> [j dornore..ini ) [il d~tfYO,ini

) ll HStMf,ifii

) I) CXt ) )

(il sutisticsstl\'ttJni (j Wtaming$0Vt:t.ini (il x:scontrolltt.-,i

v

lj Ueft9l~

[il KriplStfWl'.ini

) [ J application_[)

comm11t1ic.ttion ) ( ) 9t0

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 Landscape 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 applications. 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 Monrtor Landscape

Manage Landscape

Re-source Dltectory

Prooucuon

4 Resot.l'oes

1 Resource

·-

·-

I

SAP ONE Support

Oeveklpment 0 Resources

Test OResources

Admrllsuation Help

[!;!;!

1 ~Mt11s1-..s

Academy

Ho fffOl.R:a ft91$1eted

lfo tesoufteS fe91*red

Manage landscape

conr.gurauon

compare

Templates

Conngurat10ns

~.tanage COCkpil

Browse Oatabase-

execu1e SOL

Objec1s

f$tlm v

SYSTio

o54.s3-1

131074(144). 1

4t2186232t1

131074{144). 1

9441c0f7Wb

131074(144). 1

d08b797'b1c:O

131074(144). 1

63t626tal00

131074(1'4). 1

41•tbld589t

131074(144). 1

..... ..... ..... ..... ..... ..... ...... .....

..._

.........

®

c

0..r .. PllnCachct

©

v

EXPEN~ STATEMENT

v... o.....

SOL Plan Cacnes (2511590)

su........ Slrlng

Statements

System Adm inistration

........

· ·~

. .. .

Save/I.£

v

Conlgure

T•ble Typt

Pllft 10

Al•-

Execution Counl

Total Curt

""" """ """ """ """ """

15640003

286021

2

12n3

15650003

89548

2

9681

15660003

171943

2

12377

1S380003

134213

0

0

1S390003

171087

0

0

15400003

230090

0

0

151686

0

0

236547

0

0

171909

0

0

...............

f UI SOL Sta'9met11

More Sllf(I (tSt( {$1a(T'OJl(Cw.l.(Ml,\IAIJA)/ l*l>f/W::4 )} .\S 0t

C1fW7CI0:40180000000

fa3Tt>301.tnO.Mp.oof'p:

Ob2f4

30007

...... HASMJOIN

3853.1

72.5081

tc337b361..mo.up.corp: 30007

..,,,,.

..

~ ..-..-.... ----------~

Figure 3.11 SAP HANA Cockpit: SQL Analyzer

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 processor, 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. 8

(

tlt

W"

I

SCl@SCI (system)

System Health v J

------------

c ®

SC1 Fi ter by Host

Hosts (6) las:t 10 minutes.. Data From: Jul 13, 2019, 8:42:09 PM HKT; ·Last 24 hours.

SAP HANA Wor'ker Host

St.tu•

CPU(%! Memory(%!

...,..56600708a

xlyl56600701a

xiyl56600702a

xly1566007ooa

ldyl5660070Ca

0

0

0

0

0

Runnfn9 0

Critic•I Alerts

SAP HANA Stan

Runni~

0

____ _____-

Running

0

Runni"$1

I

l l J---~----

.....,

0

0

0

0

0

0

0

St•tementa MVCC Versions

Disk l/O

0 No 0.0.

No C>o1a

0

0

41

0 No Data

Dis.It Us.ag• (%)

Nttwort VO

Running

_ _.,__,\,. . . . __,__J____,,__J ~ ~

No 0.0.

- - - - - - - - - - - - - --' ______, ~J.J..

No C>o1a

____ ____ ____ _____

No C>o1a

__,

__,

__,

~

No 0.0.

Figure 3.12 SAP HANA Cockpit: System Hea lth 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 system through the SAP HANA cockpit. To improve system performance, you can use Plan Stabil ity and Statement Hints.

114

3.2

SAP HANA Cockpit

System Administration

Home

Monitor Landscape

Manage Landscape

Resource Directory 52 RMOU"'8$

Production 1 Resources

....

_

SAP ONE Support

Development 10 Resources

Test 4 Resources

Academy 7 Resources

7

3

Not Running

Nol Running

6

....

_ 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

4 Resources

2 Resources

9 Resources

5 Resoul'C8$

_

2

.... 2

NotRurving

Administration Help

4

2

Not Running

Not Running

3

2

Running~ tssuet

Running wlh lswtS

[gJ

Manage Landscape Configuration Templates

Compare Configurations

Manage Cockpit

Browse Database Objects

Execute SOL

Figure 3.13 SAP HANA Cockpit: Home

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 without 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 comparing apples with apples?} The load shown in Figure 3.15 displays the most important counters for resource usage.

115

3 Administration

Sample Replly Stat! Tme 201g.01-1s 11 os 06 (GMTZ) Capture 201$.07-15 1047 23(GMTZ) ·201M7·1S 10 SOS3(GMTZ)

nne

,, ,..

-0..-

Pl'eprOOellS Sit•

., _...... ......_ ... _ .. -" -0.. .... _ -"· .... ..... ....

Capture lnfonnat1on

,,.OCIS! Size

~""

~""

mo-k331'b3$1

"""' •

.... ~

406

.....,,.,

SlalMll!ltC T,,_

40$

l>Nba5e Sy ll

285

....

886 03'byles 11 .9",299br*

0

s.

0 0

Taroet System lnlonnation

1.858

~T'1

.,

Ccwm*ledTr~

1.29K 1.86K

11.35 M8

00:01 :52

.,_...,.

-,..-.

I

l001l

~L.

"

P~Tr

... o

Figure 3.14 SAP HANA Cockpit: Replay Monitor

Companson Repclf1 v

Sample Complrilon Type CIPui• to~ ~ 10

--

.,_,......,.,

~ CP\J

-C-.Wow)

~ .•c•11.•g:.

- - - --1

J

1..........,

Ho1tn1m.t.: •

Hl9h.llt..tllt~!l ,ty

GtMtp:

0•~1wori:.c-1t.,1

,___ _ _ _l[!ru

Oat~t St-'by(tt~)

l~

"""'k•)

~ T°Ml'it19 Vt.'Ofkoet ( trtended.,st«~

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•

Figure 3.28 SAP HANA Lifecycle Management, Distributed Installation

136

I

•••"

I

c..,..1

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 generally 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 support it. For more detailed information, see SAP Note 1906576 - HANA client and server crossversion compatibility. As shown in Figure 3.29, with the command line installer, you can generate an installation template file, which can then be called on the command line to perform automated installations in batch mode. Passwords are passed using a separate file for additional security. Parameters specified on the command line overrule those specified 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 SAP HANA Lifecycle Management - SAP HANA Database 2 . 00 . 041.00 . 1560320256

••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

Scanninq software locations . ..

Detected components: SAP HANA Database (2.00 . 041 . 00 . 1S603202S6) in /hana/install/SERVER/SAP HANA DATABASE/server Config fil• templ&te ' /tmp/inst&ll . rsp ' written Password file template ' /tmp/install.rsp.xml ' written Confiquration file template created ~o-!c331b361:/hana/.nseall/SERVER/SAP_HANA_DATABASE f vi /tmp/install.rsp ~o-fc331b361:/hana/install/SERVER/SAP_HANA_DATABASE # vi /tmp/install . rsp . xml =o-fc337b36l:/hana 'install/SERVER/SAP_HANA_DATABASE t cat /tmp/install . rsp . xml I ./hdblcm --aid• DBl \ > --read_password_from_stdin=xml --confi9file=/tmp/install.rsp -b

I

SAP HANA Lifecycle Management - SAP HANA Database 2 . 00 . 041.00 . 1560320256

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• Scanninq software locations ...

Detected components : SAP HANA Database (2.00 . 041 . 00 . 1560320256) in /hana/install/SERVER/SAP HANA DATABASE/server

Figure 3.29 Automated Server Installation with Configuration Template File

137

3 Adm inistration

To update your system, you'll use the same tools and the same procedures. This activity 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 distributed installations is simplified. = System ident ifier, e.g. HAO =Instance number, e.g. 00 =Host number = Volume identifier

I hana/

usr/sap/

hostctrl (SAP host agent) ,____ home SYS

1--

/

data/

L

mntOOOO/

L L

HDB

L

/

log/

I

t--

-----------------)>

datavolume 000.dat

mntOOOO/

L shared/

hdbOOO/

-

hdbOOO/

L

/

logsegment_OOO_OOOOOOOO.dat

HDB global profile exe hdblcm

Figure 3.30 SAP HANA Recommended File System Layout

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 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 recreating 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 version 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 reason, 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 HANLM-PLT/HAN-DB, see SAP Note 2115815 - FAQ: SAP HANA Dat abase Patches and Upgrades.

3.3.4 Application Lifecycle Management Although q uite similar in name and similar in purpose (as a tool to install, update, and configure software), SAP HANA application lifecycle management is quite different from the platform lifecycle management activities discussed so far. Application lifecycle management is more of a development and administration topic and much less a system administration responsibility. Conceptually, application lifecycle management works the same for the classic SAP HANA XS implementation as for SAP HANA XS Advanced model. Technically, however, these runtimes are completely different, and so, you'll also use different tools.

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 partner 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 products, along "llVith an installation history.

Manoge Software Components

Installed Software Components (9)

XSAC_ALM Pl UI (up.com)

-

113 2

1.0.36

15.11

AfJI 15, 2019, 11:33 21 AM by

Support Info

Ap 15, 2019. 11;40:38 AM by

Support We>

XSA_.AOMIN, Process 10 2725

SAP Enterpns.f Atc.htte-aure On!pr 1.0 for SAP HANA XSAC_HRTT ( s-ap.com)

Support Info

XSA_ADMIN, ProcttS ID 2501

XSAC fllEPROCESSOR 1 0 XSAC_HAHA_ EA_ O (up.com)

AfK 15, 2019, 12:0927 PM by XSA_AOMIN, Proc.u 10 4207

GUI kit HALM tor XSA (tt~ prodU(t installtr) \'tr$10n 1 XSAC_FILE_PROC (up.com)

-.Info

2.9.23

Ap lS. 2019. ll;45:30AM by XSA_AOMIN, Process 10 3033

Support Info

140

Apl5. 2019, ll-47-S7AMby XSA,..AOMIN, Proc.ss 10 3257

~Info

4 .¢.0

... l5. 2019. 115allAMby XSA_AOMIN, Process 10 3403

SAP HANA toob f« .ciceulng ~tatoa content. data prt"Mw, SOL consolt, fl(.

XSAC_PORTAL_SERV (up.com)

Dew(op lt-.d"*'uMw:

•11nr;::.1

,_....,_,..,.

f.i@@•

codi¥>il..tv:ll>-1YC

,,, ,,, '"

4i!TtHft·•

_...........

111

•1r.r.n:.1

codiPl.o&lncl~IVC

111

«.irtti@•

,_..................

111

4$$¢".•

~-tetetftell'y.....C

'"

f.il@@•

~-

111

4'!@¢·•

coclrOit•ua-svc

111

f.ii· i·i :.•

c~149gi11ry.

Oii

Figure 3.32 SAP HANA XS Advanced Cockpit

_.,_

---------..........

..........

..........

-

.......

6'M8

I>

® Iii

18 M8

I>

• Iii

I>

,,. ....

® Iii

I>

® Iii

6'M8

I>

® Iii

I>

® Iii

12&"8

I>

® Iii

™""

I>

® Ii

I>

® Iii

128"8

I>

® Iii

128"8

I>

® Iii

1:24 MB

I>

® Iii

I>

® Iii

$12M8

I>

,

® Iii

I>

® Iii

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 configurations 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 Services view, you can add or configure different microservices. SAP HANA XS Command Line Interface Convenient as it may be, you can't perform every task in the SAP HANA XS Advanced cockpit. For some activities, you'll use other web applications, like the product installer described in Section 3.3.4 for SAP HANA XS Advanced application lifecycle management. However, sooner or later, as an administrator, you'll need to open a command prompt or terminal and use the SAP HANA XS CLI. The CLI is installed on the SAP HANA server when and 111•here you installed the runtime, but you can also download the CLI and install it on your computer (Linux, macOS, or Windows). Although the command is xs (and not xsa), this CL! exclusively works with SAP HANA XS Advanced model and serves no purpose for the previous SAP HANA XS implementation. Start 111•ith xs help or look at the command line reference to get started. Users already familiar with the Cloud Foundry CL! (cf) will be at an advantage because most commands work the same. SAP HANA Deployment Infrastructure To deploy development artifacts to the runtime environment, SAP HANA uses the SAP HANA Deployment Infrastructure (HD!}.

Although mostly a development topic that we'll return to in Chapter 4, Section 4.6, HD! also requires a bit of attention from the administrator. For example, you'll need to enable HDI and create an HDI administrator with the appropriate privileges. As an HD! administrator, you can then proceed to configure general HD! parameters and create and configure containers and container groups. The container concept is central to HDI and provides the required isolation for both design-time development artifacts and runtime database objects. Artifacts are stored in design-time containers (DTCs), while database objects are stored in runtime containers (RTCs). A DTC is always attached to a target RTC and is owned by a dedicated technical database user. Examples of HDI configuration parameters are transaction_ lock_wait_ti meout, max_parallel_jobs, and treat_errors_as_warni ngs. Container groups can be used to delegate the administration of sets of HD! containers to different HD! administrators.

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 Administration 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-XSRT, 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 specific 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 developer.

145

Chapter 4 Development In reality, programming languages are how programmers express and communicate ideas - and the audience for those ideas is other programmers, not computers. - Guido van Rossum Simpler solutions are more likely to be correct than complex ones. -Occam's razor

This chapter is for those of you working on the SAP HANA project who aren't developers and for developers with a different background who first want a comprehensive 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 developers 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 pushdown, we'll proceed with SAP HANA modeling and continue with the native development 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 environment and the SAP Cloud Platform, SAP HANA service. Next, we'll describe the different 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 training 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.

4.1

Role and Tools

What are the responsibilities of the SAP HANA developer, and what tools does he or she have at their disposal? Jn this section, we'll briefly describe the job role of the developer persona.

4.1.1 The SAP HANA Developer The SAP HANA developer job role covers a number of different activities, all requiring a good understanding of in-memory databases and the SQL and SQLScript languages. When modeling, you'll create analytical views based on a number of source tables. You can use the friendly user interface {UI) of your integrated development environment {IDE), whether a full client like SAP HANA studio or the SAP Web IDE for SAP HANA, but inevitably, at some stage, you'll require a solid understanding of SQL and SQLScript for some hardcore coding. When developing an application specifically for the SAP HANA platform (in developer speak, natively; that is, not a generic HTMLS or Java app that runs more or less anywhere). you'll use the same development tools and still need the same solid grasp of SQL and SQLScript, but the scope will be much bigger. You'll define your data

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, development 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 database 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 services ranging from ASAP runtime environments to blockchain, machine learning, the Internet of Things (IoT). and more. One of those services is the SAP Cloud Platform, 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 edition.

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 editors 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. SAP HANA Studio Although not recommended for use with SAP HANA 2.0 and no longer available for SAP Cloud Platform, SAP HANA service, SAP HANA studio is still frequently found on older SAP HANA 1.0 development environments. The tool is easy to use, and many developers are already familiar with its menus and its workflows. For the initial releases of SAP HANA, for modeling and later for native development, the Eclipse (Java) IDE was leveraged with plugins that provided modeling and development "perspectives." Figure 4.1 shows the modeling perspective, with the Syst ems view on the left pane listing all the SAP HANA systems you can access, and the Information View editor on the right with Scenario, Det ails, and Output panes. The terms "perspective" and "views" are used in this context to describe the different areas in the Eclipse IDE and should not be confused with the actual development artifact also called a view (i.e., a calculation or information view). In the Scenario pane, you'll select the tables to be used as inputs for the calculation view, which is called the data foundation . In contrast, semantics represents the output structure of the view. In addition, a number of "views" show properties, job log, where-used lists, and other information (most are hidden from display due to limited screen space but only one click away on the toolbar to the right}. You can also create your own perspectives to match your modeling preferences. The Eclipse IDE was popular with developers, not only for Java but also for other development languages. ABAP Development Tools (ADT), SAP Business Warehouse (SAP BW} modeling tools, the SAP Cloud Platform software development kit (SOK} for Neo, and SAPUIS tools are all available as plugins (this list is not complete). Most developers will have worked with Eclipse before, which means instant productivity without first having to learn new tools. In particular, for developers new to the SAP HANA platform, the Eclipse IDE is quite easy to use compared to alternatives like the ABAP Workbench with SAP GUI.

150

4.1 Role and Tools

0

workspace • SAP HANA Modeler • syste-m·local.bwbwseatch.SAPINJ.AOSO.METADATA::PRIMARY HOB (SYSTEM) •

-"

Edip~ Platform

. • . •e; fo Syslemi &I ... l!ll • !ill II • "' I# 8 iO

ii

;i

C

~

,, le HOB (SYSTEM) [Product'Ol'I Syrtem)

0 •

systtrn·loc.albw.~1th.SAPIN1ADSO.METAC».Tk:PRIMARV HOB (SYSTEM)

system-local .bw.bwsearch .SAPI NJ A OSO.METAO ATA ::PR IMARY HOB (SYSTEM)

.........

~ S•ckup • ..... C.U&o9

.,, ...

.. Bl j)\lbliic systttn•~I

• IB ...

"' 1B bwf.t,.-ch "' f! WIN.1

• 18 AOSO

EB " SI fl

AINX ALvt

• 18 AKI • 18 AKO • IB "'"-'

-·-· ''°""°"" -·'""°""""""J ·---·().ta'°"'"'....,,

··~

fltolCSCn (TIJ

• SI

ELEM fl fit FBPA

Elf

HCPR

~-

-~w~



--

fl Bl DESl fl Elf DMOO

• 18 HAAP

-·----· ·--·--·

~-

• Ii COEM

fl



fl (It IOBJ

• EB

lQRY

• 18 LSVS

°""'

't IB et ltSOS fl fl fl

!Y. ..od

"

£B SEGR £B TttC-S £B TAfN

Cl

0 0 . 4: .

@ lt dll

---

"' . . Conttne

"' #

1'3

Output

• •

··-··--· ---·-· --

Coli.mm;

RSOADg "'

- ACllVATl.DATA: - AC11Yll: .SQWSQ.OCfTJJ.AC

- ADSOt™: RS'Q.CDSOT71J.,AD: - CIUATEOBY: RSOADSO

Default Ed110t'$

lJ'Se these lOOIS 10 develop l\Jl·stack bUslness aPf)Ucatlons based on the applfcatlon programming model tor SAP Cloud Pfa1form.

Git settings

M«e lnlonMtion

031.abOSO E>cplOtet

KeybOalel Shortcuts SOl Code Compellcn SOL Console

SAP se

SOL$cr1>1Debugger

Automatkalty k>ads these reawres:

Toots for NodeJs Oevetopment

...

Worttt:pae-• Preferences OalaSIOfe Oetault Yalues

SAP HANA O.atabase Development Tools

Features Modeler

•·::•·>

These tOOls enable you lo develop SAP HANA ~IOS \'lnQ: detab3$0 artlf~S. U$0 the SAP HANA DoplOytntnl lnfrasuucnn (HOI), an ...

08\&00$0 (H08)

MOtO Information

SAP se

Automatlcaly k>ads these features: SAP HANA Database ExplorM

SAP Flort Launchpad Sitt

Q Off

Use this plugln to cteale a SAP Flori launchpad site tor SAP HANA XS Ac!V3noecl Mon

0 ltOW.CHT SlAAT·Of-·~lECTION

I; [A4HJ ZRS. NATIVf.SQLSCRIPT. CAl l

DI EXlCUTL'f'llTH_TAANSla_TABlE

61 OOCUT(...wtTH.GEN.TtMPTA8LES IJ HMtDLE..SCl. iXCEPTION DI OUTPUT_RISUlT

."

).

0 R(SIJlT.TA.8

!JP

>

·wo·

ZRS.NAT!Ylsa.scllPT.CAU 0 CON.NAME • R(SUlT.T 0 SQURR.,REF 0 CO"-.RU

0 STMT.J'!f

zr•_tc•tProc_t•~

Tai ~t



D10ti

s

l:]P~ $:.&

• lto'l'l~·t~ Jl~.v.~ IJFtt0~ .-rr~arg.,n.l:>Cf ~

........

__J

Writ.bit

Figure 4.3 ASAP Development Toolkit: Calling SQLScript in ASAP

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

4.3 Analytic Modeling As mentioned earlier, SAP HANA combines transactional and analytical data- online transaction processing (OLTP) and online analytical processing (OLAP)-resulting in what some call translytical data and others call hybrid transaction/analytical processing (HTAP). In a traditional data warehouse environment, you would use some kind of OLAP tool to create a data cube with aggregates stored on disk (MOLAP) or combined 1.vith a relation database (ROLAP) or a combination of both (HOLAP). You could access the data using multidimensional expressions (MDX), ODBO (OLE DB for OLAP) or XML for Analysis (XMLA) instead of SQL, ODBC, and OData. We'll return to ODBO and XMLA later when we describe the full SAP HANA client (see Section 4.10) and web-based access to the client (see Section 4.11). Although SAP HANA includes an interface to connect with XMLA or ODBO and exchange MDX (for example, using a Microsoft Excel or an SAP BusinessObjects Web Intelligence client), SAP HANA does not store aggregates in cubes and does not include an OLAP engine. Instead, SAP HANA uses calculation views as part of the calculation engine, which we'll discuss in this section. SAP HANA's calculation engine instantiates calculation views at runtime. A calculation view typically uses inputs from several sources, which can be tables, OLAP views, or the output of other calculation views (models). Initially, SAP HANA supported different view types, together known as information views, but these views have all been consolidated into the graphical calculation views. As a result, "information vie~v" and "calculation view" are now synonyms. Calculation views describe (or depict) a business scenario and are used (consumed) by reporting and business intelligence (BI) tools, from Microsoft Excel to SAP Analytics Cloud. Technology Background In itia lly, SAP HANA contained different view types (attribute, ana lytic, calculation), which define dimensions Uoining relationships), aggregations (key figures), and adding complex calculations (virtual table). Calculation views could be created using a graphical editor in SAP HANA studio, but you could also create SQLScript-based calculation 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.

D •AFM

....



..,

t.. · ~

.,

•• y

I G 8

·-

b ·-

lll ·-

....

Projection ....P'lg

........_ v

v

c;i

QJ;Plocl~Otte

f PAATNERID f PROOUCTIO f TYP£COOI!

'1

!'nit,...,..

t hod~lf90'Y

"

El • R:EAOMt.md .. t!U_ercl'WM

"

f CUFtRENCY

"'

I ""'°"

~

f CITY

t POStAl.COOE

cm

x

~

¢

Cak:ulated COllMT'll'\S (0)

! COMPNNNAME

....

"""""' · r....-..

..

A

(JI)

. ""

@) •

»

~j

f STREET

I BUILDING f COUN'TR'I' I RfGtON

I TEXTIO I W

® l!I

auttittoc.



aoiaog-«tata

111

128M8

I>

® ii

aud•log-se-cwr

111

256MB

I>

® l!I

Miltof'4.'i

111

64MB

I>

® ;;

c~-ad~~app

111

128M8

I>

® l!I

OCsk Ouola· Unlimittd

41c.:e·M·•

~

ii

Disk Quota; Unlimited

ljt#&.t Disk Quola. unUmittd

i1t.Ufj.i Oisk Quota Unlimited

ii&@·• Disk Quota; Unlimited

ii»httt·• Oisk Qoota· unlimited

Figure 4.6 SAP HANA XS Administration Cockpit

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 HANA Developer Quick Start Guide • SAP HANA Developer Guide for XS Advanced Model •

The SAP HANA XS Command-Line Interface Reference

SAP Notes For additional information, see SAP Notes, component BC-XS-RT, such as the following:

• 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"

4.5 Core Data Services You use CDS to define database design-time artifacts. You can create CDS documents, entities (tables), associations between entities, user-defined types, views, and extensions. Unlike the technical SQL data definition language (DDL) syntax, which describes, for example, exactly how a table must be created by the database engine (either in generic SQL ANSI format or in a SQL dialect that only the database understands), CDS provides an abstraction. In other words, you'll define your table in generic terms, and the compiler will turn this definition into specific SQL that takes into account technical implementation details like database version. In the documentation, this feature is described as "semantically rich" because you can add context to the data persistence model with annotations, for example, as shown in Figure 4.7.

169

4 Development

Purdl&.se(Jrder.td>c:ds • +

AFM ,,.

1 .. ~ol'lt~t ""'r

l >eployin9 tc;i YI• CX111t&in11: •oa_1· ... ok (41 lo def111lt- ..::c-e11- rol1 h•ndlinL

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] SELECT

* 1.5

[Measures] . ( Special Discount ] on COLUMNS , NON EMPTY [Product ] .[ Product] .MEMBERS

ON Rows

FROM (Sales ] WHERE [ Product] . [ Category] . [ Widgets] Listing 4.2 MDX Statement

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 connect 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 Reference 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 chall (), and close() methods. :-: _ JUpyter HaaS Python Last Checkpoint: Last Wednesday at 3:33 PM (unsaved changes) • Edit

File ~

+

:I(

Vrew

eei

Insert

~ + + conn.cl ose()

Cell

Kernel

H Run



c

Widgets

..

Help

Code

••

Cl

Connecti on to SAP HANA Service successful. SID = HOO Dat abase Name • HOO

Ver sion= 2.00.040.00.154 1428564 In ( 5] : from hdbcli import dbapi conn • dbapi .connect( address• 'zeus.hana.prod.eu- central - 1.whitney.dbaas.ondemand.com' , port• 21447 , key• ' HAASKEY' ,

encrypt• 'true' , I sslCryptoProvider• 'commoncrypto ' , sslTrustStore• '$SBCUDIR/sapcli . pse' )

with conn.cursor() as cursor: •sql • "SELECT SYSTBM_ ID, DATABASB_ NAME, VERSION FROM M_ DATABASE" •cursor .execute(sql) •resu l t = cursor.fetchall() print ( "Connection to SAP HANA Service successful." )

print ( "SID•" , result[ O][ O]) print ( "Database Name=" , r esul t[ O][ l )) print ( "Version=" , result[ OJ[ 2 J) conn. close ( ) Connection to SAP HANA Service successful. SID • HOO Dat abase Name = HOO version= 2.00.040.00.154 1428564

Figure 4.12

Connecting with Python

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 processes during host auto-failover or system replication takeover, the SAP HANA nameserver 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 management 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

ii Adminastr•tor. Command Prompt

C:\Users\saphanaacademy\nodeapp>npm config set @sap:registry https://npm.sap.com C:\Users\saphanaacademy\nodeapp>npm install @sap/hana-client > @sap/[email protected] install C:\Users\saphanaacademy\nodeapp\node_modules\@sap\hana-client > node build . js @sap/[email protected] 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, "SYSTEM" uid "Initiall' .. , pwd }

conn . connect(conn_parms, function(err) { if (err) throw err; conn.exec("SELECT OATABASE_NAME FR •