sap hana data warehousing foundation - data lifecycle ...€¦ · public sap hana data warehousing...

56
PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Upload: buikhanh

Post on 04-Jun-2018

232 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

PUBLIC

SAP HANA Data Warehousing Foundation 1.0 SPS 05Document Version: 1.0 – 2016-10-14

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Page 2: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Content

1 Getting Started. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.1 Overview of Data Lifecycle Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.2 Start Data Lifecycle Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.3 The Home Screen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.4 Working with the Data Lifecycle Manager UI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8

2 Security and Authorizations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.1 Before You Start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112.2 User Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Integration into Single Sign-On Environments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.3 User Authorization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Roles for Data Lifecycle Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Custom Privileges at Entity Level for Data Lifecycle Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Create and Authorize Users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

2.4 Network and Communication Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Securing Data Communication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18

3 Exploring Data of Source Persistence Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.1 Explore Data for SAP HANA Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4 Managing Storage Destinations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224.1 Supported Storage Destination Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234.2 Create Storage Destination. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Parameters for SAP HANA Dynamic Tiering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Parameters for SAP IQ over SDA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5 Managing Modeled Persistence Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.1 Create Table Group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275.2 Create Table Hierarchy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Preparation for Using a Table Hierarchy as Source Persistence Object. . . . . . . . . . . . . . . . . . . . . . 29

6 Managing Lifecycle Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326.1 Create Lifecycle Profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Generated Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Rule Editors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Notes on Packeting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

6.2 Simulate Relocation Run for a Lifecycle Profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426.3 Execute Relocation Run for a Lifecycle Profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

2 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Content

Page 3: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

6.4 Display Version History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446.5 Deleting Lifecycle Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446.6 Create SAP IQ Target Table via Generated Statement (DDL). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

7 Checking Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467.1 Abort Long Running Jobs or Jobs with Timeout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

8 Exporting and Importing Data Lifecycle Manager Entities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48

9 Backup & Recovery Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

10 Integrating Data Lifecycle Manager with Native SAP HANA Applications. . . . . . . . . . . . . . . . . . . 51

11 Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideContent P U B L I C 3

Page 4: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

1 Getting Started

The Administration Guide for SAP HANA Data Warehousing Foundation Data Lifecycle Manager describes the tasks and concepts for relocating "aged" or less frequently used data in SAP HANA native applications to storage destinations like SAP HANA Dynamic Tiering or SAP IQ in order to optimize the memory footprint of data in SAP HANA.

The guide covers the following areas:

● Getting StartedThis section provides information about the following:○ Overview of Data Lifecycle Manager○ Working with Data Lifecycle Manager

● Security and AuthorizationsThis section describes:○ The required user roles○ How to authorize users for working with Data Lifecycle Manager○ How to enable secure data communication

● Exploring Data of Source Persistence ObjectsThis section provides information about how you can find out which source persistence objects are candidates for data relocation.

● Managing Storage DestinationsThis section describes how to define which instances of the storage stack should be used by Data Lifecycle Manager to relocate data to.

● Managing Modeled Persistence ObjectsThis section describes how you can pursue a joint data relocation strategy for multiple source persistence objects, such as tables.

● Managing Lifecycle ProfilesThis section provides information about defining, simulating and executing relocation runs for lifecycle profiles.

● Checking Logs● Exporting and Importing Storage Data Lifecycle Manager Entities● Backup & Recovery Considerations● Integrating Data Lifecycle Manager with Native SAP HANA Applications● Troubleshooting

1.1 Overview of Data Lifecycle Manager

With Data Lifecycle Manager, SAP HANA Data Warehousing Foundation provides an SAP HANA XS-based tool to relocate data in native SAP HANA use cases from SAP HANA persistency to storage locations such as the SAP HANA Dynamic Tiering option, Hadoop (Spark SQL) or SAP IQ. For this purpose, Data Lifecycle Manager enables SAP HANA administrators to model aging rules on persistence objects (SAP HANA tables).

4 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Getting Started

Page 5: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Data Lifecycle Manager optimizes the memory footprint of data in SAP HANA tables by relocating data:

● Data Lifecycle Manager is a generic database-driven tool that enables you to model aging rules on SAP HANA tables in order to relocate "aged" or less frequently used data from SAP HANA tables in native SAP HANA applications.

● Data Lifecycle Manager provides optimal integration to custom-built or insert-only focused SAP HANA applications, like IoT & Sensor data (Big Data), Point-of-Sale data (Ticket, POS), Medical (Genomic) data or WebLogs.

● Data Lifecycle Manager supports selective data deletion in order to ensure good housekeeping.

To provide optimized reading access to Data Lifecycle Manager managed data, Data Lifecycle Manager supports the following:

● Generated pruning node views for optimized access between source tables and target tables● Automated and orchestrated data relocation between data stores● Scheduling of data relocation using SAP HANA tasks● Generated stored procedures to perform mass data relocation – in and out● Defining data slice/partitioning on SAP HANA tables criteria to be relocated to SAP HANA Dynamic Tiering,

Hadoop (Spark SQL) or SAP IQ

1.2 Start Data Lifecycle Manager

You access Data Lifecycle Manager from a Web browser.

Prerequisites

● You have been granted a role for working with Data Lifecycle Manager. For more information, see Roles for Data Lifecycle Manager [page 14] and Create and Authorize Users [page 16].

● If you are integrating Data Lifecycle Manager into a single sign-on (SSO) environment, you have specified and configured the methods for user authentication in the SAP HANA XS Administration Tool. Here, you must create a runtime configuration for the sap.hdm application.For more information about how to do this, see SAP HANA XS Administration Tools in the SAP HANA Administration Guide.

● You are using a supported Web Browser. For more information about supported browsers, see the Product Availability Matrix for SAP HANA Data Warehousing Foundation.

Procedure

1. Depending on whether an HTTP or HTTPS port has been configured, enter one of the following URLs in your browser:○ http://<Web Server Host>:80<SAP HANA instance number>/sap/hdm/dlm○ https://<Web Server Host>:43<SAP HANA instance number>/sap/hdm/dlm

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideGetting Started P U B L I C 5

Page 6: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

2. If required, enter your database user name and password.

Results

The Data Lifecycle Manager Home screen opens.

Related Information

SAP HANA Data Warehouse Foundation 1.0 - Planning Product Availability Matrix

Section SAP HANA XS Administration Tools in the SAP HANA Administration Guide on http://help.sap.com/hana_platform

1.3 The Home Screen

The Home screen provides you with tiles to navigate to the main functions and tasks in Data Lifecycle Manager and tiles that contain helpful KPIs.

Tiles to Navigate to the Main Functions and Tasks

The following tiles call screens that reflect the main Data Lifecycle Manager functions and tasks end-to-end:

Step 1: Exploring source persis­tence objects

Step 2: Defining destinations for relocation

Step 3: Defining groups of source persistence object

Step 4: Defining parameters for re­location in a life­cycle profile

Step 5: Schedul­ing and executing relocation

Step 6: Checking logs

Explore

Tile

Manage Storage Destinations Tile

Manage Modeled Persistence Objects Tile

Manage Lifecycle Profiles Tile

Manage Lifecycle Profiles Tile

Logs Tile

6 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Getting Started

Page 7: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Step 1: Exploring source persis­tence objects

Step 2: Defining destinations for relocation

Step 3: Defining groups of source persistence object

Step 4: Defining parameters for re­location in a life­cycle profile

Step 5: Schedul­ing and executing relocation

Step 6: Checking logs

Exploring source persistence object (SAP HANA tables) that are candidates for relocation.

Defining the stor­age destinations that can be used in Data Lifecycle Manager as targets for relocating data.

Defining groups of tables, which can use the same pa­rameters and rules for data relocation.

Defining a lifecycle profile for a source persistence object.

The profile con­tains all parame­ters needed for re­locating data from the source persis­tence to the as­signed storage destination. This includes setting up and adjusting the lifecycle relocation rule.

Validating the data relocation rule pro­posal against the current data distri­bution to check if the results of a re­location run would meet your expecta­tions.

Scheduling and ex­ecuting the reloca­tion run for the life­cycle profile to re­locate the data ac­cording to the pa­rameters and rules specified in the profile.

CautionBefore execut­ing a lifecycle profile, you have to replace the native level SAP HANA SQL ob­jects (SAP HANA tables for example) with the correspond­ing views (union or pruning node view) in your business appli­cations. Once this is done, only then should you exe­cute a lifecycle profile. Other­wise, the busi­ness application might crash, be­cause it will not be able to ac­cess the data outside of SAP HANA.

Checking logs for executed reloca­tion runs

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideGetting Started P U B L I C 7

Page 8: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Tiles with KPIs

● Runs in SystemData Lifecycle Manager provides you with information about the latest relocation runs, such as the number of runs during the last seven days and information about the status and completion rate of the last three runs. The information is updated automatically on a regular basis (every five seconds when the tile is in focus).Clicking the tile takes you to the Logs tab in Data Lifecycle Manager.

● Node Utilization ForecastData Lifecycle Manager provides you with a utilization forecast on the nodes of the multiple-host SAP HANA system. It provides a forecast for SAP HANA memory (hot data) as well as for SAP HANA disk (warm data). Note that this is only a forecast. Utilization might not develop as predicted by the Data Lifecycle Manager.The utilization for a node (described in percentage) indicates the size of the SAP HANA tables assigned to this node (column store tables and row store tables) divided by the effective allocation limit.

