Best practices and recommendations for developing roles in SAP HANA
PUBLIC
Developing roles in SAP HANA
Applicable to SAP HANA releases starting from 1.0 SPS12 and newer
Document version 1.2 2021-07
Developing roles in SAP HANA
Applicable to SAP HANA releases starting from 1.0 SPS12 and newer
Document version 1.2 2021-07
Document history and references
Developing roles in SAP HANA, July 2021 (PUBLIC) 2
Document history
Version Release Date Change description Contact
1.0 April 2018 Document creation askSAPHANA@sap.com
1.1 November 2018 Minor updates: latest recommendations,
re-wording of some paragraphs, foot-
notes and correction of typos.
1.2 July 2021 Updates: Split, news, recommendations,
paragraphs, figures, correction of typos,
links and layout (design)
References
General
• SAP HANA Developer Guide: Explains how to build applications using SAP HANA, in-
cluding how to model data, how to write procedures, and how to build application
logic in SAP HANA Extended Application Services, classic model.
• SAP HANA XSA Developer Guide: Explains how to build applications using SAP HANA,
including how to model persistent and analytic data, how to write procedures, and
how to build application logic in SAP HANA Extended Application Services advanced
model (XS advanced).
• SAP HANA Security Guide: Is the entry point for all information relating to the secure
operation and configuration of SAP HANA.
• SAP HANA Security Checklist: Offers recommendations and information about opti-
mizing your security configuration to help you run your SAP HANA securely.
• SAP Note 2465027 - Deprecation of SAP HANA extended application services, classic
model and SAP HANA Repository.
Migration
• SAP HANA XS Advanced Migration Guide: Explains how to prepare, migrate, and de-
ploy applications from the XS classic model to the XS advanced model.
Developing roles in SAP HANA, July 2021 (PUBLIC) 2
Document history
Version Release Date Change description Contact
1.0 April 2018 Document creation askSAPHANA@sap.com
1.1 November 2018 Minor updates: latest recommendations,
re-wording of some paragraphs, foot-
notes and correction of typos.
1.2 July 2021 Updates: Split, news, recommendations,
paragraphs, figures, correction of typos,
links and layout (design)
References
General
• SAP HANA Developer Guide: Explains how to build applications using SAP HANA, in-
cluding how to model data, how to write procedures, and how to build application
logic in SAP HANA Extended Application Services, classic model.
• SAP HANA XSA Developer Guide: Explains how to build applications using SAP HANA,
including how to model persistent and analytic data, how to write procedures, and
how to build application logic in SAP HANA Extended Application Services advanced
model (XS advanced).
• SAP HANA Security Guide: Is the entry point for all information relating to the secure
operation and configuration of SAP HANA.
• SAP HANA Security Checklist: Offers recommendations and information about opti-
mizing your security configuration to help you run your SAP HANA securely.
• SAP Note 2465027 - Deprecation of SAP HANA extended application services, classic
model and SAP HANA Repository.
Migration
• SAP HANA XS Advanced Migration Guide: Explains how to prepare, migrate, and de-
ploy applications from the XS classic model to the XS advanced model.
Glossary
Developing roles in SAP HANA, July 2021 (PUBLIC) 3
Glossary
Following abbreviations will be used throughout the document:
Acronym Meaning
API Application programming interface
DU Delivery unit
HDB SAP HANA database
HDI SAP HANA deployment infrastructure
LCM SAP HANA lifecycle management
UPS User provided service
XSA SAP HANA extended application services, advanced model
XSC SAP HANA extended application services, classic model
Developing roles in SAP HANA, July 2021 (PUBLIC) 3
Glossary
Following abbreviations will be used throughout the document:
Acronym Meaning
API Application programming interface
DU Delivery unit
HDB SAP HANA database
HDI SAP HANA deployment infrastructure
LCM SAP HANA lifecycle management
UPS User provided service
XSA SAP HANA extended application services, advanced model
XSC SAP HANA extended application services, classic model
Preface
Developing roles in SAP HANA, July 2021 (PUBLIC) 4
Developing roles in SAP HANA, July 2021 (PUBLIC) 4
Table of contents
Developing roles in SAP HANA, July 2021 (PUBLIC) 5
TABLE OF CONTENTS
Document history.................................................................................................................................................................................... 2
References ................................................................................................................................................................................................... 2
Glossary ......................................................................................................................................................................................................... 3
1. Introduction .......................................................................................................................................................... 6
2. Preparation ........................................................................................................................................................... 7
2.1 Prerequisites ......................................................................................................................................................................... 7
2.2 SAP HANA release ............................................................................................................................................................ 7
3. What is changed from XSC to XSA? .................................................................................................... 8
3.1 Development Scenarios .............................................................................................................................................. 8
3.1.1 SAP HANA and XSC ..............................................................................................................................................................................8
3.1.2 SAP HANA and XSA ..............................................................................................................................................................................9
3.1.3 Orgs, spaces and projects ............................................................................................................................................................11
3.2 Database roles ................................................................................................................................................................. 13
3.2.1 Design-time roles created in XSC ...........................................................................................................................................13
3.2.2 Design-time roles created in XSA ...........................................................................................................................................13
3.2.3 Comparing design-time roles between XSC and XSA .............................................................................................14
4. HDI ............................................................................................................................................................................ 17
4.1 Container model ............................................................................................................................................................. 17
4.2 Container groups ............................................................................................................................................................ 17
4.3 Container isolation ........................................................................................................................................................ 18
4.4 Breaking the container isolation ......................................................................................................................... 20
5. Role development in XSA ....................................................................................................................... 21
5.1 The steps before development can start .................................................................................................... 21
5.2 Equip the HDI container with external privileges ................................................................................... 21
5.2.1 Between HDI containers in the same space ...................................................................................................................22
5.2.2 Between HDI containers in different spaces and external objects ...............................................................22
5.2.2.1 Using a UPS with a procedure grantor................................................................................................................. 23
5.2.2.2 GRANT to #OO user directly .................................................................................................................................... 24
5.3 Role development process .................................................................................................................................... 25
6. Best practices and recommendations .......................................................................................... 26
6.1 Organization and spaces .......................................................................................................................................... 26
6.2 Setup ....................................................................................................................................................................................... 26
6.3 Other considerations and hints ........................................................................................................................... 27
7. Migrating roles from XSC to XSA ........................................................................................................ 28
Developing roles in SAP HANA, July 2021 (PUBLIC) 5
TABLE OF CONTENTS
Document history.................................................................................................................................................................................... 2
References ................................................................................................................................................................................................... 2
Glossary ......................................................................................................................................................................................................... 3
1. Introduction .......................................................................................................................................................... 6
2. Preparation ........................................................................................................................................................... 7
2.1 Prerequisites ......................................................................................................................................................................... 7
2.2 SAP HANA release ............................................................................................................................................................ 7
3. What is changed from XSC to XSA? .................................................................................................... 8
3.1 Development Scenarios .............................................................................................................................................. 8
3.1.1 SAP HANA and XSC ..............................................................................................................................................................................8
3.1.2 SAP HANA and XSA ..............................................................................................................................................................................9
3.1.3 Orgs, spaces and projects ............................................................................................................................................................11
3.2 Database roles ................................................................................................................................................................. 13
3.2.1 Design-time roles created in XSC ...........................................................................................................................................13
3.2.2 Design-time roles created in XSA ...........................................................................................................................................13
3.2.3 Comparing design-time roles between XSC and XSA .............................................................................................14
4. HDI ............................................................................................................................................................................ 17
4.1 Container model ............................................................................................................................................................. 17
4.2 Container groups ............................................................................................................................................................ 17
4.3 Container isolation ........................................................................................................................................................ 18
4.4 Breaking the container isolation ......................................................................................................................... 20
5. Role development in XSA ....................................................................................................................... 21
5.1 The steps before development can start .................................................................................................... 21
5.2 Equip the HDI container with external privileges ................................................................................... 21
5.2.1 Between HDI containers in the same space ...................................................................................................................22
5.2.2 Between HDI containers in different spaces and external objects ...............................................................22
5.2.2.1 Using a UPS with a procedure grantor................................................................................................................. 23
5.2.2.2 GRANT to #OO user directly .................................................................................................................................... 24
5.3 Role development process .................................................................................................................................... 25
6. Best practices and recommendations .......................................................................................... 26
6.1 Organization and spaces .......................................................................................................................................... 26
6.2 Setup ....................................................................................................................................................................................... 26
6.3 Other considerations and hints ........................................................................................................................... 27
7. Migrating roles from XSC to XSA ........................................................................................................ 28