NoteThe value indicates the used amount of memory or disk space (allocated memory/disk).

The Node Utilization Forecast tile provides you with the following information: <number of nodes with normal utilization>/<number of all nodes in the multiple-host SAP HANA system>The KPI is displayed in green if all nodes are utilized normally (0% to 90% for example). Otherwise it is displayed in red.Clicking the tile takes you to the Details for Utilization Forecast popup. Here, you can see the current memory and disk utilization compared to the predicted memory and disk utilization for each node.

1.4 Working with the Data Lifecycle Manager UI

The following general functions are available in the Data Lifecycle Manager UI.

Where-Used List for Objects

Data Lifecycle Manager provides a where-used list. This allows users to find out in which other SAP HANA artifacts a SAP HANA source persistence object is used. It also allows users to find out, in which lifecycle profile a modeled persistence object is used.

To find out the usage in SAP HANA artifacts, the where-used list is available in the Explore screen for the source persistence type SAP HANA table and in the Manage Lifecycle Profiles screen (visible after first activation of the profile) for SAP HANA tables and modeled persistence objects.

To find out the usage in lifecycle profiles, the where-used list is available in the Manage Modeled Persistence Objects screen (visible after first activation of the persistence object).

8 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Getting Started

Page 9: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Navigation to the SAP HANA Web-based Development Workbench

Data Lifecycle Manager supports forward navigation to the SAP HANA Web-based Development Workbench: Catalog. Forward navigation is available for:

● Objects listed in the where-used list popup in the Explore screen● Objects displayed on the Destination Persistence tab in the Manage Lifecycle Profiles screen.● Objects displayed on the Generated Object(s) tab in the Manage Lifecycle Profiles screen.

For security reasons, the role required to view the SAP HANA Web-based Development Workbench: Catalog is not shipped together with any of the Data Lifecycle Manager roles. The required role to view the SAP HANA Web-based Development Workbench: Catalog is sap.hana.ide.roles::CatalogDeveloper. The role therefore has to be added for all database users who want to use the forward navigation functionality.

General Functions for Tables in the Logs Screen

Function Icon Description

Selecting rows You can select a log by clicking in the furthest left column of the row in order to display the detailed messages of a log. Alternatively, you can click the log ID in the ID column.

Filtering columns For columns that support filtering, you can apply filters by clicking on the column header and entering a value in the Filter field. The data in the rel­evant table will be updated in accordance with the filter value.

Sorting tables For columns that support sorting, you can sort a table by clicking the col­umn header and choosing Ascending or Descending.

To remove the sorting, click the column header and double-click Ascending or Descending.

Configuring table appearance

By clicking Open Configuration in the upper right corner of a table, you can select the number of visible rows and select which of the columns should be displayed in the table.

Opening table as full screen

You can open the table in a separate dialog box by clicking Open as Fullscreen in the upper right corner of a table.

Refreshing table data

You can refresh the table data by clicking Refresh table in the upper right corner of a table.

Help

More Help in the header area of the Data Lifecycle Manager screen provides you with application help, which has been installed on the SAP HANA XS Web server.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideGetting Started P U B L I C 9

Page 10: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

You can also open the help outside of the Data Lifecycle Manager. Enter one of the following URLs in your browser (depending on whether HTTP or HTTPS port has been configured):

● http://<Web Server Host>:80<SAP HANA instance number>/public/sap/docs/hdm/dlm/help● https://<Web Server Host>:43<SAP HANA instance number>/public/sap/docs/hdm/dlm/help

Lock Manager

The lock manager is a generic service of the SAP HANA Data Warehousing Foundation core component. Currently, lock manager service hasn't been implemented by any Data Lifecycle Manger process.

10 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Getting Started

Page 11: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

2 Security and Authorizations

The following sections describe specific security aspects for Data Lifecycle Manager, such as the SAP HANA roles needed for working with the Data Lifecycle Manager, how to authorize users, and how to enable secure data communication.

Overall security for SAP HANA Data Warehousing Foundation Data Lifecycle Manager is governed by the rules implemented for SAP HANA. Before reading the information provided with the following sections, familiarize yourself with the overall security model for SAP HANA, as described in the SAP HANA Security Guide.

2.1 Before You Start

Fundamental Security Guides

SAP HANA Data Warehousing Foundation is built from SAP HANA XS. The SAP HANA Security Guide therefore also applies to SAP HANA Data Warehousing Foundation.

For Data Lifecycle Manager, the SAP HANA Dynamic Tiering option and SAP IQ via Smart Data Access are potential storage destinations. The corresponding security guides and the section about Security for SAP HANA Smart Data Access in the SAP HANA Security Guide therefore also apply to SAP HANA Data Warehousing Foundation.

The table below specifies the Security Guides.

Area Security Guide

SAP HANA

SAP HANA Smart Data Access

SAP HANA Security Guide on http://help.sap.com/hana_plat­form

SAP HANA Dynamic Tiering SAP HANA Security Guide on http://help.sap.com/hana_plat­form

SAP IQ Security guides for the supported releases on http://help.sap.com/iq

Additional Information

For more information about specific topics, see the quick links in the table below.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideSecurity and Authorizations P U B L I C 11

Page 12: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Content SAP Service Marketplace or SDN Quick Link

SAP Security Guides https://service.sap.com/securityguide

Related SAP Notes ● https://service.sap.com/notes● https://service.sap.com/securitynotes

Released platforms https://service.sap.com/pam

SAP Solution Manager https://service.sap.com/solutionmanager

SAP NetWeaver http://sdn.sap.com/irj/sdn/netweaver

In-memory computing http://www.sdn.sap.com/irj/sdn/in-memory

2.2 User Management

User Management for SAP HANA Data Warehousing Foundation uses the mechanisms provided with SAP HANA, for example tools and user types. For an overview of how these mechanisms apply for SAP HANA Data Warehousing Foundation, see the sections below.

User Administration Tools

For user management and user administration with SAP HANA Data Warehousing Foundation, you use the tools described in the following table:

Job Function Task Tool

User or system administrator Create SAP HANA database users ● User editor of the SAP HANA studio● Security tool of the SAP HANA Web-

based Development Workbench● SAP HANA HDBSQL

HDBSQL is useful when using scripts for automated processing. For more information about HDBSQL, see the SAP HANA Ad­ministration Guide.

Grant roles to database users

Delete, deactivate, and reactivate data­base users

Reset user passwords

Related Information

● Section SAP HANA User Management in the SAP HANA Security Guide on http://help.sap.com/hana_platform

● SAP HANA Administration Guide on http://help.sap.com/hana_platform

12 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Security and Authorizations

Page 13: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

2.2.1 Integration into Single Sign-On Environments

SAP HANA supports several authentication mechanisms, some of which can be used for the integration of SAP HANA Data Warehousing Foundation into single sign-on environments (SSO).

Related Information

● Section SAP HANA Authentication and Single Sign-On in the SAP HANA Security Guide on http://help.sap.com/hana_platform

● Section Maintaining Single Sign-On for SAP HANA XS Applications in the SAP HANA Administration Guide on http://help.sap.com/hana_platform

2.3 User Authorization

Every user who is required to work with SAP HANA Data Warehousing Foundation tools must have a database user. To perform tasks in the tools, the database user must have the required privileges.

SAP HANA Data Warehousing Foundation tools are delivered with a set of roles containing the required privileges for specific tasks. Appropriate roles have to be granted to the database users working with Data Warehousing Foundation. In addition, database users working with SAP HANA Data Warehousing Foundation require further custom object privileges on entity level (on schema level, for example).

Related Information

Section Roles in the SAP HANA Security Guide on http://help.sap.com/hana_platform

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideSecurity and Authorizations P U B L I C 13

Page 14: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

2.3.1 Roles for Data Lifecycle Manager

Data Lifecycle Manager is delivered with a set of roles containing privileges required for specific tasks. Additionally, there is a set of roles that have to be generated during Data Lifecycle Manager configuration. The generated roles contain the respective predelivered roles plus additional privileges needed to work with the tool.

The following table describes the roles that provide application privileges for working with Data Lifecycle Manager:

Predelivered Role Generated Role Type Task

sap.hdm.dlm.role::Admin­istrator

sap.hdm.dlm.role.GNR.Ad­ministrator

application The generated role has to be granted to the database user who maintains storage desti­nations, modeled persistence objects and lifecycle profiles, and who executes reloca­tion runs.

NoteIn addition to the privileges provided with this role, this user needs to have custom privileges. For more information, see Cus­tom Privileges at Entity Level for Data Life­cycle Manager [page 14].

sap.hdm.dlm.role::Display sap.hdm.dlm.role.GNR.Display

application This role provides read-only access to view relocation activities.

sap.hdm.dlm.role::Sup­port

sap.hdm.dlm.role.GNR.Support

SAP internal This role is used for support purposes.

Related Information

● Sections Roles and User Types in the SAP HANA Security Guide on http://help.sap.com/hana_platform● Custom Privileges at Entity Level for Data Lifecycle Manager [page 14]

2.3.2 Custom Privileges at Entity Level for Data Lifecycle Manager

A number of custom privileges at entity level have to be granted to Data Lifecycle Manager users.

Source Specific Privileges

Grant the following object privileges to the Data Lifecycle Manager logon user (database user) for all tables that lifecycle profiles should be generated for:

14 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Security and Authorizations

Page 15: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Object Privilege For example with SQL-ALTER-Statement

SELECT with grant option GRANT SELECT ON <DB-SCHEMA-NAME.TABLE> TO <user with the role sap.hdm.dlm.role::Administrator> WITH GRANT OPTION;

INSERT GRANT INSERT ON <DB-SCHEMA-NAME.TABLE> TO <user with the role sap.hdm.dlm.role::Administrator>;

DELETE GRANT DELETE ON <DB-SCHEMA-NAME.TABLE> TO <user with the role sap.hdm.dlm.role::Administrator>;

Target Specific Privileges

Storage Destination "Spark SQL (Destination)"

Grant the following object privileges to the Data Lifecycle Manager logon user (database user) to enable the use of Spark SQL (Destination) as the storage destination:

Object Privilege For example with SQL-ALTER-Statement

CREATE VIRTUAL TABLE GRANT CREATE VIRTUAL TABLE ON REMOTE SOURCE "<Remote Source name>" TO <user with the role sap.hdm.dlm.role::Administrator>;

DROP GRANT DROP ON REMOTE SOURCE "<Remote Source name>" TO <user with the role sap.hdm.dlm.role::Administrator>;

You can find the Remote Sources in the SAP HANA Studio in the Systems view under Provisioning Remote Sources . For more information about Remote Sources, see SAP HANA Smart Data Access in the SAP HANA Administration Guide.

Storage Destination "SAP IQ over SDA"

Grant the following object privileges to the Data Lifecycle Manager logon user (database user) to enable the use of SAP IQ as the storage destination:

Object Privilege For example with SQL-ALTER-Statement

CREATE VIRTUAL TABLE GRANT CREATE VIRTUAL TABLE ON REMOTE SOURCE "<Remote Source name>" TO <user with the role sap.hdm.dlm.role::Administrator>;

DROP GRANT DROP ON REMOTE SOURCE "<Remote Source name>" TO <user with the role sap.hdm.dlm.role::Administrator>;

You can find the Remote Sources in the SAP HANA Studio in the Systems view under Provisioning Remote Sources . For more information about Remote Sources, see SAP HANA Smart Data Access in the SAP HANA Administration Guide.

Also check for the following:

Code Syntax

select * from "PUBLIC"."EFFECTIVE_PRIVILEGES" where USER_NAME = '<user with the role sap.hdm.dlm.role::Administrator>' and OBJECT_NAME = '<Remote Source name>';

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideSecurity and Authorizations P U B L I C 15

Page 16: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Generation Specific Privileges

For storage destination types SAP HANA Dynamic Tiering, SAP IQ over SDA, and Deletion Bin Destination Data Lifecycle Manger provides default schema SAP_HDM_DLM_GNR as a target database schema for the generated objects. When creating a storage destination, you can overwrite the default schema. Data Lifecycle Manager then uses the schema specified in the Parameters section of the storage destination that is assigned to the lifecycle profile. For storage destination type Spark SQL (DESTINATION), Data Lifecycle Manager uses the schema of the source persistence object target database schema for the generated objects.

You therefore need to grant the following object privileges to the user with the Data Lifecycle Manger administrator role on all target database schemas (of lifecycle profiles):

Object Privilege For example with SQL-ALTER-Statement

EXECUTE GRANT EXECUTE ON SCHEMA <DB-SCHEMA NAME > TO <user with the role sap.hdm.dlm.role::Administrator>;

CREATE ANY GRANT CREATE ANY ON SCHEMA <DB-SCHEMA NAME > TO <user with the role sap.hdm.dlm.role::Administrator>;

INSERT GRANT INSERT ON SCHEMA <DB-SCHEMA NAME > TO <user with the role sap.hdm.dlm.role::Administrator>;

SELECT GRANT SELECT ON SCHEMA <DB-SCHEMA NAME > TO <user with the role sap.hdm.dlm.role::Administrator>;

DELETE GRANT DELETE ON SCHEMA <DB-SCHEMA NAME > TO <user with the role sap.hdm.dlm.role::Administrator>;

Related Information

● Section SAP HANA Smart Data Access in the SAP HANA Administration Guideon http://help.sap.com/hana_platform

● Roles for Data Lifecycle Manager [page 14]

2.3.3 Create and Authorize Users

Every user required to work with SAP HANA Data Warehousing Foundation tools must have a database user. To perform the tasks in the tools, specific roles must be granted to the database user(s) by a user administrator.

Prerequisites

● You have the system privilege USER ADMIN.● You have the privileges required to grant specific privileges and roles to the new user. For more information,

see Prerequisites for Granting and Revoking Privileges and Roles in the SAP HANA Administration Guide.● If you are integrating SAP HANA database users into a single-sign on (SSO) environment using one or more of

the supported mechanisms, the required infrastructure must be in place and configured.

16 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Security and Authorizations

Page 17: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

● You have generated the roles needed for working with Data Lifecycle Manager. For more information, see section Generate Default Schema for Generated Objects and Roles Needed for Data Lifecycle Manager in the SAP HANA Data Warehousing Foundation Installation Guide on http://help.sap.com/hana_options_dwf.

Context

The following section describes the procedure for creating and authorizing SAP HANA database users, focussing on SAP HANA Data Warehousing specific information. For a detailed description of the general procedure, see Create and Authorize a User in the SAP HANA Administration Guide.

Procedure

1. If the database user that you want to authorize does not exist yet, create the user:

a. In the Systems view, choose Security Users .b. From the context menu, choose New User.

2. Specify the user name and properties.3. Authorize the user by granting the required roles and privileges.

a. Grant the roles that have been generated during configuration of Data Lifecycle Manager.b. Grant the appropriate custom privileges at entity level.

4. Save the user by pressing (Deploy).The user is created and appears in the Users folder. A new schema is also created for the user in the catalog. This schema has the same name as the user.

Related Information

● Section Provisioning Users in SAP HANA Studio in the SAP HANA Administration Guide on http://help.sap.com/hana_platform

● Section Generate Default Schema for Generated Objects and Roles Needed for Data Lifecycle Manager in the SAP HANA Data Warehousing Foundation Installation Guide on http://help.sap.com/hana_options_dwf

2.4 Network and Communication Security

Several mechanisms are possible for securing the usage of SAP HANA Data Warehousing Foundation.

SAP HANA Data Warehousing Foundation is a Web application that is accessed using the standard SAP HANA XS Engine ports. When a user logs on to the application, a database user is used. This user could also be used to directly authenticate against the database itself, which would allow modification of database objects directly using a database client. It is recommended security practice to limit network access to the SAP HANA database to the

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideSecurity and Authorizations P U B L I C 17

Page 18: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

XS Engine ports, and to apply appropriate additional security measures, such as encryption, where necessary. This can be achieved by various means, such as separate network zones and network firewalls, or using the configuration options provided by SAP HANA (encryption for example). The exact setup depends on your environment, security requirements and policies.

The detailed network set-up and recommendations are described under The SAP HANA Network in the SAP HANA Master Guide. The following section provides some additional security-relevant information.

Related Information

● Section The SAP HANA Network in the SAP HANA Master Guide on http://help.sap.com/hana_platform● Section SAP HANA Network and Communication Security in the SAP HANA Security Guide on http://

help.sap.com/hana_platform● Section SAP HANA Extended Application Services (SAP HANA XS) in the SAP HANA Security Guide on http://

help.sap.com/hana_platform

2.4.1 Securing Data Communication

SAP HANA Data Warehousing Foundation can be configured to enforce encrypted communication. We recommend using encrypted communication in all cases where your network is not protected by other security measures against attacks, such as eavesdropping for example, when your network is accessed from public networks.

You can use the Secure Sockets Layer (SSL) protocol to secure communication between SAP HANA and HTTP clients.

If you want SAP HANA Data Warehousing Foundation to refuse browser requests that do not use secure HTTP (SSL/HTTPS) for client connections, you can enable the "Force SSL" option in the application runtime configuration for package sap.hdm in the SAP HANA XS Administration Tool.

Related Information

● Section Secure Communication Between SAP HANA and HTTP Clients in the SAP HANA Security Guide on http://help.sap.com/hana_platform

● Sections Configuring HTTPS (SSL) for Client Application Access and Create an Application Runtime Configuration in the SAP HANA Administration Guide on http://help.sap.com/hana_platform

18 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Security and Authorizations

Page 19: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

3 Exploring Data of Source Persistence Objects

On the Explore screen, you can find out which source persistence objects are candidates for data relocation and which source persistence lifecycle profiles should therefore be generated for.

Generally, source persistence objects with a large amount of data or high frequency of data increases can be seen as suitable candidates for relocation activities.

For every source persistence type (SAP HANA tables, for example) there are specific ways to explore the data (exploration type).

Procedure

1. Select the source persistence type (SAP HANA tables, for example).2. Select the exploration type. For source persistence type SAP HANA table, graph-based and form-based

exploration is possible for example.3. Apply further filter options for the given source persistence type and exploration type in order to enable data

exploration for a particular source persistence object.Data exploration can be performed based on a graphical representation of the source persistence object. Here, you can see how data is spread according to the selected filter, and which business rules might be suitable for relocating data.

3.1 Explore Data for SAP HANA Tables

If the utilization forecast on the Home screen indicates that the utilization of one or more nodes could become critical over time, you can use the exploration function to establish which tables are appropriate candidates for data relocation.

Context

With a two-step approach, you can first perform graph-based exploration on different levels. With a sunburst chart, you can drill down to information on different levels, host, schema, or table level for example. You can thus identify the ten largest tables of all the tables in the system, or the ten largest tables in a given schema on a given host for example. In a second step, you can use form-based exploration to see how data of a selected SAP HANA table is spread according to a selected column filter. With this insight, you can derive meaningful business rules for relocating the data.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideExploring Data of Source Persistence Objects P U B L I C 19

Page 20: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Procedure

1. Select exploration type Graph-based.

The system initially displays the following:

○ A sunburst chart that initially shows the top level of data exploration with segments showing their share of total memory; the hosts of the system with their share of total memory, for example.

○ Buttons to the right of the sunburst chart that show the levels of data exploration. Levels of data exploration are HOST, PORT, TABLE, and TABLE_TYPE, for example.The sorting of the buttons from top to bottom corresponds with the levels that you can display in the sunburst chart from the core outwards.

○ A table to the right of the buttons with information about the name and size of the top level of data exploration in the system; name and size of the hosts in the system, for example.

You can use the following features to flexibly explore data with the sunburst chart:

Feature Description

Sort levels To change the order of the levels displayed in the sunburst chart from the core outwards, you can drag and drop the buttons to the right of the sunburst chart. The sorting of the buttons from top to bottom corresponds to the levels you can display in the sunburst chart from the core outwards. If the current state of the sunburst chart is affected by the changed order, the chart switches to the initial state, only displaying the top level.

For a selected segment, show next level data in the sunburst chart

In the sunburst chart, click on a segment of the outermost level to display the next level of data exploration according to the order of the buttons.

Display details for a segment of the sunburst chart

Use mouseover in the sunburst chart to display a tooltip with information about the memory size of the segment, its share of total memory and its share of memory of the next higher level (assuming that PORT is the next higher level to TABLE; the table's percentage share of port size, for example).

Display the name and size of all seg­ments of the outermost level of the sunburst chart

Click any segment of the sunburst chart to display detailed information about the next level elements associated with the selected segment. The system dis­plays the information in the table to the right of the buttons. Assuming that the next level after PORT is TABLE, click on a port to see table names and sizes for all tables for the selected port for example.

Zoom out the levels in the sunburst chart

Clicking the circle in the center of the sunburst chart zooms out to a higher level of data exploration.

Exclude a level from data exploration To exclude a specific level from data exploration, select the "eye" on the corre­sponding button. If the current state of the sunburst chart is affected by the ex­cluded level, the chart switches to the initial state, only displaying the top level.

Examples:

If you want to identify the ten largest tables on a given host, proceed as follows:

1. Exclude the PORT level from the display in the sunburst chart.

20 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Exploring Data of Source Persistence Objects

Page 21: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

2. Assert that the order of visible levels corresponds to HOST, TABLE.3. On the host level (outermost level) in the sunburst chart, click on the required host segment. The table

level now appears as the outermost level, showing the ten largest tables in the given schema on the given host.

If you want to identify the ten largest tables of all, proceed as follows:

1. Drag the TABLE button to the top.2. The system directly displays the table level as the outermost level of the sunburst chart, showing the ten

largest tables in the system.

2. Select exploration type Form-based.a. Enter a schema and table name.b. For the table, you can display how the data is spread according to various criteria. To do this, you have to

select an appropriate table column (of type date/datetime for example). The system then provides visualization of the data spread in the form of a bar chart.

NoteOnly columns with SAP HANA SQL data types that can be converted to NVARCHAR can be selected. For information about the supported data types, see the data type conversion tables in section Data Types -> Data Type Conversion in the SAP HANA SQL and System Views Reference on http://help.sap.com/hana_platform.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideExploring Data of Source Persistence Objects P U B L I C 21

Page 22: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

4 Managing Storage Destinations

A storage destination specifies an instance of the storage stack into which data can be relocated to with Data Lifecycle Manager. Supported storage destination types are SAP HANA Dynamic Tiering, Spark SQL (DESTINATION) or SAP IQ for example. To delete data, Data Lifecycle Manager offers the storage destination type Deletion Bin.

A storage destination is assigned to a lifecycle profile. Here, the storage destination defines where the data will be relocated to.

The Manage Storage Destinations screen of the Data Lifecycle Manager is split up into two main areas:

● On the left side of the Storage Destinations area, you see a list of all available storage destinations. Here, you can search for storage destinations by storage destination name or the user who last changed the destination. You can add new destinations or delete destinations that are not needed anymore.

● On the right side of the Destination Details area, you see the selected storage destination with header information and destination specific parameters.

NoteThe instances of the storage stack have to be installed and configured properly before you can use them for defining storage destinations.

Related Information

● SAP HANA Data Warehousing Foundation - Installation Guide on http://help.sap.com/hana_options_dwf● For SAP IQ:

○ http://help.sap.com/iq○ Section About SAP HANA Smart Data Access in the SAP HANA Administration Guide on http://

help.sap.com/hana_platform● For SAP HANA Dynamic Tiering: http://help.sap.com/hana_options_dt● For Spark SQL (DESTINATION):

○ SAP note 2257657○ Section Preparing Storage Destinations in the SAP HANA Data Warehousing Foundation - Installation

Guide on http://help.sap.com/hana_options_dwf

22 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Managing Storage Destinations

Page 23: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

4.1 Supported Storage Destination Types

The table below provides an overview of the supported storage destination types.

Storage Destination Type Restrictions

SAP HANA Dynamic Tiering Local

The following factors prevent the lifecycle profile from being activated:

● Source tables with keys of type VARCHAR/CHAR/VARBINARY/BINARY and length greater than 255

● Source tables with keys of type NVARCHAR/NCHAR and length greater than 85● Source tables of type row● Source tables with columns with data type BLOB● Source tables without a primary key

NoteDefining a nominal key in the lifecycle profile allows you to overcome this restriction.

You can find further information on data type support for SAP HANA Dynamic Tiering in SAP Note 2183717 .

Tables, table groups or table hierarchies with tables containing double quotation marks and other special characters are not supported for data relocation to SAP HANA Dynamic Tiering (extended tables). For more information, see SAP Note 2309420 .

SAP IQ over SDA The following factors prevent the lifecycle profile from being activated:

● Source tables with keys of type VARCHAR/CHAR/VARBINARY/BINARY and length greater than 255

● Source tables with keys of type NVARCHAR/NCHAR and length greater than 85● Source tables of type row● Source tables with columns with data type BLOB● Source tables without a primary key

NoteDefining a nominal key in the lifecycle profile allows you to overcome this restriction.

Spark SQL (DESTINATION) For an overview of restrictions, see SAP Note 2290922 .

Deletion Bin Destination The following factors prevent the lifecycle profile from being activated:

● Source tables without a primary key

NoteDefining a nominal key in the lifecycle profile allows you to overcome this restriction.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideManaging Storage Destinations P U B L I C 23

Page 24: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

4.2 Create Storage Destination

To enable Data Lifecycle Manager to relocate data to storages like SAP IQ, Hadoop (Spark SQL) or SAP HANA Dynamic Tiering, you need to create a storage destination. A storage destination is mainly defined through the type of storage and storage specific parameters, like a target schema for example.

Prerequisites

Depending on the type of stores you would like to use for relocating data:

● An SAP IQ instance has been added as an SAP HANA Smart Data Access Remote Source.● The SAP HANA Spark Controller has been installed and configured, and added as a Remote Source to SAP

HANA. The SAP HANA system has been configured for Spark connectivity.● SAP HANA Dynamic Tiering (Extended Storage) has been enabled.

Procedure

1. In the Manage Storage Destinations screen, choose +.2. In the Header area of the Destination Details, enter a name for the storage destination.3. Select the storage destination type.4. In the Parameters area, enter the parameters required for the destination type.

NoteWith SAP_HDM_DLM_GNR, Data Lifecycle Manger provides a default schema for the generated objects. When creating a storage destination, the system displays the default schema in the Parameters area. You can overwrite the default schema. When generating objects for a lifecycle profile that has the storage destination assigned, Data Lifecycle Manager uses the schema you specified here.

Note that for Hadoop (Spark SQL) the schema of the source persistence object is used for the generated objects.

5. Choose Save.

This creates a storage destination. The new storage destination appears in the Storage Destinations area on the left side of the Manage Storage Destinations screen.

6. To check if the destination has been created properly, in the Destination Details area, choose Test Connection.

At the bottom right of the screen, you can see if Data Lifecycle Manager successfully connected to the storage destination or not.

24 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Managing Storage Destinations

Page 25: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

4.2.1 Parameters for SAP HANA Dynamic Tiering

The following parameters are required for storage destination type SAP HANA Dynamic Tiering.

Parameter Description

Schema Enter a valid schema that is intended to be used for relocating data.

To be able to move data from SAP HANA to SAP HANA Dynamic Tiering (extended stor­age) a mirrored persistence object in SAP HANA Dynamic Tiering is required. The target table will be created in the schema, you enter here.

The default schema provided by Data Lifecycle Manager for SAP HANA Dynamic Tiering is SAP_HDM_DLM_GNR. You can overwrite the default schema and enter another one here.

4.2.2 Parameters for SAP IQ over SDA

The following parameters are required for storage destination type SAP IQ.

Parameter Type Parameter Description

DETAILS Remote Source Enter the name of the Remote Source that has been created to con­nect to SAP IQ.

Database Name Enter the SAP IQ database name of the Remote Source.

Owner / Schema Enter a valid owner of the SAP IQ database.

OTHER DETAILS Generated Object(s) Schema

The default schema for the objects that are generated with lifecycle profile activation is SAP_HDM_DLM_GNR. You can overwrite the de­fault schema and enter another one here.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideManaging Storage Destinations P U B L I C 25

Page 26: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

5 Managing Modeled Persistence Objects

Modeled persistence objects help you to pursue a joint data relocation strategy for multiple source persistence objects, such as tables. You can define a source persistence object from multiple SAP HANA tables. Once defined, a modeled persistence object can be used in a lifecycle profile. The relocation rule can then be defined for common table columns selected during definition of the modeled persistence object.

When you create and execute a lifecycle profile for a modeled persistence object, the following applies for all tables of the modeled object:

● A common relocation rule will be defined and executed.● A common clash strategy and packet size applies.● A single relocation procedure will be generated.● For all tables, corresponding target tables will be generated.

NoteWhen using SAP IQ as the storage destination type, you need to manually create the target tables in SAP IQ.

An example of a modeled persistence object is a table group. A table group is a set of SAP HANA tables, which share common columns.

NoteNote that table groups in Data Lifecycle Manager are not related to SAP HANA table classification stored in SYS.TABLE_GROUPS table.

Related Information

Create SAP IQ Target Table via Generated Statement (DDL) [page 44]

26 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Managing Modeled Persistence Objects

Page 27: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

5.1 Create Table Group

You can define a table group by selecting multiple tables and selecting common table columns that allow the definition of a common relocation rule for all tables of the group.

Context

NoteNote that table groups in Data Lifecycle Manager are not related to SAP HANA table classification stored in SYS.TABLE_GROUPS table.

Procedure

1. In the DLM Profiles area on the Manage Modeled Persistence Objects screen, choose +2. In the Header area, enter a name for the table group.3. In the Modeled Persistence Object Details area on the right side of the screen, define the table group:

a. From the input help for the Fully Qualified Table Name(s) field, step-by-step select table names.

Enter a search string to select a table from input help. Note that the search is case sensitive and that input help displays a maximum of ten entries.

Selected tables appear below the Fully Qualified Table Name(s) field.

Note○ The fully qualified table name displayed in input help is "<schema name>"."<table name>".

b. From input help for the Common Key Column Name(s) field, select one or more columns to be used for defining a relocation rule.

Enter a search string to select a column from input help. Note that the search is case sensitive and that input help displays a maximum of ten entries.

The selected columns appear below the Common Key Column Name(s) field.c. For tables without a primary key, it is mandatory to select one or more columns to be used for defining a

nominal key. You select the column(s) from the input help for the Nominal Key Column Name(s) field . The nominal key by Data Lifecycle Manager is treated like a primary key. Using the nominal key, you can activate a life cycle profile for a table group that contains tables without a primary key.

4. Save the table group.

A version number and activation status Inactive are assigned to the persistence object.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideManaging Modeled Persistence Objects P U B L I C 27

Page 28: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

NoteOnly table groups with activation status Inactive can be opened in edit mode again. Once a table group is activated, you cannot edit the table group anymore.

5. Activate the table group.

A version number is assigned to the persistence object.

Results

You can now use the table group as a source persistence object in a lifecycle profile if no other lifecycle profile has been defined yet for any of the tables in the group.

The Where-Used button becomes available for the modeled persistence object.

5.2 Create Table Hierarchy

You can define a table hierarchy by selecting a calculation view, which represents a hierarchy of SAP HANA tables. With a table hierarchy you are able to create relocation rules not only for common columns, but for any of the columns of the tables being part of the calculation view.

Context

NoteTable hierarchies are supported for storage destination types SAP IQ over SDA and SAP HANA Dynamic Tiering Local.

Prerequisites

A calculation view based on SAP HANA tables has to represent the hierarchy.

NoteWhen creating a table hierarchy, you should only use a calculation view if it has not been used in other table hierarchy persistence objects.

For more information on how the tables and calculation view should be defined in order to serve a table hierarchy in Data Lifecycle Manager, see Preparation for Using a Table Hierarchy as Source Persistence Object [page 29].

28 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Managing Modeled Persistence Objects

Page 29: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Procedure

1. In the DLM Profiles area on the Manage Modeled Persistence Objects screen, choose +.2. In the Header area, enter a name for the table hierarchy.3. In the Modeled Persistence Object Details area on the right side of the screen, define the table group: From the

input help for the Calculation View Field, select the fully qualified identifier of the calculation view.

Note○ Only use a calculation view if it has not been used in other table hierarchies.○ The fully qualified view name displayed in input help is <schema name_<table name".

4. Save the table group.A version number and activation status Inactive are assigned to the persistence object.

NoteOnly table groups with activation status Inactive can be opened in edit mode again. Once a table group is activated, you cannot edit the table group anymore.

5. Activate the table hierarchy.A version number is assigned to the persistence object.

Result

You can now use the table hierarchy as a source persistence object in a lifecycle profile if no other lifecycle profile has been defined yet for any of the tables of the calculation view that is used as table hierarchy.

The Where-Used button becomes available for the modeled persistence object.

5.2.1 Preparation for Using a Table Hierarchy as Source Persistence Object

In order to use a SAP HANA table hierarchy as a source persistence object in Data Lifecycle Manager, an appropriate SAP HANA table structure has to be in place first to represent the hierarchy. Second, a calculation view has to be created, which expresses the hierarchy by means of outer joins.

Preparing the SAP HANA Table Structure

You have SAP HANA tables representing the hierarchy in question by means of a foreign key relationship. The primary key of any level is a compound of its own key and all of its parents' primary keys.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideManaging Modeled Persistence Objects P U B L I C 29

Page 30: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

The following graphic shows an example of an appropriate SAP HANA table structure:

NoteSince calculation views do not support this, you cannot use columns of type ST_POINT as primary keys for the tables in the hierarchy.

Creating a Calculation View

Using the graphical editor, create a calculation view which expresses the hierarchy by means of outer joins.

1. Create a join for level 1 (OrderHeader for example) and a table on level 2 (OrderItem for example). If the root table is the first, i.e. left table of the join, use a left outer join. Else, use a right outer join.

2. Export all primary keys in the mapping column.3. Create another Join connecting additional level 2 tables (OrderNote for example) and the first created join.

Ensure to use an outer join so that the first join node is on the outer side.4. Again, export all primary keys.5. When done with level 2 tables, proceed with level 3 as before until all tables are part of the calculation view.6. Connect the top join to the aggregation node.

30 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Managing Modeled Persistence Objects

Page 31: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

7. Export all properties in the mapping tab.8. Activate the calculation view.

NoteIn case of error message "No measure defined in a reporting enabled view", you have to specify in the aggregation node at least one column as a measure to successfully activate the calculation view.

For more information, see Creating Graphical Calculation Views in the SAP HANA Modeling Guide for SAP HANA Web Workbench.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideManaging Modeled Persistence Objects P U B L I C 31

Page 32: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

6 Managing Lifecycle Profiles

Lifecycle profiles are the main entities in Data Lifecycle Manager. They capture all details relevant for managing the lifecycle of a persistence object.

The Manage Lifecycle Profiles screen of the Data Lifecycle Manager is split up into two main areas:

● On the left side of the DLM Profiles area, you see a list of all existing lifecycle profiles. Here, you can search for lifecycle profiles by profile name or the user who last changed the profile. You can add new profiles or delete profiles.

● On the right side of the Profile Details area, you see and maintain the selected profile.

A lifecycle profile consists of the following parts:

Part of the Lifecycle Description

Header Contains the name of the profile, activation status, profile version number information on changed by and changed at, as well as a bar chart showing the current data distribution in source and target storage.

Source persistence informa­tion

Contains information about the source persistence object (SAP HANA table for example).

Trigger type Contains information about how the relocation run should be triggered. There are two options: Manually or scheduled (every night at 02:00 AM for example).

32 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Managing Lifecycle Profiles

Page 33: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Part of the Lifecycle Description

Destination attributes Contains information about:

● Storage destination● Target Persistence Type for the specified storage destination (SAP HANA Dynamic Tier­

ing Table, for example)● Relocation direction

Data Lifecycle Manager supports offloading of data to the assigned storage destination (direction Hot to Cold) and onboarding of data if required (direction Cold to Hot). Hot means the SAP HANA database itself, whereas Cold means the downstream offload des­tinations. The Bidirectional option automatically triggers the data flow direction based on the changes in the relocation rules.

● Package SizeSpecifies the number of records to be processed in a relocation package. The default value is 1,000,000.

NoteSAP HANA Spark Controller does not currently support packaging. For the latest infor­mation, see SAP Note 2290922 .

● Clash StrategySpecifies how Data Lifecycle Manager handles unique key constraint violations.For the Hot to Cold direction, there are two options:○ Stop a relocation run if a unique key constraint violation occurs. This means that the

run will fail with a unique key constraint violation error.○ Overwrite the record in the target. This means that the record will overwrite any ex­

isting records in the cold storage with the same database table primary key.For the Cold to Hot direction, there are two options:○ Stop a relocation run if a unique key constraint violation occurs. This means that the

run will fail with a unique key constraint violation error.○ Skip the record.

CautionSAP HANA Spark Controller does not currently support clash strategies. This means that unique key constraint violations are ignored and records with a unique key might be relocated multiple times, which can result in incorrect data in the storage. For the latest information, see SAP Note 2290922 .

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideManaging Lifecycle Profiles P U B L I C 33

Page 34: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Part of the Lifecycle Description

Destination persistence infor­mation

Contains information about the data flow between the source and the target with the following details:

● The target persistence object details, for SAP HANA Dynamic Tiering, the target schema and the generated extended table for example.

● Objects that are generated when the lifecycle profile is activated. For more information, see Generated Objects [page 37].

Note● The data flow can be collapsed and expanded.● For SAP HANA table groups there is a data flow for each table of the group.

Relocation rule Specifies which rule Data Lifecycle Manager applies when relocating data.

The rule identifies the relevant records in the source persistence to be relocated to the target persistence (in the configured storage destination). The rule therefore states, which data is re­located to the colder storage. Whether the data is actually relocated from the source persis­tence to the target persistence or the other way round, depends on the relocation direction:

● Hot to Cold:All records in the hot store, which fulfill the condition defined in the rule, are relocated to the cold store.Records in the cold store, which do or do not fulfill the condition, remain in the cold store.Records in the hot store, which do not fulfill the condition, remain in the hot store.

● Cold to Hot:All records in the cold store, which do not fulfill the condition defined in the rule, are relo­cated to the hot store.Records in the hot store, which do or do not fulfill the condition, remain in the hot store.Records in the cold store, which fulfill the condition, remain in the cold store.

● Bidirectional:The records of the cold store and the hot store are considered together (UNION). All re­cords that fulfill the condition defined in the rule are located in the cold store after the re­location run.This means:○ All records in the hot store, which fulfill the condition, are relocated to the cold store.○ All records in the cold store, which do not fulfill the condition, are relocated to the hot

store.

Generated object(s) Contains information about the relocation procedure(s). For more information, see Generated Objects [page 37].

34 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Managing Lifecycle Profiles

Page 35: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

6.1 Create Lifecycle Profile

To specify the parameters for relocating data of a specific source persistence object, you create a lifecycle profile.

Prerequisites

● NoteIf a specific source persistence object is already used in a lifecycle profile, you should not create another profile for the same source persistence object. This also means:

○ You should only use a table group as source persistence object in a lifecycle profile if no other lifecycle profile has been defined yet for any of the tables in the group.

○ You should only use a table hierarchy as source persistence object in a lifecycle profile if no other lifecycle profile has been defined yet for any of the tables in the hierarchy. Make especially sure that the calculation view that is used as table hierarchy in a lifecycle profile only contains tables that are not part of another calculation view for which a lifecycle profile has already been created.

The following example explains the need of this precondition:

Lifecycle profile A contains calculation view A and calculation view A contains table A and table B. Calculation view B contains table B and table C. Before calculation view B is used in a lifecycle profile, you have to be aware that table B in calculation view B is already used in lifecycle profile A. If you want to use calculation view B in a lifecycle profile however, you should know that each lifecycle profile generates a separate target (cold) table. In a scenario such as described above, this would lead to two lifecycle profiles and two target (cold) tables, but one source (hot) table.

● The source table or tables have to be column store tables.

Procedure

1. In the DLM Profiles area on the Manage Lifecycle Profile screen, choose +.

In the Create New Profile area on the right side of the screen, you specify the parameters of the profile.2. In the Header area, enter a name for the profile.3. In the Storage Destination Type Details area, specify the following:

○ Source persistence type○ Modeled persistence object details

The information you enter here depends on the source persistence type:For source persistence type SAP HANA table, you specify a schema and table name for example. Additionally, for tables without a primary key, you can specify a nominal key, which is treated like a primary key by Data Lifecycle Manager. Using the nominal key, you can activate a life cycle profile for a table without primary key.For source persistence type SAP HANA table group, you specify a table group name.For source persistence type SAP HANA table hierarchy, you specify a table hierarchy name.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideManaging Lifecycle Profiles P U B L I C 35

Page 36: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Note○ A source persistence object can only be assigned to one lifecycle profile.○ SAP HANA Spark Controller does not currently support nominal keys. For the latest information,

see SAP Note 2290922 .

○ Trigger typeIf you select Manual, you can only run the relocation manually.If you select Scheduled, you can use scheduling parameters to define a start date, recurrence and end date for running the relocation. For more information, see Execute Relocation Run for a Lifecycle Profile [page 42].

4. In the Destination Attributes area, specify the following:○ Storage destination○ Relocation direction○ Package size (of a relocation package)○ Clash strategy in case of a unique key constraint violation

Note

For latest information on restrictions for SAP HANA Spark Controller, see SAP Note 2290922 .

5. In the Rule Editor area, define the relocation rule.

The relocation rule defines the data slice that will be relocated during a relocation run.

a. Select the rule editor type.

NoteThe type of rule editor depends on the source persistence type. For more information, see Rule Editors [page 41].

b. Define the rule in the editor.

NoteNote that columns with data type ST_POINT are not allowed for defining relocation rules.

c. Validate the syntax of the rule.

Once you have validated the syntax of the rule, the system displays the total number of records and the number of records affected by relocation according to the defined rule. The number of affected records is the number of records that will be relocated when a relocation run is executed for the profile.

6. Save the profile.

A version number is assigned to the profile. Using the Versions button in the upper right corner of the Manage Lifecycle Profile screen, you can open an overview of all versions of the lifecycle profile. From here, you can open a specific (historic or current) version of the profile.

36 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Managing Lifecycle Profiles

Page 37: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

NoteOnce you have specified the source and destination persistence and saved your profile, a bar chart is displayed in the Header area. This indicates the current data distribution across the various storage destinations.

7. For target persistence type SAP IQ Table: Create a target table in SAP IQ.

For more information, see Create SAP IQ Target Table via Generated Statement (DDL) [page 44].8. Activate the profile.

Results

When you activate the profile, the following happens:

● Data Lifecycle Manager generates various objects depending on the storage destination and target persistence type chosen. These are displayed in the Destination Persistence and Generated Object(s) area of the profile. For an overview, see Generated Objects [page 37].

● The Where-Used button becomes available for the source persistence object in the profile.

You can now simulate and execute a relocation run for the lifecycle profile.

CautionYou must not change the structure of a table that is used in a lifecycle profile (as soon as data has been relocated). If the target is still empty, you can delete the profile and create a new profile with the changed table.

6.1.1 Generated Objects

The tables below provide an overview of the generated objects the system displays on the Destination Persistence and Generated Object(s) tab of the Manage Lifecycle Profile screen after you have activated a lifecycle profile.

NoteFor storage destination types SAP HANA Dynamic Tiering, SAP IQ over SDA, and Deletion Bin Destination: With SAP_HDM_DLM_GNR, Data Lifecycle Manger provides a default schema for the generated objects. When creating a storage destination, you can overwrite the default schema. Data Lifecycle Manager then uses the schema you specified in the Parameters section of the storage destination that is assigned to the lifecycle profile.

For storage destination type Spark SQL (DESTINATION): Data Lifecycle Manager uses the schema of the source persistence object for the generated objects.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideManaging Lifecycle Profiles P U B L I C 37

Page 38: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Generated Object(s) Tab:

Section Generated Ob­ject

Description Relevant for Stor­age Des­tination Type SAP HANA Dynamic Tiering

Relevant for Stor­age Des­tination Type SAP IQ over SDA

Relevant for Stor­age Des­tination Type Spark SQL (DESTI­NATION)

Relevant for Stor­age Des­tination Type De­letion Bin Destina­tion

Relocation Procedures

Relocation Pro­cedure

This stored procedure is used to per­form the mass data movement from the SAP HANA persistency to the storage destination.

x x x x

Reverse Reloca­tion Procedure

This stored procedure is used to per­form the mass data movement from the storage destination to the SAP HANA persistency.

NoteThe reverse relocation procedure is only generated if the relocation direc­tion is Cold to Hot or Bidirectional.

x x x n/a

Destination Persistence Tab:

Section Generated Ob­ject

Description Relevant for Stor­age Desti­nation Type SAP HANA Dy­namic Tiering

Relevant for Stor­age Desti­nation Type SAP IQ over SDA

Relevant for Stor­age Desti­nation Type Spark SQL (DESTINA­TION)

Persistence Object Details

Table / Virtual Ta­ble

● For SAP HANA Dynamic Tiering Table: The extended table is created in the schema specified in the storage destina­tion.

● For SAP IQ Table: The virtual table is cre­ated in the schema specified in the stor­age destination.

● For HADOOP_TABLE: The virtual table is created in the schema of the source per­sistence object.

x x x

38 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Managing Lifecycle Profiles

Page 39: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Section Generated Ob­ject

Description Relevant for Stor­age Desti­nation Type SAP HANA Dy­namic Tiering

Relevant for Stor­age Desti­nation Type SAP IQ over SDA

Relevant for Stor­age Desti­nation Type Spark SQL (DESTINA­TION)

Union Views Pruning Node View

A pruning node is an intelligent efficient un­ion view which, based on the where condition specified against it, would automatically de­cide whether it needs to read only from the source table, read only from the target table or read from both.

NoteThe pruning view for a table cannot not be generated if the table contains one of the unsupported data types CLOB, NCLOB, or BLOB.

We do not recommend using the gener­ated union view instead of the pruning node view, however, as the union view might lead to see duplicate records. The following example demonstrates the be­havior of the union view:

The union view performs an SQL UNION to show all rows from hot and cold stor­age. Suppose the hot storage contains re­cord A. A lifecycle profile is executed which relocates record A to cold storage. Following this, there is a transaction to hot storage, updating record A. Because re­cord A does not exist on hot storage, it is created. In this situation, the union view will display two rows for record A: the old one, which is persisted in cold storage, and the updated version of it, which is per­sisted in hot storage.

Given that the rule still applies to the re­cord, running the lifecycle profile again leads record A to be relocated to cold storage, overwriting the older version. Then, the union view will display one re­cord A.

x x x

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideManaging Lifecycle Profiles P U B L I C 39

Page 40: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Section Generated Ob­ject

Description Relevant for Stor­age Desti­nation Type SAP HANA Dy­namic Tiering

Relevant for Stor­age Desti­nation Type SAP IQ over SDA

Relevant for Stor­age Desti­nation Type Spark SQL (DESTINA­TION)

Other than the union view, the pruning view is capable of detecting multiple ver­sions of the same record, showing only the most recent one.

Union View To enable a combined reporting a union view needs to be generated across the original column store table (source table) and the generated (extended or virtual) table. The union view performs an SQL UNION to show all rows from hot and cold storage.

For source tables with fields of data type ST_POINT, the union view in order to com­bine the data from both, the source and the target table, reads the data from the source table and executes the specialized view.

x x x

Views Specialized View When relocating geographical data with data type ST_POINT (supporting 2D spatial data [X, Y coordinates]), fields of data type ST_POINT in the target table will be split up into two fields, one for the X coordinates and another field for the Y coordinates.

The specialized view provides the data from the target table. It converts the separated fields for the X and Y coordinates to one combined field of data type ST_POINT.

x x no

NoteFor source persistence type SAP HANA Table Group, the system for each table of the group displays a data flow with target persistence object details and generated views.

For source persistence type SAP HANA Table Hierarchy, the system for each table of the hierarchy displays a data flow with target persistence object details and generated views.

40 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Managing Lifecycle Profiles

Page 41: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

6.1.2 Rule Editors

The rule editor depends on the source persistence type.

SAP HANA Rule Editor

In the SQL-Based Rule Editor for SAP HANA tables, all elements (columns) of the SAP HANA table are available for defining a relocation rule. For a column DATE for example, a rule could be: "DATE"< '2015-06-14'. Data Lifecycle Manager also offers a function library to define a relocation rule. You can use date functions like DAYS_BETWEEN (d1, d2) , for example.

Table Group SQL-Based Rule Editor

In the SQL-Based Rule Editor for SAP HANA table groups, all common table columns you have selected when you defined the SAP HANA table group are available for defining a relocation rule.

Table Hierarchy Editor

In the Form-Based Rule Editor for SAP HANA table hierarchies, all columns of all tables that are data sources of the calculation view are available for defining relocation rules. You can define multiple rules by adding additional rows in the rule editor.

When you define multiple relocation rules, they are combined with AND or OR (conjunctive) operators according to the following rules:

● Relocation rules for two different columns are combined with AND operator

OrderItem.price < 100 AND OrderItem.productName.length < 1● Relocation rules for the same column are combined with OR operator

OrderItem.price < 100 OR OrderItem.price > 10,000● The sequence of the rules has no impacts on the behavior described above.

6.1.3 Notes on Packeting

Packeting for Table Hierarchies

For table hierarchies, Data Lifecycle Manager performs relocation in a way that a specific hierarchy for a level 1 table key (OrderID of OrderHeader table for example) is stored in only one storage location. This could imply more

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideManaging Lifecycle Profiles P U B L I C 41

Page 42: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

records being relocated than expected. Keep this behavior in mind when specifying the package size for a lifecycle profile with a table hierarchy.

You have defined a two level hierarchy with OrderHeader and OrderItem table where OrderItem contains a price column. OrderHeader contains five orders, where for each OrderID there are three items available in OrderItem.

You have defined a rule for the price column of the OrderItem table. The rule matches one order item per OderID. Since relocation is done based on the level 1 table, for package size three, this means that nine records will be relocated. For package size five, this means that 15 records will be relocated.

6.2 Simulate Relocation Run for a Lifecycle Profile

Simulating the relocation run for a lifecycle profile allows you to check if the results of the relocation run would meet your expectations.

Procedure

1. In the DLM Profiles area in the Manage Lifecycle Profiles screen, select the profile.

2. For an overview of the number of records that would be relocated, choose Simulate Data Relocation Count at the bottom of the screen.

For SAP HANA table groups there is a data flow for each table of the group. For each data flow, the system displays the data relocation count.

3. For a data preview (maximum 10 records) of the records that would be relocated, choose Simulate Data Relocation Preview .

For SAP HANA table groups there is a data flow for each table of the group. For each data flow, the system displays the data relocation preview.

6.3 Execute Relocation Run for a Lifecycle Profile

When executing a relocation run for a lifecycle profile, among other things, the database procedure that has been generated for the profile relocates the data according to the relocation rules that have been defined in the profile.

Prerequisites

CautionBefore executing a lifecycle profile, you have to replace the native level SAP HANA SQL objects (SAP HANA tables for example) with the corresponding views (union or pruning node view) in your business applications.

42 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Managing Lifecycle Profiles

Page 43: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Only once this is done, should you execute a lifecycle profile. Otherwise the business application might crash, because it will not be able to access the data outside of SAP HANA.

Procedure

1. In the DLM Profiles area in the Manage Lifecycle Profiles screen, select the profile.2. In the details area, press Run at the bottom of the screen. You now have the following options:

For trigger type Manual:

Option Description

Trigger Manually On the popup that appears, enter your password and press Complete.

For trigger type Scheduled:

Option Description

Schedule On the popup that appears, enter a start date for the relocation run and a recurrence. In the Ends at field, you define when the recurrence is valid till. Enter your password and press Complete.

Trigger Manually On the popup that appears, enter your password and press Complete.

NoteNote that changes to the scheduling settings that are done in any other UI (XS Job Details in the SAP HANA Administration Tool for example) are not visible in the lifecycle profile UI in Data Lifecycle Manager.

Results

The relocation run starts in the next few seconds as a background task. For scheduled runs, the run starts at the scheduled date and time as a background task.

Clicking the profile in the DLM Profiles area refreshes the Profile Details area. Here, in the Data Distribution Overview pie chart, you can see the changes in the data distribution across the storage destinations.

Switch to the Logs screen to check the results of the relocation run.

CautionAs soon as data has been relocated, you must not change the structure of a table that is used in a lifecycle profile. If the target is still empty, you can delete the profile and create a new profile with the changed table.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideManaging Lifecycle Profiles P U B L I C 43

Page 44: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

6.4 Display Version History

For a lifecycle profile, you can display a version history and open any historic version in a non-editable mode.

Procedure

1. In the DLM Profiles area in the Manage Lifecycle Profiles screen, select the profile.2. To open the version history, press Versions in the upper right corner of the screen3. To open the profile details for a historic version, click the version.

6.5 Deleting Lifecycle Profiles

You can delete a lifecycle profile once the relevant data has been completely moved back into SAP HANA persistency. Note that Data Lifecycle Manager archives all deleted profiles.

6.6 Create SAP IQ Target Table via Generated Statement (DDL)

When using SAP IQ as the storage destination type, Data Lifecycle Manager provides a utility tool to generate an SAP IQ table create statement (DDL) for a corresponding source persistence type. Supported source persistence types are SAP HANA table, table group, and table hierarchy.

Procedure

1. In the header area in the Data Lifecycle Manager screen, choose More.2. From the More menu, choose Sybase DDL Generator.

The SAP IQ DDL Generator Utility tool opens in a separate browser window.3. Select the source persistence type.4. Enter the DDL generation parameters according to the selected source persistence type.

NoteIn the Owner field, enter the SAP IQ table owner that you specified in the storage destination used in the lifecycle profile for the source persistence object.

44 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Managing Lifecycle Profiles

Page 45: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

5. Choose Generate at the bottom of the screen.

The system generates and displays the create statement(s) for the table(s) of the source persistence object.6. Choose Select at the bottom of the screen and copy the content from the text area to the clipboard.7. Switch to the SAP IQ SQL console in the SAP IQ Cockpit and use the generated DDL to create the target table

in SAP IQ.

CautionDo not change the suggested name for the target table in the DDL.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideManaging Lifecycle Profiles P U B L I C 45

Page 46: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

7 Checking Logs

Data Lifecycle Manager provides logs to check the status of relocation runs and to analyze errors.

The Logs screen in Data Lifecycle Manager is split up into two main areas:

● The left side of the DLM Profiles area displays a list of all existing lifecycle profiles. You can filter for lifecycle profiles by profile name or by the user who last changed the profile.

● The right side of the screen displays the relocation runs for the selected profile and open the logs for a selected relocation run.

Procedure

1. From the DLM Profiles area, select the lifecycle profile that you want to check the logs for.On the right side of the Runs for Profile <profile name> area, a list of all relocation runs for the selected lifecycle profile opens.This displays the run status, the estimated data relocation count for the runs and other information.

2. To open the messages of the log, select a run by clicking on the run ID.Data Lifecycle Manager provides you with detailed messages to analyze the run.

7.1 Abort Long Running Jobs or Jobs with Timeout

If a relocation run keeps the status Running for a long period of time, the job might still be running or might have run into a timeout. In both cases, you can abort the background job and set the run status to error, if needed.

Procedure

1. From the DLM Profiles area, select the lifecycle profile that you want to check the logs for.

On the right side of the Runs for Profile <profile name> area, a list of all relocation runs for the selected lifecycle profile opens.

This displays the run status, the estimated data relocation count for the runs and other information.2. Choose Abort Job.

A dialog box appears listing the threads performing the data move. If the system displays No data then currently no threads are moving data.

3. Choose Abort Job.

46 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Checking Logs

Page 47: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Results

1. The system cancels the threads, if there are any.

NoteNote that canceling threads will only work if the value in the CONNECTION_ID column in the dialog box displays a positive value. It will not work for value -1.

2. The status of the job run changes from Running to Error.3. The ABORTED column in the dialog box displays the result of the thread cancellation.

Aborting the job unlocks the profile in case the long running background job has run into timeout.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideChecking Logs P U B L I C 47

Page 48: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

8 Exporting and Importing Data Lifecycle Manager Entities

Data Lifecycle Manager entities like storage destinations, modeled persistence objects, or lifecycle profiles can be described in JSON format. For transport or backup purposes, you can export and import the entities in JSON format.

Exporting a Data Lifecycle Manager Entity

When you select one of the entities on the Manage Storage Destinations, Manage Modeled Persistence Objects, or Manage Lifecycle Profiles screen, you can choose Export at the bottom of the screen to export it to your local machine.

NoteNote the following, when exporting lifecycle profiles:

● For lifecycle profiles, the exported file not only contains the profile but also contains the storage destination and modeled persistent object used in the profile.

● Only the latest activated version of a profile will be exported. For profiles that have not been activated yet, the exported file will be empty.

Importing a Data Lifecycle Manager Entity

To import one or multiple storage destinations, choose Import at the bottom of the Manage Storage Destinations screen.

To import one or multiple modeled persistence objects, choose Import at the bottom of the Manage Modeled Persistence Objects screen.

To import one or multiple lifecycle profiles, choose Import at the bottom of the Manage Lifecycle Profiles screen.

NoteNote the following, when importing a lifecycle profile:

● When trying to import a profile that is already available in the system and has exactly the same definition as the profile in the system, neither the profile nor the storage destination are imported, but the already existing profile and storage destination in the system are reused. The import ends successfully.

● When trying to import a profile that is already available in the system, but has a different definition compared to the definition of the profile in the system, an error message appears. Before importing the profile, align the definitions manually either in the system or in the file.

48 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Exporting and Importing Data Lifecycle Manager Entities

Page 49: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

● If a profile has been deleted, but the storage destination used for the profile has not, then the system only imports the profile and not the storage destination. The existing storage destination in the system will be reused.

● When trying to import a profile on the Manage Storage Destinations screen, only the storage destination will be considered for the import. The lifecycle profile will be ignored for the import.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideExporting and Importing Data Lifecycle Manager Entities P U B L I C 49

Page 50: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

9 Backup & Recovery Considerations

Backup and recovery functions provide a fallback in the event of a hardware failure or logical error. When using Data Lifecycle Manager, the SAP HANA system landscape comprises several components: SAP HANA database, SAP HANA Dynamic Tiering and SAP IQ. We therefore recommend aligning the backup and recovery strategies for the components to ensure a consistent backup if recovery is needed.

Considerations for Using SAP Dynamic Tiering as Storage Destination

Backup and recovery always apply to the whole database, including the SAP HANA database and extended storage. This means that both memory (hot store) and disk store (warm) are backed up.

Backup and recovery works the same way as in regular multiple-host systems (scale-out systems):

● All hosts are included in backup, including the dynamic tiering host.● The backup requires that all worker processes are running.

Note● With SAP HANA SPS 10 Backint for SAP HANA has been fully integrated in SAP HANA Dynamic Tiering.● An SAP HANA system with the dynamic tiering option installed does not support storage snapshots and

delta backup.

Related Information

● What's New in SAP HANA Dynamic Tiering on http://help.sap.com/hana_options_dt/● Section Backup and Recovery for Dynamic Tiering in the SAP HANA Dynamic Tiering: Administration Guide on

http://help.sap.com/hana_options_dt/● Section SAP HANA Database Backup and Recovery in the SAP HANA Administration Guide on http://

help.sap.com/hana_platform● Administration: Backup, Restore, and Data Recovery guide for the relevant SAP IQ version on http://

help.sap.com/iq

50 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Backup & Recovery Considerations

Page 51: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

10 Integrating Data Lifecycle Manager with Native SAP HANA Applications

Application Integration - SELECT

● Read access for full dataset via generated SAP HANA Views● The application logic has to consider the SAP HANA View generated by Data Lifecycle Manager instead of the

original table to enable full data access● Things to consider

○ No global index / primary keys across storages○ Generated View with SELECT DISTINCT based on relocation destination

Application Integration - INSERT / UPDATE / DELETE

DML statements are executed in the hot store in order to keep the application stable.

Things to consider:

● Avoid insert into statements for closed (relocated to cold storage) data periods as data has been relocated already

● Data Lifecycle Manager clash strategy for identical primary keys in both data stores

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideIntegrating Data Lifecycle Manager with Native SAP HANA Applications P U B L I C 51

Page 52: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

11 Troubleshooting

Application Runtime Information

Using More Application Runtime Info in the header area of the SAP HANA Data Warehousing Foundation tool, you can display version information for all involved applications: SAP HANA delivery units, SAPUI5, and browser.

Consider Session Timeout Issue for XS Jobs

XS jobs for Data Lifecycle Manager relocation runs have a session timeout default of 432,000 seconds, which you can see in the XS Job Details in the SAP HANA Administration Tool.

If a relocation run keeps the status Running for a long period of time or fails, this might be due to a timeout issue. To check this and solve the issue proceed as follows:

NoteYour user needs a Data Lifecycle Manager administrator role assigned to him or her.

1. For the lifecycle profile in question, click the Open XS Job Tool button in the upper right area of the Manage Lifecycle Profiles screen to open a popup with an overview of all jobs that currently are scheduled in the XS job tool for this lifecycle profile - either with manual trigger or scheduled.

NoteA Data Lifecycle Manager job is created for a lifecycle profile and the user who executes the profile. Hence, the XS job name is composed of profile ID id and user name. In the overview, you can identify a certain job with the USER column.

2. Navigate to the XS Job Details in the SAP HANA Administration Tool by selecting the relevant entry and then clicking the navigation button.

3. In the XS Job Details, check the status of the job.4. On the Configuration tab of the XS Job Details, change the value for Session Timout (s) if necessary and save

the job.5. Depending on your scenario, in Data Lifecycle Manager, you can now run the profile again or wait for the next

scheduled run to get the changed value for the session timeout being applied.

52 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Troubleshooting

Page 53: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

NoteNote that changes to the scheduling settings that are done in any other UI (XS Job Details in the SAP HANA Administration Tool for example) are not reflected in the lifecycle profile UI in Data Lifecycle Manager.

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideTroubleshooting P U B L I C 53

Page 54: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

Important Disclaimers and Legal Information

Coding SamplesAny software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, unless damages were caused by SAP intentionally or by SAP's gross negligence.

AccessibilityThe information contained in the SAP documentation represents SAP's current view of accessibility criteria as of the date of publication; it is in no way intended to be a binding guideline on how to ensure accessibility of software products. SAP in particular disclaims any liability in relation to this document. This disclaimer, however, does not apply in cases of willful misconduct or gross negligence of SAP. Furthermore, this document does not result in any direct or indirect contractual obligations of SAP.

Gender-Neutral LanguageAs far as possible, SAP documentation is gender neutral. Depending on the context, the reader is addressed directly with "you", or a gender-neutral noun (such as "sales person" or "working days") is used. If when referring to members of both sexes, however, the third-person singular cannot be avoided or a gender-neutral noun does not exist, SAP reserves the right to use the masculine form of the noun and pronoun. This is to ensure that the documentation remains comprehensible.

Internet HyperlinksThe SAP documentation may contain hyperlinks to the Internet. These hyperlinks are intended to serve as a hint about where to find related information. SAP does not warrant the availability and correctness of this related information or the ability of this information to serve a particular purpose. SAP shall not be liable for any damages caused by the use of related information unless damages have been caused by SAP's gross negligence or willful misconduct. All links are categorized for transparency (see: http://help.sap.com/disclaimer).

54 P U B L I CSAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration Guide

Important Disclaimers and Legal Information

Page 55: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

SAP HANA Data Warehousing Foundation - Data Lifecycle Manager Administration GuideImportant Disclaimers and Legal Information P U B L I C 55

Page 56: SAP HANA Data Warehousing Foundation - Data Lifecycle ...€¦ · PUBLIC SAP HANA Data Warehousing Foundation 1.0 SPS 05 Document Version: 1.0 – 2016-10-14 SAP HANA Data Warehousing

go.sap.com/registration/contact.html

© 2017 SAP SE or an SAP affiliate company. All rights reserved.No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. The information contained herein may be changed without prior notice.Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary.These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names mentioned are the trademarks of their respective companies.Please see http://www.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.