sap hana dynamic tiering: administration guide · 1 sap hana dynamic tiering administration guide...

166
Administration Guide PUBLIC SAP HANA Dynamic Tiering 2.0 SP 00 Document Version: 1.0 – 2016-11-30 SAP HANA Dynamic Tiering: Administration Guide

Upload: lytu

Post on 15-Apr-2018

270 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Administration Guide PUBLIC

SAP HANA Dynamic Tiering 2.0 SP 00Document Version: 1.0 – 2016-11-30

SAP HANA Dynamic Tiering: Administration Guide

Page 2: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Content

1 SAP HANA Dynamic Tiering Administration Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Getting Started. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.1 SAP HANA Dynamic Tiering Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Dynamic Tiering for Tenant Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.2 Authorization for Administration Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.3 Tools for Administration and Monitoring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9

3 System Administration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.1 Managing the Dynamic Tiering Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Verify that the Dynamic Tiering Service Is Installed and Running. . . . . . . . . . . . . . . . . . . . . . . . .12View the Status of the Dynamic Tiering Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14Stop or Restart the Dynamic Tiering Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14Stop or Start the Dynamic Tiering Service Manually. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.2 Configuring Dynamic Tiering Properties (INI Files). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Dynamic Tiering Service Properties (esserver.ini). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Dynamic Tiering Tenant Database Properties (global.ini). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

3.3 Licensing for Dynamic Tiering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353.4 Managing Extended Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

The Delta Store. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Create Extended Storage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Remove Extended Storage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

3.5 Managing Space for Extended Storage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Types of Dbspaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Add a Dbspace File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Enlarge a Dbspace File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Drop a Dbspace File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Dbspace File Details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46

3.6 Multistore Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Data Aging Through Multistore Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48Query Processing in Multistore Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49Multistore Table Partition Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Multistore Table Placement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Multistore Table Supported Data Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53Multistore Table Functional Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Create a Multistore Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Manage a Multistore Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

2 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Content

Page 3: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.7 Extended Store Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Extended Store Table Functional Restrictions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89Extended Store Table Supported Data Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90Choose Column Tables for Dynamic Tiering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Convert HANA Tables to Extended Store Tables Using the SAP HANA Cockpit. . . . . . . . . . . . . . 92Manage Extended Store Tables Using SQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .93Manage Extended Tables in the SAP HANA Studio. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

3.8 Triggering a Merge on a Delta-Enabled Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99MERGE DELTA Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

3.9 Computing Statistics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1023.10 Importing and Exporting Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

Extended Store Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Multistore Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106Import Partial Rows to an Extended Store or MultistoreTable. . . . . . . . . . . . . . . . . . . . . . . . . .109

3.11 Monitoring Dynamic Tiering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109Monitoring Dynamic Tiering in the SAP HANA Studio. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109Monitoring Dynamic Tiering in the SAP HANA Cockpit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

3.12 Backup and Recovery for Dynamic Tiering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Creating Backups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114Finding and Checking Backups for Recovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117Recovering SAP HANA Databases with Dynamic Tiering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118

3.13 Dynamic Tiering High Availability (Failover). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121System Replication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122Change High Availability Group Assignment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Manual Failover to Dynamic Tiering Standby Host. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Dynamic Tiering Automatic Failover with SAN Storage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125Failover in a Same Host Deployment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

3.14 Performing Consistency Checks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125Catalog Consistency Checker. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126Extended Store Database Consistency Checker. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Table Consistency Checker. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

4 Security Administration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1334.1 Configure Private Internal Communication Using the Command Line Interface. . . . . . . . . . . . . . . . 1344.2 Configure Private Internal Communication Using the Graphical User Interface. . . . . . . . . . . . . . . . 1364.3 Data Volume Encryption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

Functional Restrictions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Changing Persistence Encryption States. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

5 Using Dynamic Tiering with Multitenant Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1435.1 Verify Configuration of the SAP HANA Core System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

Verify That Tenant Databases Exist. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

SAP HANA Dynamic Tiering: Administration GuideContent P U B L I C 3

Page 4: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Verifying SAP HANA Cockpit Access. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1455.2 Adding the Dynamic Tiering Host to a Multitenant Database System. . . . . . . . . . . . . . . . . . . . . . . 1465.3 Prepare the Tenant Database Resources for Dynamic Tiering. . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

Prepare Resources Using SAP HANA Studio. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147Prepare Resources Using SQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

5.4 Provision the Dynamic Tiering Service to a Tenant Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . .1485.5 Failing Over with Multitenant Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1495.6 Create Extended Storage on the Tenant Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1495.7 Remove Dynamic Tiering from a Tenant Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1505.8 Converting Multitenant Database Containers Using Dynamic Tiering. . . . . . . . . . . . . . . . . . . . . . . 1515.9 Using Multitenant Databases with Same Host Deployment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

6 Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1526.1 Tools and Tracing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

Dynamic Tiering Administration User. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152Dynamic Tiering Stack File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153Sample Query Plan Showing Dynamic Tiering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

6.2 Configuration Issues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154Cannot Create Extended Storage Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154Cannot Communicate with SAP HANA Host. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

6.3 Operational Issues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156Cannot Create Extended Store Table with Delta Enabled. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157Importing an Extended Table into HANA Without Dynamic Tiering Returns Error. . . . . . . . . . . . 157Dynamic Tiering Operations Moving Large Amounts of Data Fail. . . . . . . . . . . . . . . . . . . . . . . .158Out of Space Errors for Delta Dbspace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158Query Returns "You have run out of space in <DBSPACE_NAME> DBSpace" Error . . . . . . . . . . 159Writing Date or Time Data to Extended Storage Violates Unique Constraint . . . . . . . . . . . . . . . 160Point-in-Time Recovery Leaves Dynamic Tiering Service in Utility Mode. . . . . . . . . . . . . . . . . . 160Point-in-Time Recovery After Dropping Database Results in Error. . . . . . . . . . . . . . . . . . . . . . 160

7 Glossary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

4 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Content

Page 5: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

1 SAP HANA Dynamic Tiering Administration Guide

This guide describes how to administer SAP HANA dynamic tiering.

Dynamic tiering is an optional component for SAP HANA. For details on administering SAP HANA, see the SAP HANA Administration Guide.

● Getting Started [page 6]● System Administration [page 11]● Security Administration [page 133]● Using Dynamic Tiering with Multitenant Databases [page 143]● Troubleshooting [page 152]● Glossary [page 162]

Related Information

SAP HANA Administration Guide

SAP HANA Dynamic Tiering: Administration GuideSAP HANA Dynamic Tiering Administration Guide P U B L I C 5

Page 6: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

2 Getting Started

The SAP HANA Dynamic Tiering: Administration Guide describes tasks and concepts for managing disk-based data in a HANA database system.

SAP HANA dynamic tiering is a native big data solution that adds smart, disk-based extended storage to your SAP HANA database. Dynamic tiering enhances SAP HANA with large volume, warm data management capability.

This guide provides the following information for dynamic tiering system administration:

● Architecture and tools overview● System administration and monitoring procedures● Security administration requirements and procedures● Multitenant database configuration and management● Troubleshooting tools and tips

For more information about SAP HANA dynamic tiering installation, landscape, and security, see the SAP Help Portal.

In this section:

SAP HANA Dynamic Tiering Architecture [page 6]You can install SAP HANA and SAP HANA dynamic tiering each on a dedicated server (referred to as a dedicated host deployment) or on the same server (referred to as a same host deployment).

Authorization for Administration Tasks [page 9]Administration tasks in dynamic tiering require certain privileges. These privileges must be granted to your database user or relevant role by a user administrator.

Tools for Administration and Monitoring [page 9]Use the SAP HANA cockpit and the SAP HANA studio to administer and monitor dynamic tiering.

Related Information

SAP Help Portal

2.1 SAP HANA Dynamic Tiering Architecture

You can install SAP HANA and SAP HANA dynamic tiering each on a dedicated server (referred to as a dedicated host deployment) or on the same server (referred to as a same host deployment).

SAP HANA and the dynamic tiering share a common database, consisting of regular, and extended tables.

6 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Getting Started

Page 7: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

SAP HANA Studio

SAP HANA Cockpit

SAP HANA Clients

Host B Host C Host D

Dynamic Tiering Standby Server

Host A

Hot Store (In-Memory

Tables)Logs

Warm Store(Extended

Tables)Logs

Shared Resources Location

SAP HANA Server

Dynamic Tiering ES Server

SAP HANA Standby Server

Figure 1: Components of SAP HANA Dynamic Tiering

The main dynamic tiering host is known as the worker. You can also install a second dynamic tiering host, known as the standby, to provide failover functionality for high availability. A standby does not require a separate SAP HANA dynamic tiering license.

The SAP HANA host and SAP HANA dynamic tiering worker communicate over a secure, encrypted internal connection. For network and communication security information, see the SAP HANA Security Guide.

Use the SAP HANA client interfaces to manage and monitor dynamic tiering. Use SAP HANA cockpit to monitor system information for the dynamic tiering host, including resource utilization and table usage statistics, and to manage extended storage. Use the HANA studio for dynamic tiering administration tasks, including managing extended store tables. The OS process for the dynamic tiering host is hdbesserver, and the service name is esserver.

To maximize native query performance, query optimizations ship the query operations to either the hot store or extended storage. Query operations against extended storage data are pushed down to the dynamic tiering worker, minimizing the load on the SAP HANA host.

In this section:

Dynamic Tiering for Tenant Databases [page 8]An SAP HANA system that supports multitenant database containers can have multiple tenant databases. Each tenant database is associated with a maximum of one dynamic tiering worker and standby pair.

SAP HANA Dynamic Tiering: Administration GuideGetting Started P U B L I C 7

Page 8: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Related Information

SAP HANA Security Guide

2.1.1 Dynamic Tiering for Tenant Databases

An SAP HANA system that supports multitenant database containers can have multiple tenant databases. Each tenant database is associated with a maximum of one dynamic tiering worker and standby pair.

Conversely, the same dynamic tiering worker and standby pair cannot be associated with multiple databases.

For details about tenant database features, see Multitenant Database Containers in the SAP HANA Administration Guide.

Figure 2: SAP HANA System with Dynamic Tiering for Tenant Databases

Related Information

Using Dynamic Tiering with Multitenant Databases [page 143]SAP HANA Administration Guide

8 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Getting Started

Page 9: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

2.2 Authorization for Administration Tasks

Administration tasks in dynamic tiering require certain privileges. These privileges must be granted to your database user or relevant role by a user administrator.

For a complete list of authorizations by task, see Authorization for Basic Administration Tasks in the SAP HANA Administration Guide.

Dynamic Tiering Administration Tasks

System administration tasks require system privileges.

Task Required Authorization

Create, alter, or drop the extended storage configuration, and stop the dynamic tiering service (esserver)

System privilege EXTENDED STORAGE ADMIN or SERVICE ADMIN (to stop the dynamic tiering service)

System configuration tasks require system privileges.

Task Required Authorization

Change the properties of an extended storage engine as de­fined in the parameters of the configuration file esserver.ini.

System privilege EXTENDED STORAGE ADMIN or INIFILE ADMIN

Related Information

SAP HANA Administration Guide

2.3 Tools for Administration and Monitoring

Use the SAP HANA cockpit and the SAP HANA studio to administer and monitor dynamic tiering.

The SAP HANA Studio

The SAP HANA studio runs on the Eclipse platform and is both the central development environment and the main administration tool for SAP HANA. Use the SAP HANA studio to administer and monitor storage on disk and extended tables. For an overview, see the SAP HANA Administration Guide.

SAP HANA Dynamic Tiering: Administration GuideGetting Started P U B L I C 9

Page 10: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

The SAP HANA Cockpit

The SAP HANA cockpit is an SAP Fiori Launchpad site that provides you with a single point of access to a range of Web-based applications for the administration of SAP HANA. Use the SAP HANA cockpit to administer and monitor storage on disk.

For an overview, see SAP HANA Cockpit in the SAP HANA Administration Guide.

The SAP HANA cockpit is not installed as part of core installation. See SAP HANA Cockpit Installation and Update Guide.

Related Information

Configuring Dynamic Tiering Properties (INI Files) [page 17]Managing Extended Storage [page 35]Managing Space for Extended Storage [page 40]Extended Store Tables [page 88]Monitoring Dynamic Tiering in the SAP HANA Studio [page 109]Monitoring Dynamic Tiering in the SAP HANA Cockpit [page 110]SAP HANA Administration GuideSAP HANA Cockpit Installation and Update Guide

10 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Getting Started

Page 11: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3 System Administration

As a database administrator, you are responsible for operational tasks related to the administration, monitoring, and maintenance of your SAP HANA systems with dynamic tiering.

In this section:

Managing the Dynamic Tiering Service [page 12]The dynamic tiering service is the component that provides warm storage capability to an SAP HANA system.

Configuring Dynamic Tiering Properties (INI Files) [page 17]INI files contain properties for configuring SAP HANA dynamic tiering.

Licensing for Dynamic Tiering [page 35]Only one SAP HANA dynamic tiering license is allowed per SAP HANA system.

Managing Extended Storage [page 35]Each SAP HANA database is associated with a single extended store.

Managing Space for Extended Storage [page 40]Extended storage is divided into units called dbspaces.

Multistore Tables [page 47]A multistore table is a type of SAP HANA column table that can have some partitions in HANA default column storage and other partitions in a store associated with SAP HANA, such as extended storage.

Extended Store Tables [page 88]Extended tables reside in extended storage in dynamic tiering.

Triggering a Merge on a Delta-Enabled Table [page 99]On a delta-enabled extended store or multistore table, MERGE DELTA triggers a merge of data from the delta dbspace to the user dbspace. When used in a multistore table, you can restrict a manual delta merge to just the default store partition or extended store partition of the multistore table.

Computing Statistics [page 102]Compute statistics for columns to help HANA optimize queries on extended tables.

Importing and Exporting Data [page 103]You can move data between extended store and multistore tables (warm data) and HANA tables (hot data). You can also move data into extended store and multistore tables from an external source.

Monitoring Dynamic Tiering [page 109]Monitor resource usage and performance to identify patterns, forecast requirements, and correct problems.

Backup and Recovery for Dynamic Tiering [page 113]Backup and recovery applies to the whole database, including the SAP HANA database and extended storage.

Dynamic Tiering High Availability (Failover) [page 121]SAP HANA Dynamic Tiering supports both automatic and manual failover.

Performing Consistency Checks [page 125]

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 11

Page 12: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

The SAP HANA database provides procedures that let you perform a range of consistency check actions on catalog objects and database tables for both multistores and extended tables.

3.1 Managing the Dynamic Tiering Service

The dynamic tiering service is the component that provides warm storage capability to an SAP HANA system.

The OS process for the dynamic tiering host is hdbesserver, and the service name is esserver.

In this section:

Verify that the Dynamic Tiering Service Is Installed and Running [page 12]Adding the SAP HANA dynamic tiering host creates and starts the dynamic tiering service. Verify that the service is installed and running either through SAP HANA studio or by using the HDB info command on the host.

View the Status of the Dynamic Tiering Service [page 14]Use the M_SERVICES view to display the status for the dynamic tiering service on the dynamic tiering host.

Stop or Restart the Dynamic Tiering Service [page 14]When the installation of SAP HANA dynamic tiering completes, the dynamic tiering service (esserver) is running. To manually stop the service for any reason, such as to change a configuration parameter, use the SAP HANA cockpit or SAP HANA studio, or execute SQL through the SQL console.

Stop or Start the Dynamic Tiering Service Manually [page 17]You can stop the dynamic tiering service (esserver), and prevent the auto-restart mechanism from restarting the service. When stopped, the service can only be restarted manually.

3.1.1 Verify that the Dynamic Tiering Service Is Installed and Running

Adding the SAP HANA dynamic tiering host creates and starts the dynamic tiering service. Verify that the service is installed and running either through SAP HANA studio or by using the HDB info command on the host.

Verify Using HANA Studio

Procedure

1. In the SAP HANA studio Administration console, right-click the database in the Systems panel, select Configuration and Monitoring Open Administration , then select the Landscape tab.

12 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 13: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

2. Verify that the status of the esserver on the dynamic tiering host is active (green).

Results

● If the esserver service is inactive (red), restart the service.● If the service is not listed, the dynamic tiering worker is not installed. See the SAP HANA Dynamic Tiering:

Installation and Update Guide for steps on adding the dynamic tiering host.

Verify Using the Dynamic Tiering Host

Procedure

1. Log on to the SAP HANA dynamic tiering host as the <sid>adm user, where <sid> is the SAP HANA system ID.

2. Type the following to display a list of services that are running:

HDB info

If hdbesserver appears on the list, the dynamic tiering service is running. In this example, RH1 is the <sid> and 00 is the instance number:

rh1adm 13151 13107 0.0 737604 34036 \_ hdbesserver -n esRH100 -x tcpip{port=30012} -hes

3. Type exit to close the information request.

Results

● If the service is not listed, but you know the dynamic tiering host is installed, restart the service. ● If you are unsure whether the dynamic tiering host is installed, use HANA studio to verify the service is

installed and running.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 13

Page 14: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.1.2 View the Status of the Dynamic Tiering Service

Use the M_SERVICES view to display the status for the dynamic tiering service on the dynamic tiering host.

Context

On the SAP HANA dynamic tiering host, the coordinator type of the dynamic tiering service (esserver) can have one of the following statuses:

Coordinator Type Status Description

None The dynamic tiering service is running, but extended storage is not created.

Master The dynamic tiering service is running and extended storage is created.

Standby The dynamic tiering host is configured as a standby host.

Procedure

To view the coordinator type status, execute the SQL command:

SELECT * from M_SERVICES

In this example, abchana1369.corp is the dynamic tiering worker host and abchana1368.corp the standby host. The status of NONE on the worker host indicates extended storage has not been created.

HOST,PORT,SERVICE_NAME,PROCESS_ID,DETAIL,ACTIVE_STATUS,SQL_PORT,COORDINATOR_TYPE "abchana1369.corp",30012,"esserver",19453,"","YES",0,"NONE""abchana1368.corp",30013,"esserver",19456,"standby","YES",0,"STANDBY"

Once extended storage is created, the coordinator type status changes from NONE to MASTER.

HOST,PORT,SERVICE_NAME,PROCESS_ID,DETAIL,ACTIVE_STATUS,SQL_PORT,COORDINATOR_TYPE "abchana1369.corp",30012,"esserver",19453,"master","YES",0,"MASTER""abchana1368.corp",30013,"esserver",19456,"standby","YES",0,"STANDBY"

A status of MASTER indicates that the installation and configuration of SAP HANA dynamic tiering is complete and successful.

3.1.3 Stop or Restart the Dynamic Tiering Service

When the installation of SAP HANA dynamic tiering completes, the dynamic tiering service (esserver) is running. To manually stop the service for any reason, such as to change a configuration parameter, use the SAP HANA cockpit or SAP HANA studio, or execute SQL through the SQL console.

14 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 15: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Context

NoteThe SAP HANA auto-restart feature supports high availability. If an SAP HANA service is disabled by failure or intentional intervention, this auto-restart function detects the failure and restarts the stopped service process.

Stop the Dynamic Tiering Service with the SAP HANA Cockpit

Prerequisites

● You have the system privileges EXTENDED STORAGE ADMIN and SERVICE ADMIN.

Procedure

1. In the SAP HANA cockpit, click the Overall Database Status tile.2. Highlight the esserver service and click Stop Service.

3. Click Yes to confirm. A success message appears.

Stop the Dynamic Tiering Service with the SAP HANA Studio

Prerequisites

● You have the system privilege EXTENDED STORAGE ADMIN or SERVICE ADMIN.

Procedure

1. In the SAP HANA studio Administration console, right-click the database in the Systems panel, select Configuration and Monitoring Open Administration , then select the Landscape tab.

2. Right-click the dynamic tiering service (esserver) and choose the required option:

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 15

Page 16: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Option Description

Stop... The service stops normally and then typically restarts.

Kill... The service is stops immediately and then typically restarts.

Stop the Dynamic Tiering Service using SQL

Prerequisites

● You have the system privilege EXTENDED STORAGE ADMIN and SERVICE ADMIN.

Procedure

1. Open the SQL console.2. Execute the following ALTER SYSTEM STOP SERVICE statement:

ALTER SYSTEM STOP SERVICE <host_port> [IMMEDIATE [WITH COREFILE]]

NoteIf you stop the dynamic tiering service using the ALTER SYSTEM STOP SERVICE statement, no crash dump file is created.

ExampleThis example stops the service without waiting for regular shutdown:

ALTER SYSTEM STOP SERVICE 'hdb1.company1.com:30303' IMMEDIATE

For complete syntax and requirements, see the SQL Reference for SAP HANA Options section in the SAP HANA SQL and System Views Reference Guide.

Related Information

View the Status of the Dynamic Tiering Service [page 14]SAP HANA SQL and System Views Reference

16 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 17: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.1.4 Stop or Start the Dynamic Tiering Service Manually

You can stop the dynamic tiering service (esserver), and prevent the auto-restart mechanism from restarting the service. When stopped, the service can only be restarted manually.

Stop the Dynamic Tiering Service

Procedure

1. Log on to the SAP HANA dynamic tiering host as the system administrator (<sid>adm), where <sid> is the SAP HANA system ID.

2. Type:

HDB stop

The service begins to shut down. A message appears when the process is complete.

Start the Dynamic Tiering Service

Procedure

1. Log on to the SAP HANA dynamic tiering host as the system administrator (<sid>adm), where <sid> is the SAP HANA system ID.

2. Type:

HDB start

The service begins to start up. A message appears when the process is complete.

3.2 Configuring Dynamic Tiering Properties (INI Files)

INI files contain properties for configuring SAP HANA dynamic tiering.

Configuration files are separated into sections that bundle properties of the same category. Properties can be configured at different levels or layers depending on the type of system: single or multitenant database. The following layers apply to the extended storage service:

Layer Description

Default The default value for the property.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 17

Page 18: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Layer Description

System The system-specific value for the property.

If a system-specific value is not configured for a property, the default value applies.

Database Used only on multitenant database systems, this layer configures properties for tenant da­tabases.

SAP HANA systems include an additional layer, host, which does not apply to SAP HANA dynamic tiering.

In a single database system, change properties at the system layer. On a multitenant database, change properties at the individual database layer.

In this section:

Dynamic Tiering Service Properties (esserver.ini) [page 18]The esserver.ini file stores extended storage configuration properties.

Dynamic Tiering Tenant Database Properties (global.ini) [page 30]The customizable_functionalities section of the global.ini file contains parameters that allow you to enable and disable certain dynamic tiering operations in a tenant database.

Related Information

SAP HANA SQL and System Views Reference Guide

3.2.1 Dynamic Tiering Service Properties (esserver.ini)

The esserver.ini file stores extended storage configuration properties.

In a single database environment, configuration properties are changed at the system layer. In a multitenant database system, you change them at the system or database layer. Configuration properties changed at the system layer apply to all tenants unless individually overridden at the database level.

Installing dynamic tiering automatically adjusts startup section parameters to new values based on the resources available on the dynamic tiering host.

To change dynamic tiering configuration properties, you need the EXTENDED STORAGE ADMIN system privilege.

Table 1: Startup Section Properties

Name Description Min/Max Value Default Value

catalog_cache Amount of memory initially reserved for caching the dynamic tiering catalog.

0/- 32000000 bytes

checkpoint_interval Maximum interval between checkpoints. 0/- 60 minutes

18 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 19: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Name Description Min/Max Value Default Value

delta_memory_mb Amount of memory available to store delta enabled extended tables.

0/- 2048 MB

heap_memory_mb Amount of heap memory that dynamic tiering can use. A value of 0 or empty means no limit on heap memory.

0/- 1024 MB

load_memory_mb Maximum amount of memory extended storage can request from the operating system for temporary use.

0/- 2048 MB

main_cache_mb Amount of memory to be used for caching dynamic tiering database objects.

0/- 1024 MB

max_concurrent_con­nections

Maximum number of concurrent connections that the dynamic tiering service accepts.

1 – 1001 50

max_concur­rent_queries

Maximum number of concurrent queries allowed by the server.

0/- 32

num_partition_buf­fer_cache

Number of main and temp buffer cache partitions. Must be a power of 2, otherwise value rounded to the nearest power of two to a maximum of 64.

0 – 256 None. Value is de­termined at run­time based on the number of CPUs, and is not user visi­ble.

num_threads Maximum number of threads used for dynamic tiering.

4 - 4096 600

temporary_cache_mb Amount of memory to be used as cache for tempo­rary objects during dynamic tiering operations.

0/- 256

Table 2: Trace Section Properties

Name Description Min/Max Value Default Value

maxfiles Specifies the number of archives of the old message log maintained by the server. Only applies if maxfile­size is not 0.

0 – 64 (inclusive) 10

maxfilesize Limits the maximum size of the message log. 0 – 2047 (inclusive), in MB

10000000

Table 3: Zrlog Section Properties

Name Description Values Default Value

filesize_limit Create a new log file and rename the original log file when the original log file reaches specified size.

Depends on space available

0

maxfiles Specify number of request log file copies to retain. Only takes effect if filesize_limit is also specified.

Depends on space available

0

statement_type Enable request logging of operations. Separate mul­tiple values with , or +.

SQL | HOSTVARS | PLAN | PROCE­DURES | TRIGGERS | OTHER | BLOCKS | REPLACE | ALL | NONE

NONE

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 19

Page 20: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Name Description Values Default Value

tracefile Redirect request logging information to a file sepa­rate from the regular log file.

filename trace/es_requestlog_$HOST_${PORT}_${COUNT:3}.log

In this section:

Change an esserver.ini Property – Single Database [page 20]The esserver.ini file defines configuration parameters for dynamic tiering services.

Change an esserver.ini Property – Tenant Database [page 23]The esserver.ini file defines configuration parameters for dynamic tiering services. Changes can be made at the system level or to individual tenants once provisioned.

Reset an esserver.ini Property – Single Database [page 26]You can restore changed configuration parameters in the esserver.ini file to default values.

Reset an esserver.ini Property – Tenant Database [page 28]You can restore changed configuration parameters in the esserver.ini file for a tenant database to default values.

3.2.1.1 Change an esserver.ini Property – Single Database

The esserver.ini file defines configuration parameters for dynamic tiering services.

Change an esserver.ini Property in the SAP HANA Cockpit

Prerequisites

Log in as a user with EXTENDED STORAGE ADMIN and INIFILE ADMIN system privileges.

Procedure

1. Click Configure System Properties under Administration in the Overview of a single system in SAP HANA cockpit.

2. Choose esserver.ini from the Configuration File dropdown and click Go.Configuration File Contents lists all parameters in the section. Pencil icons identify parameters that allow user-defined values.

3. Click the pencil icon beside the parameter to change.

20 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 21: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

4. Enter the new value and click Save.

Next Steps

If necessary, restart the system.

Change an esserver.ini Property in the SAP HANA Studio

Prerequisites

You have either the EXTENDED STORAGE ADMIN and INIFILE ADMIN system privilege.

Context

The value configured for the system applies to the whole system, including all hosts of multi-host systems.

Procedure

1. In the SAP HANA studio Administration console, double-click the system in the Systems panel, and then choose the Configuration tab.A list of all configuration files appears.

2. Expand the esserver.ini file.All the sections of the file are listed.

3. Expand the required section.All the parameters of the section are listed. For each parameter, you can see the default value.

4. In the context menu of the configuration parameter that you want to change, choose Change...5. Enter the new value in the Change Configuration Value dialog.

Results

● If you entered a new value for a parameter at system level, it is displayed in the System column with a

green circle ( ).

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 21

Page 22: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Next Steps

If necessary, restart the system.

Change an esserver.ini Property Using SQL

Prerequisites

You have the system privilege EXTENDED STORAGE ADMIN and INIFILE ADMIN.

Procedure

1. In a SQL console, connect to the system to be modified.2. Execute the ALTER SYSTEM ALTER CONFIGURATION statement.

ALTER SYSTEM ALTER CONFIGURATION ('esserver.ini','SYSTEM') SET ('<parameter_key_value_list>') = '<parameter_key_value>' [WITH RECONFIGURE]

NoteFor complete syntax and requirements, see ALTER SYSTEM ALTER CONFIGURATION Statement [Dynamic Tiering] in the SAP HANA SQL and System Views Reference guide.

What How

Change the setting of main_cache_mb. ALTER SYSTEM ALTER CONFIGURATION ('esserver.ini','SYSTEM') SET ('startup', 'main_cache_mb')='1024'

Related Information

SAP HANA Administration GuideSAP HANA SQL and System Views Reference

22 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 23: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.2.1.2 Change an esserver.ini Property – Tenant Database

The esserver.ini file defines configuration parameters for dynamic tiering services. Changes can be made at the system level or to individual tenants once provisioned.

Change an esserver.ini Property in the SAP HANA Cockpit

Prerequisites

You have the system privileges EXTENDED STORAGE ADMIN and INIFILE ADIN.

Procedure

1. Connect to the tenant database resource.2. Open Configuration of System Properties by clicking the corresponding Administration link in the

Overview of the tenant database in SAP HANA cockpit.3. Choose esserver.ini from the Configuration File dropdown and click Go.4. In the Configuration File Contents, click the pencil icon beside the parameter to change.5. Enter the new value and click Save.

Next Steps

If necessary, restart the system.

Change an esserver.ini Property in the SAP HANA Studio

Prerequisites

Property Level Privileges Required

Tenant database ● DATABASE ADMIN● EXTENDED STORAGE ADMIN● INIFILE ADMIN

System ● EXTENDED STORAGE ADMIN● INIFILE ADMIN

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 23

Page 24: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Context

Properties changed at the system level apply to the whole system, including all hosts of multi-host systems, and become the default value for any tenant databases without a value defined at the database level. Properties changed at the database level apply to the specified tenant only, overriding the system value.

Procedure

1. In the SAP HANA studio Administration console, do one of:

Property Level to Change Select

System Double-click SYSTEMDB in the Systems panel.

Database Double-click the tenant database in the Systems panel.

2. Click the Configuration tab.A list of all configuration files appears.

3. Expand the esserver.ini file.All the sections of the file are listed.

4. Expand the required section.All the parameters of the section are listed. For each parameter, you can see the default value.

5. In the context menu of the configuration parameter that you want to change, choose Change...6. Enter the new value in the Change Configuration Value dialog.

Note

The disabled icon ( ) indicates that the property cannot be set at that level.

Results

● If you entered a new value for a parameter, it is displayed in the column with a green circle ( ).

● When connected to the SYSTEMDB, a gray rhombus ( ) appears in the Database column if the parameter can be entered at the database level. You can show information about a specific database by selecting the database from the Database filter. This is only possible in the SYSTEMDB.

● When connect to the tenant database, the value in the System column does not refer to the value defined at the system level in the SYSTEMDB and does not override that value.

Next Steps

If necessary, restart the system.

24 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 25: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Change an esserver.ini Property Using SQL

Prerequisites

You have the system privilege EXTENDED STORAGE ADMIN and INIFILE ADMIN.

Procedure

1. In a SQL console, connect to the SYSTEMDB, regardless of the level where the property is changed.2. Execute the ALTER SYSTEM ALTER CONFIGURATION statement for the desired level:

Level Syntax

System ALTER SYSTEM ALTER CONFIGURATION ('esserver.ini, 'SYSTEM') SET ('<parameter_key_value_list>' = '<parameter_key_value>' [WITH RECONFIGURE]

Database ALTER SYSTEM ALTER CONFIGURATION ('esserver.ini, 'DATABASE', '<database_name>') SET ('<parameter_key_value_list>') = '<parameter_key_value>' [WITH RECONFIGURE]

NoteFor complete syntax and requirements, see ALTER SYSTEM ALTER CONFIGURATION Statement [Dynamic Tiering] in the SAP HANA SQL and System Views Reference guide.

This example changes the setting of the main_cache_mb in the startup section.

Level How

System ALTER SYSTEM ALTER CONFIGURATION ('esserver.ini','SYSTEM') SET ('startup', 'main_cache_mb')='1024'

Database ALTER SYSTEM ALTER CONFIGURATION ('esserver.ini','DATABASE','db1') SET ('startup', 'main_cache_mb')='1024'

Related Information

SAP HANA Administration GuideSAP HANA SQL and System Views Reference

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 25

Page 26: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.2.1.3 Reset an esserver.ini Property – Single Database

You can restore changed configuration parameters in the esserver.ini file to default values.

Reset an esserver.ini Property with the SAP HANA Cockpit

Prerequisites

Log in as a user with EXTENDED STORAGE ADMIN and INIFILE ADMIN system privileges.

Procedure

1. Click Configure System Properties under Administration in the Overview of a single system in SAP HANA cockpit.

2. Choose esserver.ini from the Configuration File dropdown and click Go.Configuration File Contents lists all parameters in the section. Edit (pencil) icons identify parameters that allow user-defined values.

3. Select the edit icon for the user-defined value you wish to reset.4. Select Restore Default.

The user-defined value is cleared and the default value is re-applied.

Reset an esserver.ini Property with the SAP HANA Studio

Prerequisites

You have the system privilege EXTENDED STORAGE ADMIN or INIFILE ADMIN.

Procedure

1. In the SAP HANA studio Administration console, double-click the system in the Systems panel, and then choose the Configuration tab.A list of all configuration files appears.

2. Expand the esserver.ini file.All the sections of the configuration file are listed.

3. Expand the required section.All the parameters in the section are listed.

26 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 27: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

4. To delete a user-defined value and restore the default value, you can choose one of the following methods:

Procedure Result

Delete with automatic reset:1. In the context menu of the configuration parameter,

choose Delete.The Delete Configuration Value dialog box appears.

2. Choose the layer whose user-defined values you want to delete.

3. Choose Delete.

The SAP HANA studio clears user-defined values and re­applies default values.

NoteIf you added a new parameter to a section, Delete de­letes the parameter.

Manually restore default:1. In the context menu of the configuration parameter,

choose Change...The Change Configuration Value dialog box ap­pears.

2. For the required layers, choose Restore Default.3. Choose Save.

The SAP HANA studio clears the user-defined value and reapplies the default value.

Reset an esserver.ini Property Using SQL

Prerequisites

You have the system privilege EXTENDED STORAGE ADMIN or INIFILE ADMIN.

Procedure

1. In a SQL console, connect to the system to be modified.2. Execute the ALTER SYSTEM ALTER CONFIGURATION statement with the UNSET clause.

ALTER SYSTEM ALTER CONFIGURATION ('esserver.ini', 'SYSTEM') UNSET ('<parameter_key_value_list>') [WITH RECONFIGURE]

NoteFor complete syntax and requirements, see ALTER SYSTEM ALTER CONFIGURATION Statement [Dynamic Tiering] in the SAP HANA SQL and System Views Reference guide.

What How

Reset the main_cache_mb parameter. ALTER SYSTEM ALTER CONFIGURATION (‘esserver.ini’, ‘SYSTEM’) UNSET (‘startup’, ‘main_cache_mb’)

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 27

Page 28: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Related Information

SAP HANA SQL and System Views Reference

3.2.1.4 Reset an esserver.ini Property – Tenant Database

You can restore changed configuration parameters in the esserver.ini file for a tenant database to default values.

Prerequisites

Property Level Privileges Required

Tenant database ● DATABASE ADMIN● EXTENDED STORAGE ADMIN● INIFILE ADMIN

System ● EXTENDED STORAGE ADMIN● INIFILE ADMIN

Context

Changes to properties in the global.ini file for a tenant database are made in the SYSTEMDB, applied to the tenant database. Properties changed at the system level of the SYSTEMDB apply to the whole system, and becomes a default value for any tenant databases that do not have a value defined for the corresponding property at the database level.

Reset an esserver.ini Property in the SAP HANA Cockpit

Prerequisites

Log in as a user with EXTENDED STORAGE ADMIN and INIFILE ADMIN system privileges.

Procedure

1. Connect to the tenant database resource.

28 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 29: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

2. Click Configure System Properties under Administration in the Overview of the tenant database in SAP HANA cockpit.

3. Choose esserver.ini from the Configuration File dropdown and click Go.Configuration File Contents lists all parameters in the section. Edit (pencil) icons identify parameters that allow user-defined values.

4. Select the edit icon for the user-defined value you wish to reset.5. Select Restore Default.

The user-defined value is cleared and the default value is re-applied.

Reset an esserver.ini Property with the SAP HANA Studio

Procedure

1. In the SAP HANA studio Administration console, do one of:

Property Level to Reset Select

System level Double-click SYSTEMDB in the Systems panel.

Database Double-click the tenant database in the Systems panel.

2. Click the Configuration tab.A list of all configuration files appears.

3. Expand the esserver.ini file.All the sections of the configuration file are listed.

4. Expand the required section.All the parameters in the section are listed. You can identify parameters that have user-defined values at

system level and/or database level with a green circle ( ) and gray rhombus ( ) respectively.5. To delete a user-defined value and restore the default value, you can choose one of the following methods:

Procedure Result

Delete with automatic reset:1. In the context menu of the configuration parameter,

choose Delete.The Delete Configuration Value dialog box appears.

2. Choose the layer whose user-defined values you want to delete.

3. Choose Delete.

The SAP HANA studio clears user-defined values and re­applies default values.

NoteIf you added a new parameter to a section, Delete de­letes the parameter.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 29

Page 30: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Procedure Result

Manually restore default:1. In the context menu of the configuration parameter,

choose Change...The Change Configuration Value dialog box ap­pears.

2. For the required layers, choose Restore Default, or if you want to reset all visible layers, choose Restore Default for All.

3. Choose Save.

The SAP HANA studio clears user-defined values and re­applies the default values.

Related Information

SAP HANA SQL and System Views Reference

3.2.2 Dynamic Tiering Tenant Database Properties (global.ini)

The customizable_functionalities section of the global.ini file contains parameters that allow you to enable and disable certain dynamic tiering operations in a tenant database.

You change these properties at the system level in the SYSTEMDB, but apply them to the database layer.

Customizable_functionalities properties are enabled by default. Refer to the view M_CUSTOMIZABLE_FUNCTIONALITIES (SYS) of the SYSTEMDB to determine a feature's status.

Property Default Operation

dynamic_tiering true Changing the setting to false disables all dynamic tier­ing operations.

dynamic_tiering.create_extended_storage true Changing the setting to false disables CREATE EX­TENDED STORAGE operations.

dynamic_tiering.drop_extended_storage true Changing the setting to false disables DROP EX­TENDED STORAGE operations.

dynamic_tiering.alter_extended_storage true Changing the setting to false disables ALTER EX­TENDED STORAGE operations.

dynamic_tiering.alter_table_type true Alter table type operation to convert SAP HANA tables to extended tables or extended tables to SAP HANA tables.

dynamic_tiering.bulk_insert_optimization true Bulk insert optimization that executes large inserts into extended tables using a load statement.

dynamic_tiering.query_plan_relocation true Query relocation operation that moves data between SAP HANA and dynamic tiering for optimal query per­formance.

30 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 31: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

In this section:

Change a global.ini Property – Tenant Database [page 31]The global.ini file contains the customizable_functionalities section that allows you to enable and disable some dynamic tiering functions on a tenant database.

Reset a global.ini Property – Tenant Database [page 34]You can restore changed configuration parameters in the global.ini file for the customizable_functionalities section in a tenant database to default values.

3.2.2.1 Change a global.ini Property – Tenant Database

The global.ini file contains the customizable_functionalities section that allows you to enable and disable some dynamic tiering functions on a tenant database.

Prerequisites

Property Level Privileges Required

Tenant database ● DATABASE ADMIN● EXTENDED STORAGE ADMIN● INIFILE ADMIN

System ● EXTENDED STORAGE ADMIN● INIFILE ADMIN

Context

Change global.ini file properties for a tenant database in the SYSTEMDB and applies. Properties changed at the system level apply to the whole system, including all hosts of multi-host systems, and become the default value for any tenant databases without a value defined at the database level. Properties changed at the database level apply to the specified tenant only, overriding the system value.

Change a global.ini Property in the SAP HANA Studio

Procedure

1. In the SAP HANA studio Administration console, double-click SYSTEMDB in the Systems panel, and then choose the Configuration tab.A list of all configuration files appears.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 31

Page 32: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

2. Expand global.ini customizable_functionalities .All the parameters of the section are listed. For each parameter, you can see the default value.

3. Right-click the property that corresponds to the feature you want to disable and choose Change...4. Select the relevant tenant database(s) and enter true to enable or false to disable as the new value.

NoteIf you want to disable the feature on all tenant databases (including any that will be created in the future), enter false as the system value.

Results

● If you entered a new value for a parameter at system level, it is displayed in the System column with a

green circle ( ).

● A gray rhombus ( ) appears in the Database column if the parameter can be entered at the database level. You can show information about a specific database by selecting the database from the Database filter. This is only possible in the SYSTEMDB.

Next Steps

If necessary, restart the system.

Change a global.ini Property Using SQL

Procedure

1. In a SQL console, connect to the SYSTEMDB.2. Execute the ALTER SYSTEM ALTER CONFIGURATION statement for the appropriate layer.

Level How

System ALTER SYSTEM ALTER CONFIGURATION ('global.ini','SYSTEM') SET ('customizable_functionalities', '<parameter_name>')='<parameter_value>'

32 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 33: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Level How

Database ALTER SYSTEM ALTER CONFIGURATION ('global.ini','DATABASE','<database_name>') SET ('customizable_functionalities', '<parameter_name>')='<parameter_value>'

NoteFor complete syntax and requirements, see ALTER SYSTEM ALTER CONFIGURATION Statement [Dynamic Tiering] in the SAP HANA SQL and System Views Reference guide.

Sample CodeThis example disables the ability to drop extended storage on the tenant database db1:

ALTER SYSTEM ALTER CONFIGURATION ('global.ini','DATABASE','db1') SET ('customizable_functionalities', 'dynamic_tiering.drop_extended_storage')='false'

This example disables the ability to convert an existing HANA table to an extended store table for all tenants in the system:

ALTER SYSTEM ALTER CONFIGURATION ('global.ini','SYSTEM') SET ('customizable_functionalities', 'dynamic_tiering.alter_table_type')='false'

Related Information

SAP HANA SQL and System Views Reference

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 33

Page 34: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.2.2.2 Reset a global.ini Property – Tenant Database

You can restore changed configuration parameters in the global.ini file for the customizable_functionalities section in a tenant database to default values.

Prerequisites

Property Level Privileges Required

Tenant database ● DATABASE ADMIN● EXTENDED STORAGE ADMIN● INIFILE ADMIN

System ● EXTENDED STORAGE ADMIN● INIFILE ADMIN

Context

Changes to properties in the global.ini file for a tenant database are made in the SYSTEMDB, applied to the tenant database. Properties changed at the system level of the SYSTEMDB apply to the whole system, and becomes a default value for any tenant databases that do not have a value defined for the corresponding property at the database level. Changes applied to a tenant database override the value defined at the system level.

Reset a global.ini Property with the SAP HANA Studio

Procedure

1. In the SAP HANA studio Administration console, double-click SYSTEMDB in the Systems panel, and then choose the Configuration tab.A list of all configuration files appears.

2. Expand global.ini customizable_functionalities .All the parameters in the section are listed. You can identify parameters that have user-defined values at

system level and/or database level with a green circle ( ) and gray rhombus ( ), respectively.3. To delete a user-defined value and restore the default value, you can choose one of the following methods:

34 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 35: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Procedure Result

Delete with automatic reset:1. In the context menu of the configuration parameter,

choose Delete.The Delete Configuration Value dialog box appears.

2. Choose the layer whose user-defined values you want to delete.

3. Choose Delete.

The SAP HANA studio clears user-defined values and re­applies default values.

NoteIf you added a new parameter to a section, Delete de­letes the parameter.

Manually restore default:1. In the context menu of the configuration parameter,

choose Change...The Change Configuration Value dialog box ap­pears.

2. For the required layers, choose Restore Default, or if you want to reset all visible layers, choose Restore Default for All.

3. Choose Save.

The SAP HANA studio clears user-defined values and re­applies default values.

Related Information

SAP HANA SQL and System Views Reference

3.3 Licensing for Dynamic Tiering

Only one SAP HANA dynamic tiering license is allowed per SAP HANA system.

For dynamic tiering on a multitenant database container SAP HANA system, all tenant databases share the single license.

Dynamic tiering is licensed by the amount of data in extended storage.

3.4 Managing Extended Storage

Each SAP HANA database is associated with a single extended store.

It can contain extended tables and partitions from multistore tables. The table schema is part of the SAP HANA database catalog.

In this section:

The Delta Store [page 36]

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 35

Page 36: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

The delta store uses row-level versioning (RLV) to allow more than one user to modify the same table concurrently, eliminating waits for transaction locks.

Create Extended Storage [page 36]Create extended storage on disk for warm data to free up space in the in-memory database for hot data.

Remove Extended Storage [page 38]Deleting extended storage stops the extended storage service and removes extended storage from the topology.

3.4.1 The Delta Store

The delta store uses row-level versioning (RLV) to allow more than one user to modify the same table concurrently, eliminating waits for transaction locks.

The delta store can contain extended tables or multistore tables.

Concurrent Table Writes RLV allows concurrent, low-latency modifications to extended store and multistore tables. This means that multiple connections can modify the same table, as long as they add or modify different rows.Blocking and Locking A transaction locks a table, blocking all other connections from writing to the table while the transaction is open. RLV utilizes multi-version concurrency control (MVCC), for version management at the row level. Connections can wait for locks (on either the table or a single row), eliminating the need for retry.Hybrid Storage The delta store combines with the existing on-disk extended storage to provide a hybrid storage mechanism that combines the extreme performance and low latency of the in-memory store with the robust high performance and scalability of on-disk storage. Immediate data modifications (load table/insert/update/delete) occur within the write-optimized delta store. The delta store is periodically merged into the read-optimized extended storage through asynchronous data transfer. Thus, most data in an extended store or multistore table can be accessed via indexes, and provides expected dynamic tiering query performance.

You may create the delta store when you create extended storage, or you may alter extended storage to add a delta store later.

3.4.2 Create Extended Storage

Create extended storage on disk for warm data to free up space in the in-memory database for hot data.

Create Extended Storage with the SAP HANA Cockpit

Prerequisites

You have the system privileges EXTENDED STORAGE ADMIN and INIFILE ADIN.

36 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 37: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Procedure

1. On the System Overview in the SAP HANA cockpit, click Configure Dynamic Tiering in Dynamic Tiering Links.

2. Specify the following:

Option Description

Host Name of the host on which the dynamic tiering service is running.

NoteMake sure that the host name matches the host name that appears in the M_SERVICES view.

Size Initial size and unit of measure of extended storage. You can later increase the size by adding dbspace files in dbspaces. Initial size cannot exceed 1 TB.

Delta Create a delta dbspace in extended storage to support row-level versioning tables. The delta option supports multiple concurrent writes. The default is OFF.

3. Click Create.The elapsed time to create the extended storage depends on the size specified.

4. Perform a full backup of the SAP HANA database system. See Creating Backups in the SAP HANA Dynamic Tiering Administration Guide.

Results

A message indicates the status (success or failure) of the process. A new volume, extendedstorage, appears in the SAP HANA studio.

Create Extended Storage Using SQL

Prerequisites

You have the system privilege EXTENDED STORAGE ADMIN.

Procedure

1. Open the SQL console.2. Execute the CREATE EXTENDED STORAGE statement, which has this syntax:

CREATE EXTENDED STORAGE [ AT [LOCATION] '<host-string>' ] SIZE <size-value> {KB|MB|GB|TB} [{ENABLE|DISABLE} DELTA]

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 37

Page 38: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Make sure <host-string> is identical to the host name that appears in the M_SERVICES view.

<size-value> cannot exceed 1TB

If you omit the optional AT <host-name> clause, the system uses the first available dynamic tiering host where esserver is running in utility mode.

ExampleThis example creates 10 GB of extended storage on host test.wdf.sap.corp with row-level versioning enabled:

CREATE EXTENDED STORAGE AT 'test.wdf.sap.corp' size 10 GB ENABLE DELTA

NoteFor complete syntax and requirements, see CREATE EXTENDED STORAGE in the SQL Reference for SAP HANA Options section in the SAP HANA SQL and System Views Reference.

3. Perform a full backup of the SAP HANA database system. See Creating Backups.

Related Information

Authorization for Administration Tasks [page 9]Add a Dbspace File [page 42]Creating Backups [page 114]View the Status of the Dynamic Tiering Service [page 14]SAP HANA Administration Guide

3.4.3 Remove Extended Storage

Deleting extended storage stops the extended storage service and removes extended storage from the topology.

Remove Extended Storage in the SAP HANA Cockpit

Prerequisites

You have the system privileges EXTENDED STORAGE ADMIN and INIFILE ADIN.

38 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 39: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Context

CautionThis process deletes all data within extended storage.

Procedure

1. On the System Overview in the SAP HANA cockpit, click Configure Dynamic Tiering in Dynamic Tiering Links.

2. Click Delete.3. Choose one of the following:

Option Description

Cascade Drops the extended storage and dependent objects.

Restrict Drops the extended storage only when dependent objects do not exist. If you select Restrict and a dependent object exists, an error message appears.

4. Click to complete removal.

Remove Extended Storage Using SQL

Prerequisites

You have the system privilege EXTENDED STORAGE ADMIN.

Procedure

1. Open the SQL.2. Execute the DROP EXTENDED STORAGE statement.

DROP EXTENDED STORAGE [CASCADE | RESTRICT]

The default option, RESTRICT, returns an error if dependent objects exist.

ExampleThis example drops the storage and all associated objects:

DROP EXTENDED STORAGE [CASCADE]

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 39

Page 40: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

NoteFor complete syntax and requirements, see DROP EXTENDED STORAGE in the SQL Reference for SAP HANA Options section in the SAP HANA SQL and System Views Reference.

Related Information

Authorization for Administration Tasks [page 9]SAP HANA SQL and System Views Reference

3.5 Managing Space for Extended Storage

Extended storage is divided into units called dbspaces.

A dbspace is a logical name for a container of files or raw partitions.

In this section:

Types of Dbspaces [page 40]Dbspaces are units of extended storage that are specialized to manage specific types of data.

Add a Dbspace File [page 42]Add one or more files to a specified dbspace to allow extended storage growth. Use the SAP HANA cockpit or execute SQL through the SQL console.

Enlarge a Dbspace File [page 43]Increase the dbspace size by using some or all of the reserved size for the dbspace file. Use the SAP HANA cockpit or execute SQL through the SQL console.

Drop a Dbspace File [page 45]Drop a dbspace file that is no longer needed. Use the SAP HANA cockpit or execute SQL through the SQL console.

Dbspace File Details [page 46]The Dbspaces screen displays the options for a dbspace file.

3.5.1 Types of Dbspaces

Dbspaces are units of extended storage that are specialized to manage specific types of data.

Configuring dynamic tiering creates an ES_USER, an ES_SYSTEM, and an ES_TEMP dbspace. Enabling delta also creates an ES_DELTA dbspace.

40 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 41: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Dbspace Name Type Data Stored Files Contained by Dbspace

ES_SYSTEM MAIN Database structures including rollforward and rollback data for each committed transaction and each active check­pointed transaction, backup metadata, and database space and identity metadata.

One or more

ES_USER MAIN User data in database objects such as tables and indexes, and table metadata.

One or more

ES_DELTA RLV Real-time in-memory data from row-level versioning-ena­bled tables. An ES_DELTA dbspace supports multiple con­current writes.

One

ES_TEMP TEMPORARY Set of 1 to <n> temporary dbspace files that defines a single temporary dbspace. Sizing depends on workload, but is typi­cally 10 times the temporary cache setting.

One or more

Dbspace Sizing

Given a size X, in MB, the CREATE EXTENDED STORAGE command creates initial dbspaces in the sizes below.

Table 4: Dbspace Sizing Formula

Dbspace Formula

ES_USER size=X

ES_DELTA size=max( min(X, rlvmem) , 512 )

ES_SYSTEM size=max( 10%( ES_USER ) , 128 )

ES_TEMP size=max( 10%(ES_USER +ES_DELTA) , 16 )

See also SAP Note 2348179 – SAP HANA Dynamic Tiering Release Note .

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 41

Page 42: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.5.2 Add a Dbspace File

Add one or more files to a specified dbspace to allow extended storage growth. Use the SAP HANA cockpit or execute SQL through the SQL console.

Add a Dbspace File with the SAP HANA Cockpit

Prerequisites

You have the system privilege EXTENDED STORAGE ADMIN.

Procedure

1. On the System Overview, click Manage Dynamic Tiering Dbspaces from the Dynamic Tiering Administration Tools.

2. Choose the dbspace where you want to add a file and click Edit.3. On the Edit Dbspace screen, click the Add icon (+).4. On the New Dbspace File Dialog enter dbspace options.5. Click Create.

Results

A status message displays.

Add a Dbspace File Using SQL

Prerequisites

You have the system privilege EXTENDED STORAGE ADMIN.

Procedure

1. Open the SQL console.

42 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 43: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

2. Execute the ALTER EXTENDED STORAGE ALTER DBSPACE statement with the ADD FILE clause, specifying<dbspace_name> as ES_SYSTEM, ES_USER, or ES_TEMP:

ALTER EXTENDED STORAGE ALTER DBSPACE <dbspace_name> ADD FILE <logical_file_name> ['<file_path>'] SIZE {KB|MB|GB|TB}

ExampleThis example adds dbspace files f2 and f3 on ES_USER. File f3 has 50 MB reserved, and can be enlarged by that amount:

ALTER EXTENDED STORAGE ALTER DBSPACE dbsp1 ADD FILE f1 'f1_file' SIZE 100 MB; ALTER EXTENDED STORAGE ALTER DBSPACE ES_USER ADD FILE f2 'f2_file.db' 200 MB, FILE f3 'f3_file.dat' SIZE 100 MB RESERVE 50 MB;

NoteFor complete syntax and requirements, see ALTER EXTENDED STORAGE Statement [Dynamic Tiering] in the SQL Reference for SAP HANA Options section in the SAP HANA SQL and System Views Reference.

Related Information

Drop a Dbspace File [page 45]Enlarge a Dbspace File [page 43]Types of Dbspaces [page 40]SAP HANA SQL and System Views Reference

3.5.3 Enlarge a Dbspace File

Increase the dbspace size by using some or all of the reserved size for the dbspace file. Use the SAP HANA cockpit or execute SQL through the SQL console.

Enlarge a Dbspace File with the SAP HANA Cockpit

Prerequisites

● You have the system privilege EXTENDED STORAGE ADMIN.● The reserved size for the file is sufficient.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 43

Page 44: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Procedure

1. In the Dynamic Tiering Links on the System Overview, click Manage Dynamic Tiering Dbspaces.2. Choose the dbspace that you want to enlarge.3. Choose a file from the Dbspace Files list.4. On the Dbspace File screen, click Edit.5. Enter the Increase Size, choose units from the dropdown, and click Save.

Results

A status message displays.

Enlarge a Dbspace File Using SQL

Prerequisites

You have the system privilege EXTENDED STORAGE ADMIN.

Procedure

1. Open the SQL console.2. Execute the ALTER EXTENDED STORAGE ALTER DBSPACE statement, specifying <dbspace_name> as

ES_SYSTEM, ES_USER, or ES_TEMP:

ALTER EXTENDED STORAGE ALTER DBSPACE <dbspace_name> ALTER FILE <logical_filename> ADD <add_file_size> {KB|MB|GB|TB}

ExampleThis example adds 10 MB on to file f4 on ES_USER:

ALTER EXTENDED STORAGE ALTER DBSPACE ES_USER ALTER FILE f4 ADD 10 MB;

NoteFor complete syntax and requirements, see ALTER EXTENDED STORAGE Statement [Dynamic Tiering] in the SQL Reference for SAP HANA Options section in the SAP HANA SQL and System Views Reference.

44 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 45: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Related Information

Authorization for Administration Tasks [page 9]Add a Dbspace File [page 42]Drop a Dbspace File [page 45]Types of Dbspaces [page 40]SAP HANA SQL and System Views Reference

3.5.4 Drop a Dbspace File

Drop a dbspace file that is no longer needed. Use the SAP HANA cockpit or execute SQL through the SQL console.

Drop a Dbspace File with the SAP HANA Cockpit

Prerequisites

● You have the system privilege EXTENDED STORAGE ADMIN.● The file is empty.● You are the only user connected to extended storage.

Procedure

1. In the System Overview, click Manage Dynamic Tiering Dbspaces in the Dynamic Tiering Administration Tools.

2. Select a dbspace from the list of Dbspaces.3. In the Dbspace Files list, verify that Is Drop Allowed contains TRUE and click Edit.4. On the Edit Dbspace page, click the Delete icon (circled X).

5. On the Delete Dbspace File page, click OK.

Results

A status message displays.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 45

Page 46: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Drop a Dbspace File Using SQL

Prerequisites

You have the system privilege EXTENDED STORAGE ADMIN.

Procedure

1. Open the SQL console.2. Execute the ALTER EXTENDED STORAGE ALTER DBSPACE statement with the DROP FILE clause,

specifying The <dbspace_name> as ES_SYSTEM, ES_USER, or ES_TEMP:

ALTER EXTENDED STORAGE ALTER DBSPACE <dbspace_name> DROP FILE <logical_file_name>

ExampleThis example drops dbspace file f1 from ES_TEMP and files f2, f3, and f4 from ES_USERÖ

ALTER EXTENDED STORAGE ALTER DBSPACE ES_TEMP DROP FILE f1; ALTER EXTENDED STORAGE ALTER DBSPACE ES_USER DROP FILE f2, f3, f4;

NoteFor complete syntax and requirements, see ALTER EXTENDED STORAGE Statement [Dynamic Tiering] in the SQL Reference for SAP HANA Options section in the SAP HANA SQL and System Views Reference.

Related Information

Types of Dbspaces [page 40]Add a Dbspace File [page 42]Enlarge a Dbspace File [page 43]SAP HANA SQL and System Views Reference

3.5.5 Dbspace File Details

The Dbspaces screen displays the options for a dbspace file.

Specify the options in the New Dbspace File dialog.

46 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 47: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Option Description

Dbspace Name Name of the dbspace to which you are adding a file. You can add files to MAIN, TEMPORARY, and RLV dbspaces.

Dbspace Logical File Name

The logical file name and physical file path are required for each dbspace file and must be unique. You may add a file to a read-only dbspace, but the dbspace remains read-only.

Dbspace File Path Enter a relative path.

Raw Device Specifies a raw partition. SAP HANA dynamic tiering automatically sets size to the maximum raw partition size. Each operating system has its own format for raw device names.

Dbspace File Size Extends the size of the file. The default unit is MB. Do not specify a file size for raw devices.

Reserve Size Applies to Unix file system (UFS) files only, not raw partitions. The amount of space to reserve for increasing the dbspace file size in the future. Specify a reserve size so that you can quickly en­large dbspace files when needed.

3.6 Multistore Tables

A multistore table is a type of SAP HANA column table that can have some partitions in HANA default column storage and other partitions in a store associated with SAP HANA, such as extended storage.

Extended storage, provided by SAP HANA dynamic tiering, is the first — and currently only — additional store for multistore tables. Depending on application-specific criteria, SAP HANA partitions a column table and then distributes the partitions among the different stores.

NoteThis documentation uses the term “default storage” instead of column store or in-memory store. Tables in default storage are known as column store tables, while tables in extended storage are known as extended store tables.

You can create, modify, and remove multistore tables. You can also convert existing SAP HANA column tables to multistore tables or convert multistore tables back into column tables.

NoteYou cannot convert other SAP HANA table types such as row, virtual, and history.

Multistore data management allows flexible administration, such as:

● Moving data between extended or default storage.● Creating or dropping partitions directly in either extended or default storage.● Repartitioning a table, if new partitioning does not move data between default and extended storage.

Data modification operations let you easily change the storage type for data. For example, you can change the storage type for a partition when you import data into a table or modify the data in a multistore table during an insert operation.

In this section:

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 47

Page 48: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Data Aging Through Multistore Tables [page 48]By incorporating a multistore table in your system, you can "age out" older data using the dynamic tiering functionality of SAP HANA, but can still access and update such older, historical data, without managing two separate systems for current and older data.

Query Processing in Multistore Tables [page 49]You can use SQL SELECT statements to query all partitions regardless of storage type, including multistore tables, just as you can in any other column-partitioned table.

Multistore Table Partition Types [page 50]Multistore tables support single and multilevel partitioning.

Multistore Table Placement [page 50]Table classification and placement allows you to control of the number of level 1 partitions of tables and the distribution of tables to the hosts of a distributed SAP HANA database.

Multistore Table Supported Data Types [page 53]The supported data types of a multistore table differ slightly from those in a regular SAP HANA column store table.

Multistore Table Functional Restrictions [page 54]Some functional restrictions affect multistore tables.

Create a Multistore Table [page 57]The syntax to create a multistore table depends on whether or not you use time-selection partitioning.

Manage a Multistore Table [page 61]Use SQL statements to add, modify, remove, move, and reorganize partitions in a multistore table. You can also convert an existing SAP HANA column store table to a multistore table.

3.6.1 Data Aging Through Multistore TablesBy incorporating a multistore table in your system, you can "age out" older data using the dynamic tiering functionality of SAP HANA, but can still access and update such older, historical data, without managing two separate systems for current and older data.

While all historical data is valuable for business analytics and decision-making, you might not use such data daily. For example, you may need to keep older data primarily for auditing and compliance requirements. After a table is partitioned, you can choose which partitions experience the most frequent use, and store those partitions in default storage. You may then move data that you access less often to less expensive storage, like extended storage.

This process of data aging is primarily application-driven, with older, "cold" data moved into extended storage at your desired level of frequency (such as daily, weekly, monthly, annually, and so on), letting you move large amounts of data within a database to gain more working memory based on your specified granularity.

For tasks that require modifications to old historical data, you can reverse the process (through "anti-aging" of data) by bringing this data out from extended storage, back into default storage.

Each multistore table contains at least two partitions: one in the SAP HANA default storage and one in extended storage. When using a multistore table, the data is presented as a single table, and you can perform DML operations (such as inserting, deleting, and updating) regardless of whether the data is hot or cold.

With a time-selection partitioning scheme, it is possible to perform aging runs, to update the temperature column to age the rows from warm in default storage to cold in extended storage.

48 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 49: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Tables without the time selection property do not allow you to restrict the UPDATE statement to affect just the column store or extended store partition in a multistore table, and could result in slower performance. For tables with time selection, however, you can use the WITH RANGE RESTRICTION (CURRENT | <date>) clause to restrict the operation to partitions that are either current, or are more recent than the specified date.

The faster and preferred method of moving aging data is aging partitions, where you periodically move entire partitions to extended storage as they become old and historical in terms of their value. Such partitions could be very large, and this method could move them at close to 1 terabyte per hour.

NoteSAP HANA views data aging as the movement of large amounts of data within a database to gain more working memory. To distinguish the way data aging works specifically when using SAP HANA dynamic tiering, this documentation uses the term "time selection" to refer to the movement of older, historical data and partitions between default and extended stores.

3.6.2 Query Processing in Multistore Tables

You can use SQL SELECT statements to query all partitions regardless of storage type, including multistore tables, just as you can in any other column-partitioned table.

Multistore tables are treated as a union of column table and extended table, where the column table represents default store partitions, and the extended table represents partitions in the extended store. When a query involves multistore partitioned tables, the query optimizer determines the best plan to execute the query. If that query only accesses default store partitions, the query runs as if executed just on default store partitioned tables.

The following are supported:

The PARTITION clause You can use this clause to specify default (column) store partitions in multi­store tables; you cannot, however, specify extended store partitions.

The RANGE RESTRICTION clause You can use this clause on time-selection range-partitioned tables to restrict the scope of the SQL query by specifying a date.

SELECT for UPDATE SELECT for UPDATE is supported, but the WAIT option is not. For this reason, if a lock cannot be acquired, the SELECT for UPDATE statement fails.

Partition pruning Queries are analyzed to determine whether they match the given partitioning specification of a table, including multistore tables. If a match is found, it is possible to determine the actual partitions that hold the data being queried. Using this method, the overall load on the system can be reduced, thus im­proving the response time. For example, if a table is partitioned by year, a query restricted to the data of one year is executed only on the partition with data for this year.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 49

Page 50: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.6.3 Multistore Table Partition Types

Multistore tables support single and multilevel partitioning.

Range Partitioning

● Only range partitions are supported for single-level partitioning.● At least one range partition must reside in default storage and one range partition in extended storage.

Hash-Range and Range-Range Partitioning

● Hash-range and range-range partitions are supported for multilevel partitioning.● Hash partitions can reside only on nodes in the HANA cluster in default storage.● First-level hash or range partitions must reside in default storage.● At least one second-level range partition must reside in default storage and one in extended storage. Any

additional second-level range partitions can reside in either store.

Time-Selection Partitioning

● Range, hash-range, and range-range partitions are supported with time-selection partitioning.● The data type for the time-selection column must be NVARCHAR(8).● You cannot convert multistore tables containing time-selection partitioning to other table types (extended

storage or HANA tables).

Related Information

SAP HANA Administration Guide

3.6.4 Multistore Table Placement

Table classification and placement allows you to control of the number of level 1 partitions of tables and the distribution of tables to the hosts of a distributed SAP HANA database.

Table classification enables the table redistribution process to recognize similar or associated database tables and optimally distribute them to a common host in a distributed SAP HANA database. When tables that are regularly joined are stored on a common host, the join can be locally optimized and executed, which reduces network traffic and improves performance. Table classifications are stored in the TABLE_GROUPS table.

50 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 51: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Table classification and placement is based on a set of customizable rules, which are applied when creating or redistributing a table. In a multistore table, these rules apply only to the column store partitions.

For each table, you can specify a group type, subtype, and group name.

● CREATE TABLE:

...GROUP TYPE <identifier> | GROUP SUBTYPE <identifier> | GROUP NAME <identifier>

● ALTER TABLE:

...SET [GROUP TYPE <identifier> | GROUP SUBTYPE <identifier> | GROUP NAME <identifier> ];

ALTER TABLE:

... UNSET GROUP

See Table Placement in the SAP HANA Administration Guide for details.

Though the same base SQL syntax is used to create and alter multistore tables, some clauses are not supported for multistore tables. See CREATE TABLE Statement (Multistore Table) [Dynamic Tiering] and ALTER TABLE Statement (Multistore Table) [Dynamic Tiering] in the SQL Reference for SAP HANA Options section of the SAP HANA SQL and System Views Reference.

In this section:

Customizing Table Placement [page 51]Customize the rules used during the table redistribution process to recognize similar or associated database tables and optimally distribute them to a common host in a distributed SAP HANA database.

Multistore Table Redistribution [page 52]Table redistribution is supported on the column store partitions only of a multistore table.

Related Information

SAP HANA Administration GuideSAP HANA SQL and System Views Reference

3.6.4.1 Customizing Table Placement

Customize the rules used during the table redistribution process to recognize similar or associated database tables and optimally distribute them to a common host in a distributed SAP HANA database.

The rules are stored in the TABLE_PLACEMENT view in the _SYS_RT schema and use the following columns for specifying groups of tables or individual tables:

● SCHEMA_NAME● TABLE_NAME

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 51

Page 52: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

● GROUP_NAME● GROUP_TYPE● SUBTYPE

You need not prioritize all columns when creating and maintaining rules, but when evaluating rules, entries that are more specific take precedence over those with less. For example, a rule specifying SCHEMA_NAME and GROUP_TYPE takes precedence over a rule only specifying SCHEMA_NAME. For a more detailed overview of the priorities when evaluating the entries in the TABLE_PLACEMENT view, see SAP Note 1908082 – SAP HANA DB: Priorities of TABLE_PLACEMENT entries .

To customize table placement, execute:

ALTER SYSTEM ALTER TABLE PLACEMENT ( SCHEMA_NAME | TABLE_NAME | GROUP_NAME | GROUP_TYPE | SUB_TYPE ) { SET | UNSET } ( LOCATION => <string_literal>)

For full syntax, see the SAP HANA SQL and System Views Reference.

Related Information

SAP HANA Administration GuideSAP HANA SQL and System Views ReferenceSAP Note 1908082

3.6.4.2 Multistore Table Redistribution

Table redistribution is supported on the column store partitions only of a multistore table.

For information on table distribution and redistribution, see Redistribution of Tables in a Distributed SAP HANA System in the SAP HANA Administration Guide.

Related Information

SAP HANA Administration Guide

52 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 53: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.6.5 Multistore Table Supported Data Types

The supported data types of a multistore table differ slightly from those in a regular SAP HANA column store table.

Datatype Supported Remarks

DATE YES ● Domain and formats are compatible.● Multistore tables do not support the “” empty string as a valid

value.

TIME YES ● Domain is compatible.● Multistore tables do not support the “” empty string as a valid

value.

SECONDDATE YES ● Domain and formats are compatible.● Multistore tables do not support the “” empty string as a valid

value.

TIMESTAMP NO

TINYINT YES

SMALLINT YES

INTEGER YES

BIGINT YES

SMALLDECIMAL NO ● Domain is different.● Column store can represent values for which precision varies

from 1 to 16 and scale from -369 to 368.

DECIMAL NO ● Domain is different.● Column store precision can vary from 1 to 34 and scale can vary

from -6111 to 6176

DECIMAL(p,s) YES Multistore allows precision from 1 to 38 and scale from 0 to <p>.

REAL YES

DOUBLE YES Domains are the same for column store and multistore.

VARCHAR YES Domains are the same for column store and multistore. VAR­CHAR<n>, where <n> is from 1 to 5000.

ALPHANUM NO

SHORTTEXT NO

VARBINARY YES

BLOB YES Domain is the same for column store and multistore.

CLOB YES Domain is the same for column store and multistore.

NCLOB YES Domain is the same for column store and multistore.

TEXT NO

ARRAY NO

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 53

Page 54: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.6.6 Multistore Table Functional Restrictions

Some functional restrictions affect multistore tables.

General Multistore Table Functional Restrictions

● A multistore table contains at least two partitions: one residing in default storage and another in extended storage. Only range, range-range, and hash-range partitions are supported. The table type must be COLUMN. No other <table_type> is supported.

● User names and table names are case-insensitive in extended storage, but case-sensitive in default storage.

NoteRemember that SAP HANA schema names are treated as case-insensitive when they qualify an extended store table name. For example, creating tables named "FundPerf"."ORIG_YEAR" and "FUNDPERF"."ORIG_YEAR" returns the error SAP DBTech JDBC: [403]: internal error: Unable to create table extension in Extended Storage: [SAP][ODBC Driver]Item 'ORIG_YEAR' already exists.

● If time-selection partitioning is not used, the partition key is a prefix of the primary key. For hash-range partitioning, this only applies to the hash partition key.

● Multistore tables do not support foreign keys, asynchronous table replication, or text search.● Constraints are checked and enforced on each store, but not across stores.

In this section:

CREATE and ALTER TABLE Functional Restrictions [page 54]Some functional restrictions affect creating and altering multistore tables.

CREATE and DROP INDEX Functional Restrictions [page 56]Some functional restrictions affect creating and dropping indexes on multistore tables.

DML Functional Restrictions [page 57]Some functional restrictions affect DML operations on multistore tables.

3.6.6.1 CREATE and ALTER TABLE Functional Restrictions

Some functional restrictions affect creating and altering multistore tables.

General Functional Restrictions

You can only add, drop, or modify one column, partition, primary key, or constraint at a time in a multistore table. Multistore tables do not support adding, dropping, or modifying multiple columns at a time.

54 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 55: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Multistore tables do not support:

● Primary keys (or secondary indexes) composed of multiple columns of type NVARCHAR where at least one column has a length greater than 1765 bytes.

● Primary keys (or secondary indexes) composed of multiple columns where the total key length (sum of all column sizes) is greater than 5300 bytes.

● Columns with data type TEXT.

Unsupported Clauses

SQL statements that create or alter a multistore table do not support these clauses:

● <asynchronous_replica_clause>● <add_replica_clause>● Within <column_definition>, the following data types:

○ CURRENT_UTCDATE○ CURRENT_UTCTIME○ CURRENT_UTCTIMESTAMP

● Within <column_definition>, GENERATED ALWAYS AS and FOREIGN KEY parameters● <drop_replica_clause>● <fuzzy_search_index>● <fuzzy_search_mode>● <global_temporary_option>● <group_option>● Within <load_unit>, the PAGE LOADABLE parameter● <local_temporary_option>● Inclusion of the NO parameter <logging_option>● <move_replica_clause>● <referential_constraints_definition>● <replica_clause>● <schema_flexibility_option>● <series_clause>● <unused_retention_period_option>● <use_extended_storage_clause>

Storage Partition Functional Restrictions

This clause in the ALTER TABLE statement is supported only on extended storage partitions in a multistore table:

● <enable_delta_for_extended_storage>

These clauses in the ALTER TABLE statement are supported only on default storage partitions in a multistore table:

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 55

Page 56: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

● <delta_log_option>● <logging_option> without NO parameter● <move_clause>● <persistent_merge_option>● <reclaim_data_space_clause>● <unload_priority>

These clauses in the CREATE and ALTER TABLE statements are supported only on default storage partitions in a multistore table:

● Inclusion of the NO parameter with the <auto_merge_option>● <logging_option> without the NO parameter● <unload_priority>

Only DML statements that affect default storage partitions are allowed on tables with triggers.

You cannot use a full text or geocode index on a multistore table. If a column table already has either of these indexes, drop the index before you move the partition to extended storage.

Partition Type Functional Restrictions

For range partitions:

● Constraints are checked and enforced on each store, but unique constraints are not enforced across stores.

● If time selection is not used, the partition key is a prefix of the primary key.

For hash-range partitions:

● The hash partition resides in default storage.● If time selection is not used, the partition key is a prefix of the primary key.

For time selection partitions:

● You cannot convert multistore tables with time-selection partitioning to other kinds of tables (for example, extended tables or HANA in-memory tables).

3.6.6.2 CREATE and DROP INDEX Functional Restrictions

Some functional restrictions affect creating and dropping indexes on multistore tables.

These functional restrictions apply to multistore tables with or without time selection.

● The CREATE and DROP INDEX statements do not support the ONLINE clause on multistore tables.● You cannot create a full text or geocode index on a multistore table. If a column table already has either of

these indexes, drop the index before you move the partition to extended storage.

56 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 57: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.6.6.3 DML Functional Restrictions

Some functional restrictions affect DML operations on multistore tables.

These functional restrictions apply to multistore tables with or without time selection.

● DML statements can modify both the default store and the extended store. If there are triggers on multistore tables, DML statements are restricted to the default store partitions. Statements that modify extended storage partitions return an error.

● In a select statement partition clause, you may specify a single default store partition, a subset of default store partitions, or all default store partitions. In a partition clause that specifies extended store partitions, you must specify all extended store partitions. Specifying a subset of extended storage partitions, or a single extended storage partition, is unsupported.

● Array columns are not supported.

3.6.7 Create a Multistore Table

The syntax to create a multistore table depends on whether or not you use time-selection partitioning.

In this section:

Create a Multistore Table Without Time Selection [page 57]Create a partitioned columnar table with data that resides in multiple stores.

Create a Multistore Table With Time Selection [page 59]Create a partitioned columnar table with data that resides in multiple stores and allows the movement of data between stores based on age.

3.6.7.1 Create a Multistore Table Without Time Selection

Create a partitioned columnar table with data that resides in multiple stores.

Prerequisites

● Extended storage exists.● If creating a delta-enabled multistore table, extended storage is delta-enabled.

Context

NoteThough the same base SQL syntax is used to create and alter SAP HANA column tables, extended store tables, and multistore tables, some clauses are not supported for multistore tables. See CREATE TABLE

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 57

Page 58: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Statement (Multistore Table) [Dynamic Tiering] and ALTER TABLE Statement (Multistore Table) [Dynamic Tiering] in the SQL Reference for SAP HANA Options section of the SAP HANA SQL and System Views Reference for complete details on supported syntax.

When creating a multistore table without time-selection partitioning:

● A table can be range, range-range or hash-range partitioned.● A multistore table must have a minimum of two partitions: one residing in default storage and one residing

in extended storage.● On a multi-level partitioned table (range-range and hash-range), first-level hash or range partitions must

exist in default storage. Second-level range partitions can exist in default or extended storage.● Ensure there is no overlap when specifying partition value ranges.● Use the format YYYYMMDD, YYYY-MM-DD, or YYYY/MM/DD to define date-based, partition-value ranges.● The OTHERS partition is optional, but can only exist in default storage. If specified, it holds all rows that do

not fall within any of the defined partitions. If not specified, rows that do not fall within the defined partitions are rejected.

● The AT LOCATION clause is optional and specifies the location of the index server for default storage partitions only. If not specified, the locations are defined randomly.

● The FOR EXTENDED STORAGE ENABLE DELTA clause is optional, and enables row-level versioning only on partitions in extended storage.

● The UNIQUE CONSTRAINTS OFF clause is optional, and is not allowed at the partition level.● The WITH PARTITIONING ON ANY COLUMN ON clause is not allowed when time-selection partitioning is

not implemented.

Note● For details on creating a multistore table with time-selection partitioning, see Create a Multistore Table

With Time Selection [page 59].● For functional restrictions when creating a multistore table, see Multistore Table Functional

Restrictions [page 54].

Procedure

● To create a range-partitioned multistore table, execute:

Sample Code

CREATE COLUMN TABLE t1 (a INT, b NVARCHAR(8)) PARTITION BY RANGE(b) (USING DEFAULT STORAGE (PARTITION 10 <= VALUES < 20, PARTITION VALUE = 25, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 30 <= VALUES < 40, PARTITION 40 <= VALUES < 50)) FOR EXTENDED STORAGE ENABLE DELTA AT LOCATION ('hosta:30003', 'hostb:30003');

● To create a range-range partitioned multistore table, execute:

58 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 59: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Sample Code

CREATE COLUMN TABLE t2 (a INT, b NVARCHAR(8)) PARTITION BY RANGE(a) (PARTITION 5 <= VALUES < 10), RANGE(b) (USING DEFAULT STORAGE (PARTITION 10 <= VALUES < 20, PARTITION VALUE = 25, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 30 <= VALUES < 40, PARTITION 40 <= VALUES < 50)) FOR EXTENDED STORAGE ENABLE DELTA AT LOCATION ('hosta:30003', 'hostb:30003');

● To create a hash-range partitioned multistore table, execute:

Sample Code

CREATE COLUMN TABLE t3 (a INT, b NVARCHAR(8)) PARTITION BY HASH (a) PARTITIONS 5, RANGE (b) (USING DEFAULT STORAGE (PARTITION 10 <= VALUES < 20, PARTITION VALUE = 25, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 30 <= VALUES < 40, PARTITION 40 <= VALUES < 50)) FOR EXTENDED STORAGE ENABLE DELTA AT LOCATION ('hosta:30003', 'hostb:30003');

3.6.7.2 Create a Multistore Table With Time Selection

Create a partitioned columnar table with data that resides in multiple stores and allows the movement of data between stores based on age.

Prerequisites

● Extended storage exists.● If creating a delta-enabled multistore table, extended storage is delta-enabled.

Context

NoteThough the same base SQL syntax is used to create and alter SAP HANA column tables, extended store tables, and multistore tables, some clauses are not supported for multistore tables. See CREATE TABLE Statement (Multistore Table) [Dynamic Tiering] and ALTER TABLE Statement (Multistore Table) [Dynamic Tiering] in the SQL Reference for SAP HANA Options section of the SAP HANA SQL and System Views Reference for complete details on supported syntax.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 59

Page 60: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Unlike archiving, time-selection partitioning on a multistore table lets you keep the hot and cold data in the very same table (in separate partitions) and available for querying at any time. Though the hot data partition resides in-memory, while the cold data partition resides on-disk, queries on a multistore table automatically use all partitions, regardless of location.

When creating a multistore table with time-selection partitioning:

● A table can be range, range-range or hash-range partitioned.● A multistore table must at least two partitions: one residing in default storage and one residing in extended

storage.● On a multi-level partitioned table (range-range and hash-range), first-level hash or range partitions must

exist in default storage. Second-level range partitions can exist in default or extended storage.● The data type for the time-selection column must be NVARCHAR(8).● The partition IS CURRENT partition is required, can only exist in default storage, and must be the first

partition defined.● The WITH PARTITIONING ON ANY COLUMN ON clause is required, but must exist outside the partition

level.● Do not specify overlapping partition value ranges.● Use the format YYYYMMDD, YYYY-MM-DD, or YYYY/MM/DD to define date-based, partition-value ranges.● The OTHERS partition is optional, but can only exist in default storage. If specified, it holds all rows that do

not fall within any of the defined partitions. If not specified, rows that do not fall within the defined partitions are rejected.

● The AT LOCATION clause is optional and specifies the location of the index server for default storage partitions only. If not specified, the locations are defined randomly.

● The FOR EXTENDED STORAGE ENABLE DELTA clause is optional and enables row-level versioning only on partitions in extended storage.

● The UNIQUE CONSTRAINTS OFF clause is optional, and is not allowed at the partition level.

Note● For details on creating a multistore table without time-selection partitioning, see Create a Multistore

Table Without Time Selection [page 57].● For functional restrictions when creating a multistore table, see Multistore Table Functional

Restrictions [page 54].

Procedure

● To create a range-partitioned multistore table with time-selection partitioning, execute:

Sample Code

CREATE COLUMN TABLE ts1 (a INT, b INT, c NVARCHAR(8)) PARTITION BY RANGE (c) (USING DEFAULT STORAGE (PARTITION value = '00000000' IS CURRENT, PARTITION OTHERS, PARTITION '20150101' <= VALUES < '20160101', PARTITION '20140101' <= VALUES < '20150101') USING EXTENDED STORAGE (PARTITION '20130101' <= VALUES < '20140101', PARTITION '20120101' <= VALUES < '20130101')) FOR EXTENDED STORAGE ENABLE DELTA

60 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 61: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

WITH PARTITIONING ON ANY COLUMNS ON FOR NON CURRENT PARTITIONS UNIQUE CONSTRAINTS OFF FOR DEFAULT STORAGE NON CURRENT PARTITIONS PAGE LOADABLE AT LOCATION ('hosta:30003', 'hostb:30003';)

● To create a range-range partitioned multistore table with time-selection partitioning, execute:

Sample Code

CREATE COLUMN TABLE ts2 (a INT, b INT, c NVARCHAR(8), PRIMARY KEY (a, c)) PARTITION BY RANGE (a) (PARTITION 10 <= VALUES < 20, PARTITION 20 <= VALUES < 30), RANGE (c) (USING DEFAULT STORAGE (PARTITION value = '00000000' IS CURRENT, PARTITION OTHERS, PARTITION '20150101' <= VALUES < '20160101', PARTITION '20140101' <= VALUES < '20150101') USING EXTENDED STORAGE (PARTITION '20130101' <= VALUES < '20140101', PARTITION '20120101' <= VALUES < '20130101')) FOR EXTENDED STORAGE ENABLE DELTA WITH PARTITIONING ON ANY COLUMNS ON FOR NON CURRENT PARTITIONS UNIQUE CONSTRAINTS OFF FOR DEFAULT STORAGE NON CURRENT PARTITIONS PAGE LOADABLE AT LOCATION ('hosta:30003', 'hostb:30003');

● To create a hash-range partitioned multistore table with time-selection partitioning, execute:

Sample Code

CREATE COLUMN TABLE ts3 (a INT, b INT, c NVARCHAR(8), PRIMARY KEY (a, c)) PARTITION BY HASH (a) PARTITIONS 5, RANGE (c) (USING DEFAULT STORAGE (PARTITION value = '00000000' IS CURRENT, PARTITION OTHERS, PARTITION '20150101' <= VALUES < '20160101', PARTITION '20140101' <= VALUES < '20150101') USING EXTENDED STORAGE (PARTITION '20130101' <= VALUES < '20140101', PARTITION '20120101' <= VALUES < '20130101')) FOR EXTENDED STORAGE ENABLE DELTA WITH PARTITIONING ON ANY COLUMNS ON FOR NON CURRENT PARTITIONS UNIQUE CONSTRAINTS OFF FOR DEFAULT STORAGE NON CURRENT PARTITIONS PAGE LOADABLE AT LOCATION ('hosta:30003', 'hostb:30003');

3.6.8 Manage a Multistore Table

Use SQL statements to add, modify, remove, move, and reorganize partitions in a multistore table. You can also convert an existing SAP HANA column store table to a multistore table.

The syntax to manage columns, indexes, and the primary key on a multistore table is the same as for a HANA column store table. This includes:

● Add, drop, or modify columns● Add or drop constraints● Rename table or column● Create or drop index

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 61

Page 62: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

● Add or drop primary key

See ALTER TABLE Statement (Multistore Table) [Dynamic Tiering] in SAP HANA SQL and System Views Reference for complete syntax.

In this section:

Enable or Disable Delta on an Existing Multistore Table [page 63]You can enable or disable delta on partitions in extended storage.

Convert a Non-partitioned Column Store Table [page 64]Create a multistore table from an existing non-partitioned column store table.

Convert a Partitioned Column Store Table [page 66]Create a multistore table from an existing range, range-range, or hash-range partitioned column store table.

Convert an Extended Store Table [page 69]Create a multistore table from an existing extended table.

Convert a Multistore Table to a Partitioned Column Store Table [page 71]Create a partitioned column store table from a multistore table.

Convert a Multistore Table to a Non-Partitioned Column Store Table [page 73]Create a non-partitioned column store table from a multistore table.

Move a Partition Between Stores [page 76]Move one or more existing partition between default and extended storage as long as the partition range in the new store is the same as in the original store.

Move Part of a Partition Containing Data Between Stores [page 78]To move a part of a partition containing data between stores, isolate the data in its own partition, then move the partition to the new store.

Redefine the Range of an Existing Partition [page 80]Reorganize partitions in a multistore table by merging and splitting partitions.

Add a New Partition When PARTITION OTHERS Does Not Exist [page 82]Add a partition to either store when the OTHERS partition does not exist.

Add a New Partition When PARTITION OTHERS Exists [page 84]Use SQL statements to create, modify, move, and remove partitions on an existing multistore table.

Drop a Partition [page 87]

Related Information

SAP HANA SQL and System Views Reference Guide

62 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 63: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.6.8.1 Enable or Disable Delta on an Existing Multistore Table

You can enable or disable delta on partitions in extended storage.

Context

If enabling delta on an existing multistore table, extended storage must be delta-enabled.

Execute all syntax to manage a multistore table in a SQL console.

NoteThough the same base SQL syntax is used to create and alter SAP HANA column tables, extended store tables, and multistore tables, some clauses are not supported for multistore tables. See CREATE TABLE Statement (Multistore Table) [Dynamic Tiering] and ALTER TABLE Statement (Multistore Table) [Dynamic Tiering] in the SQL Reference for SAP HANA Options section of the SAP HANA SQL and System Views Reference for complete details on supported syntax.

Base the syntax on the following multistore table:

Sample Code

CREATE COLUMN TABLE m1 (a INT, b INT, c DATE) PARTITION BY RANGE(a) (USING DEFAULT STORAGE (PARTITION 10 <= VALUES < 20 , PARTITION VALUE = 25 , PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 30 <= VALUES < 40, PARTITION 40 <= VALUES < 100)) FOR EXTENDED STORAGE ENABLE DELTA;

Procedure

● To enable delta, execute:

Sample Code

ALTER TABLE t1 FOR EXTENDED STORAGE ENABLE DELTA;

● To disable delta, execute:

Sample Code

ALTER TABLE t1 FOR EXTENDED STORAGE DISABLE DELTA;

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 63

Page 64: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.6.8.2 Convert a Non-partitioned Column Store Table

Create a multistore table from an existing non-partitioned column store table.

Prerequisites

If the table being converted is to use time-selection partitioning, the range column requires the NVARCHAR(8) data type.

Context

Execute all syntax to manage a multistore table in a SQL console.

NoteThough the same base SQL syntax is used to create and alter SAP HANA column tables, extended store tables, and multistore tables, some clauses are not supported for multistore tables. See CREATE TABLE Statement (Multistore Table) [Dynamic Tiering] and ALTER TABLE Statement (Multistore Table) [Dynamic Tiering] in the SQL Reference for SAP HANA Options section of the SAP HANA SQL and System Views Reference for complete details on supported syntax.

Conversion is a two-step process: partition the existing table with at least two partitions, then move one partition to extended storage.

When converting a non-partitioned column store table, all requirements and functional restrictions for creating a multistore table apply. See Create a Multistore Table [page 57] .

Base the syntax on the following column store table:

Sample Code

CREATE COLUMN TABLE m2 ( a INT, b NVARCHAR(8), c INT);

Procedure

1. Partition the HANA column store table into at least two partitions, one of which includes the partition to eventually reside in extended storage.

64 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 65: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Option Description

Without time-selec­tion parti­tioning

Sample CodeRange:

ALTER TABLE m2 PARTITION BY RANGE (b) ( USING DEFAULT STORAGE ( PARTITION 10 <= VALUES < 20, PARTITION 20 <= VALUES < 30) );

Sample CodeRange-range:

ALTER TABLE m2 PARTITION BY RANGE (a) (PARTITION 5 <= values < 10 ), Range (b) ( USING DEFAULT STORAGE ( PARTITION 10 <= VALUES < 20, PARTITION 20 <= VALUES < 30) );

Sample CodeHash-range:

ALTER TABLE m2 PARTITION BY HASH (a) PARTITIONS 5, RANGE (b) ( USING DEFAULT STORAGE ( PARTITION 10 <= VALUES < 20, PARTITION 20 <= VALUES < 30 ) );

With time-selection partitioning

Sample CodeRange:

ALTER TABLE m2 PARTITION BY RANGE (b) ( USING DEFAULT STORAGE ( PARTITION value = '00000000' IS CURRENT, PARTITION '00000010' <= VALUES < '00000020', PARTITION '00000020' <= VALUES < '00000030') ) WITH PARTITIONING ON ANY COLUMNS ON;

Sample CodeRange-range:

ALTER TABLE m2 PARTITION BY RANGE (a) (PARTITION 5 <= values < 10 ), Range (b) ( USING DEFAULT STORAGE ( PARTITION value = '00000000' IS CURRENT, PARTITION '00000010' <= VALUES < '00000020', PARTITION '00000020' <= VALUES < '00000030') ) WITH PARTITIONING ON ANY COLUMNS ON;

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 65

Page 66: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Option Description

Sample CodeHash-range:

ALTER TABLE m2 PARTITION BY HASH (a) PARTITIONS 5, RANGE (b) ( USING DEFAULT STORAGE ( PARTITION value = '00000000' IS CURRENT, PARTITION '00000010' <= VALUES < '00000020', PARTITION '00000020' <= VALUES < '00000030' ) ) WITH PARTITIONING ON ANY COLUMNS ON;

2. Move at least one partition to extended storage.

Option Description

Without time-selection parti­tioning

Sample Code

ALTER TABLE m2 ALTER PARTITION (b) USING EXTENDED STORAGE ( 20 <= VALUES < 30 );

With time-selection partition­ing

Sample Code

ALTER TABLE m2 ALTER PARTITION (b) USING EXTENDED STORAGE ( '00000020' <= VALUES < '00000030' );

Results

The converted table contains two partitions: one in default storage and one in extended storage.

3.6.8.3 Convert a Partitioned Column Store Table

Create a multistore table from an existing range, range-range, or hash-range partitioned column store table.

Prerequisites

● The existing column store table is not using round robin-range partitioning.● If the table being converted is to use time-selection partitioning, the range column requires a

NVARCHAR(8) data type.

66 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 67: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Context

Execute all syntax to manage a multistore table in a SQL console.

NoteThough the same base SQL syntax is used to create and alter SAP HANA column tables, extended store tables, and multistore tables, some clauses are not supported for multistore tables. See CREATE TABLE Statement (Multistore Table) [Dynamic Tiering] and ALTER TABLE Statement (Multistore Table) [Dynamic Tiering] in the SQL Reference for SAP HANA Options section of the SAP HANA SQL and System Views Reference for complete details on supported syntax.

Converting an existing range, range-range, or hash-range partitioned column store table is a one- or two-step process, depending on whether the converted table is to use time-selection partitioning, and whether the partition to reside in extended storage already exists in the column store table.

When converting a partitioned column store table, all requirements and functional restrictions for creating a multistore table apply. See Create a Multistore Table [page 57].

Base the syntax on the following column store tables:

Table Type Syntax

RangeSample Code

CREATE COLUMN TABLE m3 ( a INT, b NVARCHAR(8)) PARTITION BY RANGE (b) ( PARTITION 00000010 <= VALUES < 00000020);

Range-rangeSample Code

CREATE COLUMN TABLE m3 ( a INT, b NVARCHAR(8)) PARTITION BY RANGE (a) ( PARTITION 00000005 <= VALUES < 00000010), RANGE (b) ( PARTITION 00000010 <= VALUES < 00000020);

Hash-rangeSample Code

CREATE COLUMN TABLE m3 ( a INT, b NVARCHAR(8)) PARTITION BY HASH (a) PARTITIONS 5, RANGE (b) ( PARTITION 00000010 <= VALUES < 00000020);

Procedure

1. If the partition range being moved to extended storage does not yet exist, perform one of these options:

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 67

Page 68: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Option Description

Isolate the partition for ex­tended storage without time-se­lection partitioning

Sample Code

ALTER TABLE m3 PARTITION BY RANGE (b) ( USING DEFAULT STORAGE ( PARTITION 10 <= VALUES < 15, PARTITION 15 <= VALUES < 20, PARTITION 20 <= VALUES < 30 ) );

Isolate the range for extended storage and add time-selection partitioning

Sample Code

ALTER TABLE m3 PARTITION BY RANGE (b) ( USING DEFAULT STORAGE ( PARTITION value = '00000000' IS CURRENT, PARTITION '00000010' <= VALUES < '00000015', PARTITION '00000015' <= VALUES < '00000020', PARTITION '00000020' <= VALUES < '00000030' ) ) WITH PARTITIONING ON ANY COLUMNS ON;

2. Move the range partition to extended storage:

Option Description

Without time-selection parti­tioning

Sample Code

ALTER TABLE m3 ALTER PARTITION (b) USING EXTENDED STORAGE ( 20 <= VALUES < 30 );

With time-selection partition­ing

Sample Code

ALTER TABLE m3 ALTER PARTITION (b) USING EXTENDED STORAGE ( '00000020' <= VALUES < '00000030' );

Results

The converted table has one partition in default storage and one partition in extended storage.

68 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 69: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.6.8.4 Convert an Extended Store Table

Create a multistore table from an existing extended table.

Context

Execute all syntax to manage a multistore table in a SQL console.

NoteThough the same base SQL syntax is used to create and alter SAP HANA column tables, extended store tables, and multistore tables, some clauses are not supported for multistore tables. See CREATE TABLE Statement (Multistore Table) [Dynamic Tiering] and ALTER TABLE Statement (Multistore Table) [Dynamic Tiering] in the SQL Reference for SAP HANA Options section of the SAP HANA SQL and System Views Reference for complete details on supported syntax.

Converting an extended store table to a multistore table is a three-step process. You first convert the extended store table to a column store table, then partition it, and finally, move a partition to extended storage.

When converting an extended table, all requirements and functional restrictions for creating a multistore table apply. See Create a Multistore Table [page 57].

Base the syntax on the following extended storage table:

Sample Code

CREATE COLUMN TABLE m4 (A INT, B NVARCHAR(8)) USING EXTENDED STORAGE ENABLE DELTA;

Procedure

1. Convert the extended store table to a column store table:

Sample Code

ALTER TABLE m4 NOT USING EXTENDED STORAGE;

2. Partition the column store table within default storage, including the partition to be moved:

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 69

Page 70: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Option Description

Without time-selec­tion parti­tioning

Sample CodeRange:

ALTER TABLE m4 PARTITION BY RANGE (b) ( USING DEFAULT STORAGE ( PARTITION 10 <= VALUES < 20, PARTITION 20 <= VALUES < 30) );

Sample CodeRange-range:

ALTER TABLE m4 PARTITION BY RANGE (a) (PARTITION 5 <= values < 10 ), Range (b) ( USING DEFAULT STORAGE ( PARTITION 10 <= VALUES < 20, PARTITION 20 <= VALUES < 30) );

Sample CodeHash-range:

ALTER TABLE m4 PARTITION BY HASH (a) PARTITIONS 5, RANGE (b) ( USING DEFAULT STORAGE ( PARTITION 10 <= VALUES < 20, PARTITION 20 <= VALUES < 30 ) );

With time-selection partitioning

Sample CodeRange:

ALTER TABLE m4 PARTITION BY RANGE (b) ( USING DEFAULT STORAGE ( PARTITION value = '00000000' IS CURRENT, PARTITION '00000010' <= VALUES < '00000020', PARTITION '00000020' <= VALUES < '00000030') ) WITH PARTITIONING ON ANY COLUMNS ON;

Sample CodeRange-range:

ALTER TABLE m4 PARTITION BY RANGE (a) (PARTITION 5 <= values < 10 ), Range (b) ( USING DEFAULT STORAGE ( PARTITION value = '00000000' IS CURRENT, PARTITION '00000010' <= VALUES < '00000020', PARTITION '00000020' <= VALUES < '00000030') ) WITH PARTITIONING ON ANY COLUMNS ON;

70 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 71: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Option Description

Sample CodeHash-range:

ALTER TABLE m4 PARTITION BY HASH (a) PARTITIONS 5, RANGE (b) ( USING DEFAULT STORAGE ( PARTITION value = '00000000' IS CURRENT, PARTITION '00000010' <= VALUES < '00000020', PARTITION '00000020' <= VALUES < '00000030' ) ) WITH PARTITIONING ON ANY COLUMNS ON;

3. Move the applicable partition to extended storage:

Option Description

Without time-selection parti­tioning

Sample Code

ALTER TABLE m4 ALTER PARTITION (b) USING EXTENDED STORAGE ( 20 <= VALUES < 30 );

With time-selection partition­ing

Sample Code

ALTER TABLE m4 ALTER PARTITION (b) USING EXTENDED STORAGE ( '00000020' <= VALUES < '00000030' );

Results

The original extended storage table is now a multistore table, with one partition in default storage (2010-01-01 to 2011-01-01) and one partition in extended storage (2011-01-01 to 2012-01-01).

3.6.8.5 Convert a Multistore Table to a Partitioned Column Store Table

Create a partitioned column store table from a multistore table.

Context

Execute all syntax to manage a multistore table in a SQL console.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 71

Page 72: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

NoteThough the same base SQL syntax is used to create and alter SAP HANA column tables, extended store tables, and multistore tables, some clauses are not supported for multistore tables. See CREATE TABLE Statement (Multistore Table) [Dynamic Tiering] and ALTER TABLE Statement (Multistore Table) [Dynamic Tiering] in the SQL Reference for SAP HANA Options section of the SAP HANA SQL and System Views Reference for complete details on supported syntax.

A multistore table becomes a partitioned column store table when all extended storage partitions are removed. To preserve the data in the extended storage partitions, move them to default storage. To delete the data, drop the extended storage partitions. When moving partitions, the partition range in the new store must match the range in the original store.

RestrictionA multistore table using time selection cannot be converted.

Base the syntax on the following multistore tables:

Table Type Syntax

RangeSample Code

CREATE COLUMN TABLE m5 (a INT, b NVARCHAR(8)) PARTITION BY RANGE(b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050));

Range-rangeSample Code

CREATE COLUMN TABLE m5 ( a INT, b NVARCHAR(8)) PARTITION BY RANGE (a) ( PARTITION 00000005 <= VALUES < 00000010), RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050))

72 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 73: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Table Type Syntax

Hash-rangeSample Code

CREATE COLUMN TABLE m5 ( a INT, b NVARCHAR(8)) PARTITION BY HASH (a) PARTITIONS 5, RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050))

Procedure

● To keep the data in the partition, move the extended storage partitions:

Sample Code

ALTER TABLE m5 ALTER PARTITION (b) USING DEFAULT STORAGE ( 00000030 <= VALUES < 00000040 );

The original multistore table is now a column store table with two range partitions (10 - 20) and (30 - 40). The range partition 30 - 40 contains the data from the original extended storage partition.

● To delete all data in the partition, remove the extended storage partitions:

Sample Code

ALTER TABLE m5 DROP PARTITION (b) 00000030 <= VALUES < 00000040;

The column store table contains only one partition (10 - 20), and the data from the original extended storage partition has been deleted.

3.6.8.6 Convert a Multistore Table to a Non-Partitioned Column Store Table

Create a non-partitioned column store table from a multistore table.

Context

Execute all syntax to manage a multistore table in a SQL console.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 73

Page 74: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

NoteThough the same base SQL syntax is used to create and alter SAP HANA column tables, extended store tables, and multistore tables, some clauses are not supported for multistore tables. See CREATE TABLE Statement (Multistore Table) [Dynamic Tiering] and ALTER TABLE Statement (Multistore Table) [Dynamic Tiering] in the SQL Reference for SAP HANA Options section of the SAP HANA SQL and System Views Reference for complete details on supported syntax.

A multistore table becomes a non-partitioned column store table when all extended and default storage partitions are removed. To preserve the data in the extended storage partitions, move them to default storage. To delete the data, drop the extended storage partitions without moving. When moving partitions, the partition range in the new store must match the range in the original store.

RestrictionA multistore table using time selection cannot be converted.

Base the syntax on the following multistore tables:

Table Type Syntax

RangeSample Code

CREATE COLUMN TABLE m6 (a INT, b NVARCHAR(8)) PARTITION BY RANGE(b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050));

Range-rangeSample Code

CREATE COLUMN TABLE m6 ( a INT, b NVARCHAR(8)) PARTITION BY RANGE (a) ( PARTITION 00000005 <= VALUES < 00000010), RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050))

74 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 75: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Table Type Syntax

Hash-rangeSample Code

CREATE COLUMN TABLE m6 ( a INT, b NVARCHAR(8)) PARTITION BY HASH (a) PARTITIONS 5, RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050))

Procedure

1. Move or remove the extended storage partitions:

Option Description

Keep the data in the partition Sample Code

ALTER TABLE m6 ALTER PARTITION (a) USING DEFAULT STORAGE ( 30 <= VALUES < 40 );

Delete all data in the partition Sample Code

ALTER TABLE m6 DROP PARTITION (a) 30 <= VALUES < 40;

2. Merge all remaining partitions:

Sample Code

ALTER TABLE m6 MERGE PARTITIONS

Results

The multistore table is now a column store table with no partitions. If the extended storage partition was dropped rather than moved, the extended storage data no longer exists. Otherwise, the extended store data now resides in the column store table.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 75

Page 76: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.6.8.7 Move a Partition Between Stores

Move one or more existing partition between default and extended storage as long as the partition range in the new store is the same as in the original store.

Context

Execute all syntax to manage a multistore table in a SQL console.

NoteThough the same base SQL syntax is used to create and alter SAP HANA column tables, extended store tables, and multistore tables, some clauses are not supported for multistore tables. See CREATE TABLE Statement (Multistore Table) [Dynamic Tiering] and ALTER TABLE Statement (Multistore Table) [Dynamic Tiering] in the SQL Reference for SAP HANA Options section of the SAP HANA SQL and System Views Reference for complete details on supported syntax.

Moving the last partition in extended storage to default storage converts the multistore table to a partitioned column store table. You cannot move the last default storage partition, the OTHERS, or the IS CURRENT partitions to extended storage.

The <move_clause> parameter is only supported on column store partitions to move partitions to another index server location in a distributed environment, not to move partitions between stores.

Base the syntax on the following multistore tables:

Table Type Syntax

RangeSample Code

CREATE COLUMN TABLE m7 (a INT, b NVARCHAR(8)) PARTITION BY RANGE(b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050));

76 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 77: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Table Type Syntax

Range-rangeSample Code

CREATE COLUMN TABLE m7 ( a INT, b NVARCHAR(8)) PARTITION BY RANGE (a) ( PARTITION 00000005 <= VALUES < 00000010), RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050))

Hash-rangeSample Code

CREATE COLUMN TABLE m7 ( a INT, b NVARCHAR(8)) PARTITION BY HASH (a) PARTITIONS 5, RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050))

NoteThe following syntax also applies to multistore tables with time-selection partitioning.

Do not move a partition between stores if the range does not exist in the originating store:

Sample Code

ALTER TABLE m7 ALTER PARTITION (b) USING EXTENDED STORAGE ( 00000025 <= VALUES < 00000030 );

Procedure

1. To move a partition from default storage to extended storage:

Sample Code

ALTER TABLE m7 ALTER PARTITION (b) USING EXTENDED STORAGE ( 00000010 <= VALUES < 00000020 );

2. To move a partition from extended storage to default storage:

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 77

Page 78: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Sample Code

ALTER TABLE m7 ALTER PARTITION (b) USING DEFAULT STORAGE ( 00000040 <= VALUES < 00000050 );

Results

The partition (10 - 20) now resides in extended storage and the partition (40 - 100) resides in default storage.

3.6.8.8 Move Part of a Partition Containing Data Between Stores

To move a part of a partition containing data between stores, isolate the data in its own partition, then move the partition to the new store.

Context

Execute all syntax to manage a multistore table in a SQL console.

NoteThough the same base SQL syntax is used to create and alter SAP HANA column tables, extended store tables, and multistore tables, some clauses are not supported for multistore tables. See CREATE TABLE Statement (Multistore Table) [Dynamic Tiering] and ALTER TABLE Statement (Multistore Table) [Dynamic Tiering] in the SQL Reference for SAP HANA Options section of the SAP HANA SQL and System Views Reference for complete details on supported syntax.

Moving part of a partition is a two-part process. First, you split the partition to isolate the data being moved, then move the isolated partition to the new store.

You cannot move the last default storage partition, the OTHERS, or the IS CURRENT partitions to extended storage.

The <move_clause> parameter is only supported on column store partitions to move partitions to another index server location in a distributed environment, not to move partitions between stores.

Base the syntax on the following multistore tables:

78 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 79: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Table Type Syntax

RangeSample Code

CREATE COLUMN TABLE m8 (a INT, b NVARCHAR(8)) PARTITION BY RANGE(b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050));

Range-rangeSample Code

CREATE COLUMN TABLE m8 ( a INT, b NVARCHAR(8)) PARTITION BY RANGE (a) ( PARTITION 00000005 <= VALUES < 00000010), RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050))

Hash-rangeSample Code

CREATE COLUMN TABLE m8 ( a INT, b NVARCHAR(8)) PARTITION BY HASH (a) PARTITIONS 5, RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050))

NoteThe following syntax also applies to multistore tables with time-selection partitioning.

Procedure

1. Alter the partition to isolate the range being moved:

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 79

Page 80: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Sample Code

ALTER TABLE m8 PARTITION BY RANGE (b) ( USING DEFAULT STORAGE ( PARTITION 00000010 <= VALUES < 00000012 , PARTITION 00000012 <= VALUES < 00000020, PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE ( PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050 ) );

2. Move the isolated partition to the new store:

Sample Code

ALTER TABLE m8 ALTER PARTITION (b) USING EXTENDED STORAGE ( 00000010 <= VALUES < 00000012 );

Results

The isolated partition (10 - 20) now resides in extended storage.

3.6.8.9 Redefine the Range of an Existing Partition

Reorganize partitions in a multistore table by merging and splitting partitions.

Context

Execute all syntax to manage a multistore table in a SQL console.

NoteThough the same base SQL syntax is used to create and alter SAP HANA column tables, extended store tables, and multistore tables, some clauses are not supported for multistore tables. See CREATE TABLE Statement (Multistore Table) [Dynamic Tiering] and ALTER TABLE Statement (Multistore Table) [Dynamic Tiering] in the SQL Reference for SAP HANA Options section of the SAP HANA SQL and System Views Reference for complete details on supported syntax.

To make sure data does not move between stores when merging and splitting partitions, specify all partitions in both stores, even if the change only applies to one partition in one store. To move data, see Move a Partition Between Stores [page 76] and Move Part of a Partition Containing Data Between Stores [page 78].

Base the syntax on the following multistore tables:

80 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 81: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Table Type Syntax

RangeSample Code

CREATE COLUMN TABLE m9 (a INT, b NVARCHAR(8)) PARTITION BY RANGE(b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050));

Range-rangeSample Code

CREATE COLUMN TABLE m9 ( a INT, b NVARCHAR(8)) PARTITION BY RANGE (a) ( PARTITION 00000005 <= VALUES < 00000010), RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050))

Hash-rangeSample Code

CREATE COLUMN TABLE m9 ( a INT, b NVARCHAR(8)) PARTITION BY HASH (a) PARTITIONS 5, RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050))

NoteThe following syntax also applies to multistore tables with time-selection partitioning.

Procedure

1. Split an existing default storage partition into two partitions:

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 81

Page 82: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Sample Code

ALTER TABLE m9 PARTITION BY RANGE (b) ( USING DEFAULT STORAGE ( PARTITION 00000010 <= VALUES < 00000015 , PARTITION 00000015 <= VALUES < 00000020, PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE ( PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050) );

2. Merge two existing extended storage partitions:

Sample Code

ALTER TABLE m9 PARTITION BY RANGE (b) ( USING DEFAULT STORAGE ( PARTITION 00000010 <= VALUES < 00000015 , PARTITION 00000015 <= VALUES < 00000020, PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE ( PARTITION 00000030 <= VALUES < 00000050 ) );

Results

After performing the split and merge, the multistore table has two default storage partitions (10 - 15 and 15 - 20) and one extended storage partition (20 - 100).

3.6.8.10 Add a New Partition When PARTITION OTHERS Does Not Exist

Add a partition to either store when the OTHERS partition does not exist.

Context

Execute all syntax to manage a multistore table in a SQL console.

NoteThough the same base SQL syntax is used to create and alter SAP HANA column tables, extended store tables, and multistore tables, some clauses are not supported for multistore tables. See CREATE TABLE Statement (Multistore Table) [Dynamic Tiering] and ALTER TABLE Statement (Multistore Table) [Dynamic Tiering] in the SQL Reference for SAP HANA Options section of the SAP HANA SQL and System Views Reference for complete details on supported syntax.

The process to add a new partition depends on whether the OTHERS partition exists. You can add a new partition to either store as long as the new partition does not overlap any existing partitions. If the OTHERS

82 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 83: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

partition does not exist, you can add the new partition directly to the desired store. You cannot add two partitions using a single statement. Each new partition requires its own statement.

To add new partitions when the OTHERS partition exists, see Add a New Partition When PARTITION OTHERS Exists [page 84].

Base the syntax on the following multistore tables:

Table Type Syntax

RangeSample Code

CREATE COLUMN TABLE m10 (a INT, b NVARCHAR(8)) PARTITION BY RANGE(b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050) );

Range-rangeSample Code

CREATE COLUMN TABLE m10 ( a INT, b NVARCHAR(8)) PARTITION BY RANGE (a) ( PARTITION 00000005 <= VALUES < 00000010), RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050) );

Hash-rangeSample Code

CREATE COLUMN TABLE m10 ( a INT, b NVARCHAR(8)) PARTITION BY HASH (a) PARTITIONS 5, RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050) )

Procedure

Add a new partition:

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 83

Page 84: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Option Description

Add time-selection parti­tioning

Sample Code

ALTER TABLE m10 PARTITION BY RANGE (b) (USING DEFAULT STORAGE (PARTITION value = '00000000' IS CURRENT, PARTITION '00000010' <= VALUES < '00000020' , PARTITION '00000020' <= VALUES < '00000030') USING EXTENDED STORAGE (PARTITION '00000030' <= VALUES < '00000040', PARTITION '00000040' <= VALUES < '00000050')) WITH PARTITIONING ON ANY COLUMNS ON;

Add partition to default storage

Sample Code

ALTER TABLE m10 ADD PARTITION (b) USING DEFAULT STORAGE (00000005 <= VALUES < 00000010);

Add partition to extended storage

Sample Code

ALTER TABLE m10 ADD PARTITION (b) USING EXTENDED STORAGE (00000050 <= VALUES < 00000060 );

Add OTHERS partition Sample Code

ALTER TABLE m10 ADD PARTITION (b) OTHERS;

3.6.8.11 Add a New Partition When PARTITION OTHERS Exists

Use SQL statements to create, modify, move, and remove partitions on an existing multistore table.

Context

Execute all syntax to manage a multistore table in a SQL console.

NoteThough the same base SQL syntax is used to create and alter SAP HANA column tables, extended store tables, and multistore tables, some clauses are not supported for multistore tables. See CREATE TABLE Statement (Multistore Table) [Dynamic Tiering] and ALTER TABLE Statement (Multistore Table) [Dynamic

84 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 85: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Tiering] in the SQL Reference for SAP HANA Options section of the SAP HANA SQL and System Views Reference for complete details on supported syntax.

The process to add new partitions depends on whether the OTHERS partition exists. You can add a new partition to either store as long as the new partition does not overlap any existing partitions. Since the OTHERS partition contains values for any range not explicitly defined by the existing partitions, adding any new partition would automatically overlap the OTHERS partition. Therefore, to add new partition, you redefine the existing partitions to explicitly include the new partition range. You then move the redefined partition to extended storage, as needed.

To add new partitions when the OTHERS partition does not exist, see Add a New Partition When PARTITION OTHERS Does Not Exist [page 82].

Base the syntax on the following multistore tables:

Table Type Syntax

RangeSample Code

CREATE COLUMN TABLE m11 (a INT, b NVARCHAR(8)) PARTITION BY RANGE(b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050) );

Range-rangeSample Code

CREATE COLUMN TABLE m11 ( a INT, b NVARCHAR(8)) PARTITION BY RANGE (a) ( PARTITION 00000005 <= VALUES < 00000010), RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050) );

Hash-rangeSample Code

CREATE COLUMN TABLE m11 ( a INT, b NVARCHAR(8)) PARTITION BY HASH (a) PARTITIONS 5, RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050) )

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 85

Page 86: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Procedure

Split the exiting partitions to include the new partition:

Option Description

Add partition to default storage

Sample Code

ALTER TABLE m11 PARTITION BY RANGE (b) ( USING DEFAULT STORAGE ( PARTITION 00000005 <= VALUES < 00000010, PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050) );

Add partition to extended stor­age

1. Add the partition to default storage first:

Sample Code

ALTER TABLE m11 PARTITION BY RANGE (b) ( USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION 00000050 <= VALUES < 00000060, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050 ) );

2. Move the partition to extended storage:

Sample Code

ALTER TABLE m11 ALTER PARTITION (b) USING EXTENDED STORAGE ( 00000050 <= VALUES < 00000060 );

Add time-selec­tion partitioning

Sample Code

ALTER TABLE m11 PARTITION BY RANGE (b) (USING DEFAULT STORAGE ( PARTITION value = '00000000' IS CURRENT, PARTITION '00000010' <= VALUES < '00000020' , PARTITION '00000020' <= VALUES < '00000030', PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION '00000030' <= VALUES < '00000040', PARTITION '00000040' <= VALUES < '00000050') ) WITH PARTITIONING ON ANY COLUMNS ON

86 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 87: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.6.8.12 Drop a Partition

Context

Execute all syntax to manage a multistore table in a SQL console.

NoteThough the same base SQL syntax is used to create and alter SAP HANA column tables, extended store tables, and multistore tables, some clauses are not supported for multistore tables. See CREATE TABLE Statement (Multistore Table) [Dynamic Tiering] and ALTER TABLE Statement (Multistore Table) [Dynamic Tiering] in the SQL Reference for SAP HANA Options section of the SAP HANA SQL and System Views Reference for complete details on supported syntax.

All data in dropped partitions is deleted. If you drop the last extended storage partition, the multistore table becomes a partitioned column store table.

You cannot drop the following:

● The last default storage partition if partitions still exist in extended storage.● The second to last default storage partition, if time-selection partitioning exists.● The IS CURRENT or OTHERS partitions.

Base the syntax on the following multistore tables:

Table Type Syntax

RangeSample Code

CREATE COLUMN TABLE m12 (a INT, b NVARCHAR(8)) PARTITION BY RANGE(b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050) );

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 87

Page 88: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Table Type Syntax

Range-rangeSample Code

CREATE COLUMN TABLE m12 ( a INT, b NVARCHAR(8)) PARTITION BY RANGE (a) ( PARTITION 00000005 <= VALUES < 00000010), RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050) );

Hash-rangeSample Code

CREATE COLUMN TABLE m12 ( a INT, b NVARCHAR(8)) PARTITION BY HASH (a) PARTITIONS 5, RANGE (b) (USING DEFAULT STORAGE (PARTITION 00000010 <= VALUES < 00000020 , PARTITION 00000020 <= VALUES < 00000030, PARTITION OTHERS) USING EXTENDED STORAGE (PARTITION 00000030 <= VALUES < 00000040, PARTITION 00000040 <= VALUES < 00000050) )

Procedure

Drop a partition:

Sample Code

ALTER TABLE m12 DROP PARTITION (b) 20 <= VALUES < 30

3.7 Extended Store Tables

Extended tables reside in extended storage in dynamic tiering.

You can create, modify, and remove extended store tables. You can also convert existing SAP HANA tables and multistore tables to extended store tables or vice versa.

In this section:

Extended Store Table Functional Restrictions [page 89]

88 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 89: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Some functional restrictions affect extended store tables.

Extended Store Table Supported Data Types [page 90]The supported data types of an extended store table differ slightly from a regular SAP HANA column store table.

Choose Column Tables for Dynamic Tiering [page 91]Monitor table operations to identify where you can improve performance and reduce memory utilization. Large in-memory tables that are accessed infrequently are good candidates for the SAP HANA dynamic tiering option. Note that tables moved into dynamic tiering disappear from table analysis displays.

Convert HANA Tables to Extended Store Tables Using the SAP HANA Cockpit [page 92]To move data to warm storage, convert appropriate column tables into extended store tables.

Manage Extended Store Tables Using SQL [page 93]Use SQL statements to create, modify, and remove extended store tables in dynamic tiering, and convert existing HANA tables to extended store tables or vice versa.

Manage Extended Tables in the SAP HANA Studio [page 95]Use the SAP HANA studio graphical interface to create, alter, convert, and drop extended tables.

3.7.1 Extended Store Table Functional Restrictions

Some functional restrictions affect extended store tables.

Extended store tables do not support triggers and may not be partitioned.

Before you can drop a schema, you must drop all extended store tables.

User names and table names are case-insensitive in extended storage, but case-sensitive in SAP HANA memory store. Remember that SAP HANA schema names are treated as case-insensitive when they qualify an extended store table name. For example, creating tables named "FundPerf"."ORIG_YEAR" and "FUNDPERF"."ORIG_YEAR" returns the error SAP DBTech JDBC: [403]: internal error: Unable to create table extension in Extended Storage: [SAP][ODBC Driver]Item 'ORIG_YEAR' already exists.

Extended tables do not support:

● Primary keys (or secondary indexes) composed of multiple columns where the total key length (sum of all column sizes) is not greater than 5300 bytes.

● Primary keys (or secondary indexes) composed of multiple columns of type NVARCHAR or NCHAR where at least one column has a length greater than 1765 bytes.

● Columns with data type TEXT.

SQL statements that create or alter SAP HANA extended tables do not support these clauses:

● <fuzzy_search_index>● <fuzzy_search_mode>● <schema_flexibility_option>● <persistent_merge_option>● <delta_log_option>● <trigger_option>

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 89

Page 90: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

● <referential_constraints_definition>● Within <column_definition>, GENERATED ALWAYS AS and FOREIGN KEY parameters● Within <column_definition>, the following data types and functions are not supported:

○ CURRENT_UTCDATE○ CURRENT_UTCTIME○ CURRENT_UTCTIMESTAMP

● Within <using_extended_storage_clause>, ENABLE | DISABLE DELTA if the table being converted to extended store table is a CLOB, BLOB, or NCLOB data type

3.7.2 Extended Store Table Supported Data Types

The supported data types of an extended store table differ slightly from a regular SAP HANA column store table.

Datatype Supported Remarks

DATE YES Domain and formats are compatible.

NoteNOTE: Extended store tables do not support the “” empty string as a valid value.

TIME YES* ● Domain is compatible.● *Extended store tables do not support format HH12:MI[:SS]

[AM|PM]

SECONDDATE YES Domain and formats are compatible.

TIMESTAMP YES* ● *Domain is not compatible.● Column store tables support 7-digit fractions for a second.● Extended store tables support 6-digits fractions for second.

TINYINT YES

SMALLINT YES

INTEGER YES

BIGINT YES

SMALLDECIMAL YES* ● The domain is different.● Extended store tables treat SMALLDECIMAL as fixed precision

DECIMAL(32,16).● Column store tables can represent values for which precision

varies from 1-16 and scale from -369 to 368.

DECIMAL YES* ● Domain is different.● Extended store tables map to precision = 68 and scale = 34.● Column store table precision can vary from 1-34 and scale can

vary from -6111 to 6176

90 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 91: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Datatype Supported Remarks

DECIMAL(p,s) YES Extended store tables allow precision from 1 to 38 and scale from 0 to p.

REAL YES

DOUBLE YES Domains are same for column store and extended store tables.

VARCHAR YES Domains are same for column store and extended store tables. VAR­CHAR(n) where n from 1 to 5000.

NVARCHAR YES* Since NVARCHAR is not natively supported by extended storage, it maps NVARCHAR(n) to VARCHAR(3n).

ALPHANUM YES* Since ALPHANUM is not natively supported by extended storage, dy­namic tiering maps ALPHANUM to VARCHAR, Results will be differ­ent if predicates or sorting done on ALPHANUM columns.

SHORTTEXT NO

VARBINARY YES

BLOB YES* ● The domain is same for column store and extended store tables.● There are certain DML and query operations that do not support

LOB columns > 32K Characters.

CLOB YES* ● The domain is same for column store and extended store tables.● There are certain DML and query operations that do not support

LOB columns > 32K Characters.

NCLOB YES* ● The domain is same for column store and extended store tables.● There are certain DML and query operations that do not support

LOB columns > 32K Characters.

TEXT NO

ARRAY NO

3.7.3 Choose Column Tables for Dynamic Tiering

Monitor table operations to identify where you can improve performance and reduce memory utilization. Large in-memory tables that are accessed infrequently are good candidates for the SAP HANA dynamic tiering option. Note that tables moved into dynamic tiering disappear from table analysis displays.

Prerequisites

● You have the system privilege EXTENDED STORAGE ADMIN.● There is a link to Table Usage under the Administration links for an individual resource.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 91

Page 92: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Context

With Table Usage you can visualize tables by size, explore the usage history of tables, and move tables to warm storage.

Procedure

1. Open Table Usage by clicking the corresponding Administration link in the Overview of a single system in SAP HANA cockpit.You see the status of the top column tables in the system by usage.

2. To filter tables shown, adjust the Total Access/Size/Display values and click Search. Click Reset to remove filters.

For the best display, select up to 50 tables. Two options for table analysis are available:

○ For table format display, choose table (Show table history as table).○ For graphical format display, choose graph (Show table history as graph). Mouse over a bubble to

show usage per column table.

Related Information

SAP HANA Administration Guide

3.7.4 Convert HANA Tables to Extended Store Tables Using the SAP HANA Cockpit

To move data to warm storage, convert appropriate column tables into extended store tables.

Prerequisites

● You have the system privilege EXTENDED STORAGE AGMIN.● The SAP HANA Table Usage tile is visible on the homepage of the SAP HANA cockpit.● You have analyzed usage history to identify large in-memory tables that are accessed infrequently, which

are candidates for warm storage. See Monitor Tables in the SAP HANA Administration Guide.

92 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 93: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Context

The Table Usage application in the HANA Cockpit catalog lets you convert a selected table into an extended store table.

Procedure

1. Open the Table Usage app by clicking the corresponding Administration link in the Overview of a single system in the SAP HANA cockpit.You see the status of the top column tables in the system by usage.

2. Select one or more tables from the Column Tables display.3. Click the Make Extended button.

The Delta option supports multiple concurrent writes (RLV tables).4. Choose an option on the Confirm Make Extended screen and click Yes.

After confirmation, the selected tables no longer display in the Table Usage app.

Related Information

SAP HANA Administration Guide

3.7.5 Manage Extended Store Tables Using SQL

Use SQL statements to create, modify, and remove extended store tables in dynamic tiering, and convert existing HANA tables to extended store tables or vice versa.

Prerequisites

● The extended store exists.● Requires the DATA ADMIN system privilege to manage a table not owned by self.

Context

Syntax details cited below are in the SQL Reference for SAP HANA Options section in the SAP HANA SQL and System Views Reference.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 93

Page 94: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Procedure

1. Open the SQL console.2. Enter the appropriate statement for your task.

Task Syntax See Also

Create CREATE TABLE <table_name> (<table_element>, ...) <use_extended_storage_clause>

CREATE TABLE Statement (Ex­tended Store Table) [Dynamic Tiering]

Convert an existing HANA table to an extended store table

NoteReview Extended Store Table Functional Re­strictions [page 89] be­fore proceeding. Con­version fails on HANA tables created with clauses not supported in extended store tables.

ALTER TABLE <table_name> <using_extended_storage_clause>ALTER TABLE Statement (Ex­tended Store Table) [Dynamic Tiering] – Syntax 2

Convert an extended store table to a HANA database table

ALTER TABLE <table_name> NOT USING EXTENDED STORAGEALTER TABLE Statement (Ex­tended Store Table) [Dynamic Tiering] – Syntax 2

Enable or disable delta on an existing extended store table

NoteReview Extended Store Table Functional Re­strictions [page 89] be­fore proceeding. Ena­bling delta fails on a con­verted HANA table that contains data types not supported in extended store tables.

ALTER TABLE <table_name> <using_extended_storage_clause>ALTER TABLE Statement (Ex­tended Store Table) [Dynamic Tiering] – Syntax 2

94 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 95: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Task Syntax See Also

Modify ALTER TABLE <table_name> [<add_column_clause>] [<drop_column_clause>] [<alter_column_clause>] [<add_constraint_clause>] [<drop_primary_key_clause>] [<drop_constraint_clause>] [<using_extended_storage_clause>]

ALTER TABLE Statement (Ex­tended Store Table) [Dynamic Tiering] – Syntax 1

Delete DROP TABLE <table_name> [<drop_option>] DROP TABLE Statement [Dy­namic Tiering]

Rename RENAME <current_table_name> TO <new_table_name>RENAME TABLE Statement [Dy­namic Tiering]

Related Information

SAP HANA SQL and System Views Reference Guide

3.7.6 Manage Extended Tables in the SAP HANA Studio

Use the SAP HANA studio graphical interface to create, alter, convert, and drop extended tables.

In this section:

Create an Extended Store Table [page 96]Use the SAP HANA studio graphical interface to create extended store tables.

Enable or Disable Delta on an Existing Extended Store Table [page 97]Use the SAP HANA studio graphical interface to enable or disable delta on existing extended store tables. Enabling delta facilitates faster inserts.

Convert a HANA or Extended Store Table [page 97]Use the SAP HANA studio graphical interface to convert an existing SAP HANA table to an extended store table and vice versa. All data in the table is preserved during conversion.

Alter or Delete an Extended Store Table [page 98]Use the SAP HANA studio graphical interface to alter and delete extended store tables.

Related Information

SAP HANA SQL and System Views Reference Guide

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 95

Page 96: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.7.6.1 Create an Extended Store Table

Use the SAP HANA studio graphical interface to create extended store tables.

Prerequisites

The extended store exists.

Context

You cannot enable delta when creating an extended store table. You must first create an SAP HANA table and then convert it to an extended store table with DELTA enabled.

Procedure

1. In the Systems view, open the catalog, and navigate to the schema to contain the new table.2. Right-click the Tables entry and choose New Table.3. Enter a name for the new table and select the schema from the Schema dropdown.4. Do one of:

Option Description

Create an extended store table with delta disabled Select Extended from the Type dropdown.

Create a delta enabled extended store table Select Column Store from the Type dropdown.

5. Choose the Column tab and enter the table parameters.6. Click the + sign to add additional columns and click F8 to execute.

7. To enable delta on the new table, see Enable/Disable Delta on an Existing Extended Store Table.

Related Information

Enable or Disable Delta on an Existing Extended Store Table [page 97]

96 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 97: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.7.6.2 Enable or Disable Delta on an Existing Extended Store Table

Use the SAP HANA studio graphical interface to enable or disable delta on existing extended store tables. Enabling delta facilitates faster inserts.

Context

NoteReview Extended Store Table Functional Restrictions [page 89] before proceeding. Enabling delta fails on a converted HANA table that contains data types not supported in extended tables.

Procedure

1. In the Systems view, open the catalog and schema, and navigate to the table in to be changed.2. Expand Tables and right-click the table to change.3. Choose Do Not Use Extended Storage.4. Click Yes to confirm.5. Right-click the table again and choose Use Extended Storage.6. Select Enabled or Disabled from the Use Delta dropdown.7. Click Move.

3.7.6.3 Convert a HANA or Extended Store Table

Use the SAP HANA studio graphical interface to convert an existing SAP HANA table to an extended store table and vice versa. All data in the table is preserved during conversion.

Context

NoteReview Extended Store Table Functional Restrictions [page 89] before proceeding. Conversion fails on HANA tables created with clauses not supported in extended tables.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 97

Page 98: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Procedure

1. In the Systems view, open the catalog and schema, and navigate to the table in to be converted.2. Right-click the table and do one of:

Option Description

Convert to extended store table 1. Choose Use Extended Storage.2. To enable delta, if applicable, choose Enabled from the Use Delta dropdown.3. Click Move.

Convert to HANA table 1. Choose Do Not Use Extended Storage.2. Click Yes to confirm conversion.

3.7.6.4 Alter or Delete an Extended Store Table

Use the SAP HANA studio graphical interface to alter and delete extended store tables.

Alter an Extended Store Table

Procedure

1. In the Systems view, open the catalog and schema, then navigate to the table in to be altered.2. Right-click the table to and choose Open Definition.

The table definition appears.3. Right-click in the definition and choose Edit.4. Modify the table as needed.5. Click F8 to execute.

Delete an Extended Store Table

Procedure

1. In the Systems view, open the catalog and schema, then navigate to the table in to be deleted.2. Right-click the table and choose Delete.3. Adjust the deletion parameters, if needed, and click OK.

98 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 99: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.8 Triggering a Merge on a Delta-Enabled Table

On a delta-enabled extended store or multistore table, MERGE DELTA triggers a merge of data from the delta dbspace to the user dbspace. When used in a multistore table, you can restrict a manual delta merge to just the default store partition or extended store partition of the multistore table.

The delta merge in a multistore table is processed in the partitions of both the default store and extended store independently of each other, each with its own data and delta store.

Most DML operations in a multistore table are likely to occur within the default store partition. Generally, this means that the default store partition would experience more activity during a delta merge, with the extended store partition experiencing less. For this reason, you might choose not to perform a delta merge on an extended store partition as often as you do for a default store partition, allowing you to reduce some of your memory resources during the merge process.

In a non-multistore environment, you can perform a delta merge on a specific column store partition. In a multistore table, you can additionally specify whether to merge just the default store partitions or the extended store partitions in the MERGE DELTA SQL statement.

For more information on delta merges, see:

● Merge Motivations and The Delta Merge Operation in the SAP HANA Administration Guide● MERGE DELTA Statement (Data Manipulation) in the SAP HANA SQL and System Views Reference, which

describes how SAP HANA handles the statement● SAP Note 2057046 – FAQ: SAP HANA Delta Merges

In this section:

MERGE DELTA Statement [page 100]On a delta-enabled extended store or multistore table, MERGE DELTA triggers a merge of data from the delta dbspace to the user dbspace. When used in a multistore table, you can restrict a manual delta merge to just the default store partition or extended store partition of the multistore table.

Related Information

SAP Note 2057046SAP HANA Administration GuideSAP HANA SQL and System Views Reference

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 99

Page 100: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.8.1 MERGE DELTA Statement

On a delta-enabled extended store or multistore table, MERGE DELTA triggers a merge of data from the delta dbspace to the user dbspace. When used in a multistore table, you can restrict a manual delta merge to just the default store partition or extended store partition of the multistore table.

Syntax

MERGE [HISTORY] DELTA OF <table_name> [PART <n>] [WITH PARAMETERS (<parameter_list>, ...)] [FOR {DEFAULT | EXTENDED} STORAGE]

Syntax Elements

HISTORY

Merges the history-delta storage of a table into the history-main storage for column store temporal tables.table_name

Specifies the table where the delta merge occurs, with the optional schema name.

<table_name> ::= [<schema_name>.]<identifier> <schema_name> ::= <unicode_name>

PART n

Merge the delta of a specific table partition to the table's main storage.WITH PARAMETERS

Passes option that are specific to the column store.

<parameter_list> ::= <parameter> [{, <parameter>}...] <parameter> ::= <parameter_name> = <parameter_setting> <parameter_name> ::= 'SMART_MERGE' <parameter_setting> ::= 'ON' | 'OFF'

When SMART_MERGE is ON, the database does a smart merge based on merge criteria specified in the mergedog section of the indexserver configuration.FOR {DEFAULT | EXTENDED} STORAGE (Optional) Specifies whether to merge just the default store partitions or the extended store partitions. If you do not specify this parameter, the delta merge is performed on both in the multistore table.

DEFAULT Restricts the delta merge to just the default (column) store partition in a multistore table.EXTENDED Restricts the delta merge to just the extended store partition in a multistore table.

100 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 101: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Description

On a delta-enabled table, MERGE DELTA triggers a merge of data from the delta dbspace to the user dbspace. As a table is read optimized and compressed, deltas are introduced to optimize insert or update operations. All insertions are passed to the delta storage. At a certain point in time, delta changes to a table can be merged into the table main storage.

The UPDATE privilege on the column store table is required for performing a delta merge.

The behavior of merge types in multistore tables:

Merge Type Behavior for Multistore Tables

Automerge Automerge is the default setting for delta merges, and is supported in both de­fault store and extended store partitions.

Smart merge Specified with the SMART_MERGE parameter, a smart merge determines whether a merge is necessary for the default store.

A smart merge is not supported in the extended store partition of a multistore ta­ble.

Hard merge Uses the MERGE DELTA OF '<table_name>' syntax, and performs a merge regardless of store type.

Forced merge Specified with the FORCED_MERGE parameter, a forced merge performs a hard merge while disregarding factors like storage size and system resource availabil­ity.

A forced merge is not supported in the extended store partition of a multistore table.

Memory merge Specified with the MEMORY_MERGE parameter, performs a delta merge only in memory, and the merge is not persisted.

A memory merge is not supported in the extended store partition of a multistore table.

Critical merge When a database performs a critical merge, it only merges the delta for the de­fault store partition of a multistore table.

Examples

In these examples, t1 is a multistore table.

Trigger a delta merge for partition 32 in table t1. If the partition is an extended store partition, the merge occurs in the extended store:

MERGE DELTA of t1 PART 32;

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 101

Page 102: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Merge the t1 multistore table including both the default store partition and extended store partition:

MERGE DELTA of t1;

Merges the delta for just the default store partition of the t1 multistore table:

MERGE DELTA of t1 FOR DEFAULT STORAGE;

Merges the delta for just the extended store partition of the t1 multistore table:

MERGE DELTA of t1 FOR EXTENDED STORAGE;

3.9 Computing Statistics

Compute statistics for columns to help HANA optimize queries on extended tables.

Like virtual tables, extended tables require explicit creation of statistics. In general, you should create statistics on columns involved in joins, group by clauses, and equality or range predicates.

SAP HANA dynamic tiering supports the CREATE and DROP STATISTICS statements described in the SQL Reference for SAP HANA Options section in the SAP HANA SQL and System Views Reference, with these restrictions:

● You can create two types of statistics: statistics that affect the whole table, or those that apply per column. RECORD COUNT applies to the entire table. SIMPLE, HISTOGRAM, and TOPK are created per column.

● If you don't specify the column names, the statement creates per-column statistics of the specified type on all columns.

ExampleColumns L_SHIPDATE, L_DISCOUNT, and L_QUANTITY in extended table LINEITEM are involved in range predicates in this query:

SELECT SUM(L_EXTENDEDPRICE * L_DISCOUNT) AS REVENUE FROM COMPANY.LINEITEM WHERE L_SHIPDATE >= TO_DATE ('1994-01-01') AND L_SHIPDATE < ADD_MONTHS(TO_DATE ('1994-01-01'),12) AND L_DISCOUNT BETWEEN ROUND((0.06 - 0.01), 2) AND ROUND((0.06 + 0.01), 2) AND L_QUANTITY < 24;

To optimize the query, create simple statistics on the columns used in the query predicates.

CREATE STATISTICS ON COMPANY.LINEITEM(L_SHIPDATE, L_DISCOUNT, L_QUANTITY) TYPE SIMPLE;

This creates statistics of type SIMPLE on each of the three columns.

102 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 103: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

ExampleThis query benefits from histogram statistics:

SELECT TOP 10 L_ORDERKEY, SUM(L_EXTENDEDPRICE * (1 - L_DISCOUNT)) AS REVENUE, O_ORDERDATE FROM COMPANY.CUSTOMER, COMPANY.ORDERS, COMPANY.LINEITEM WHERE C_MKTSEGMENT = 'BUILDING' AND C_CUSTKEY = O_CUSTKEY AND L_ORDERKEY = O_ORDERKEY AND O_ORDERDATE < TO_DATE ('1995-03-15') AND L_SHIPDATE > TO_DATE ('1995-03-15') GROUP BY L_ORDERKEY, O_ORDERDATE ORDER BY REVENUE DESC, O_ORDERDATE

To optimize the query, create statistics on the columns used in the query predicates:

CREATE STATISTICS ON COMPANY.CUSTOMER(C_MKTSEGMENT, C_CUSTKEY) TYPE HISTOGRAM; CREATE STATISTICS ON COMPANY.ORDERS(O_CUSTKEY,O_ORDERKEY,O_ORDERDATE) TYPE HISTOGRAM; CREATE STATISTICS ON COMPANY.LINEITEM(L_ORDERKEY, L_SHIPDATE) TYPE HISTOGRAM;

This creates statistics of type HISTOGRAM on each of the seven columns.

Related Information

SAP HANA SQL and System Views Reference Guide

3.10 Importing and Exporting Data

You can move data between extended store and multistore tables (warm data) and HANA tables (hot data). You can also move data into extended store and multistore tables from an external source.

In this section:

Extended Store Tables [page 104]You can move data between extended store tables (warm data) and HANA tables (hot data). You can also move data into extended store tables from an external source.

Multistore Tables [page 106]You can move data between multistore tables (warm data) and SAP HANA tables (hot data). You can also move data into multistore tables from external sources.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 103

Page 104: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Import Partial Rows to an Extended Store or MultistoreTable [page 109]A CSV file may contain partial rows.

3.10.1 Extended Store Tables

You can move data between extended store tables (warm data) and HANA tables (hot data). You can also move data into extended store tables from an external source.

In this section:

Import Data into an Extended Store Table [page 104]Import catalog objects previously exported from dynamic tiering, or external data from a CSV file.

Export Data from an Extended Store Table [page 105]Export tables, views, column views, synonyms, sequences, or procedures in CSV format.

Functional Restrictions on Importing and Exporting for Extended Store Tables [page 105]Some clauses are not supported when importing and exporting data for extended store tables.

3.10.1.1 Import Data into an Extended Store Table

Import catalog objects previously exported from dynamic tiering, or external data from a CSV file.

Execute all SQL statements through an SQL interface or custom applications. See the SQL Reference for SAP HANA Options section in the SAP HANA SQL and System Views Reference for complete syntax.

IMPORT

Import catalog objects (tables, views, synonyms, sequences, procedures) that have previously been exported from dynamic tiering:

Sample Code

IMPORT "testsch"."*" AS CSV FROM '/tmp' WITH REPLACE THREADS 10

IMPORT FROM

Import external data from a CSV file into an existing extended store table:

Sample Code

IMPORT FROM CSV FILE 'bigfile.csv' INTO ext_table1

104 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 105: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

See SAP Note 2348194 – Behavior Differences When Loading Data into SAP HANA 2.0, Extended Tables, or Multistore Tables .

Related Information

SAP HANA SQL and System Views Reference Guide

3.10.1.2 Export Data from an Extended Store Table

Export tables, views, column views, synonyms, sequences, or procedures in CSV format.

Execute all SQL statements through an SQL interface or custom applications. See the SQL Reference for SAP HANA Options section in the SAP HANA SQL and System Views Reference for complete syntax.

Sample Code

EXPORT MY_SCHEMA.tab1 AS CSV INTO '/tmp' WITH REPLACE SCRAMBLE THREADS 10

BINARY format is not supported for extended store tables.

3.10.1.3 Functional Restrictions on Importing and Exporting for Extended Store Tables

Some clauses are not supported when importing and exporting data for extended store tables.

These clauses are not supported when exporting an extended store table using the EXPORT statement:

● <export_import_format> – BINARY format is ignored; CSV format is used instead.● SCRAMBLE BY <scramble_seed>● STRIP

These clauses are not supported when importing data previously exported from an extended store table using the IMPORT statement:

● AT LOCATION <indexserver_host_port>● FAILED ON INVALID DATA● IGNORE IDENTICAL● BINARY

These clauses are not supported when importing external data to an extended store table using CSV format using the IMPORT FROM statement:

● THREADS <number_of_threads>● BATCH <number_of_records_of_each_commit>

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 105

Page 106: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

● TABLE LOCK● FAILED ON INVALID DATA

File locations when importing and exporting data must be on a shared file system available to both SAP HANA and dynamic tiering.

See SAP Note 2348194 – Behavior Differences When Loading Data into SAP HANA 2.0, Extended Tables, or Multistore Tables .

3.10.2 Multistore Tables

You can move data between multistore tables (warm data) and SAP HANA tables (hot data). You can also move data into multistore tables from external sources.

In this section:

Import Data into a Multistore Table [page 106]Import catalog objects previously exported from dynamic tiering or external data from a CSV file.

Export Data from a Multistore Table [page 107]Export tables, views, column views, synonyms, sequences, or procedures in CSV format.

Functional Restrictions on Importing and Exporting for Multistore Tables [page 108]Some restrictions affect IMPORT, EXPORT, and IMPORT FROM operations.

3.10.2.1 Import Data into a Multistore Table

Import catalog objects previously exported from dynamic tiering or external data from a CSV file.

Execute all SQL statements through an SQL interface or custom applications. See the SQL Reference for SAP HANA Options section in the SAP HANA SQL and System Views Reference for complete syntax.

Only CSV format is supported. A single CSV file can contain data from different stores. During import, the data is automatically saved to the appropriate partition, based on the defined values.

IMPORT

Import catalog objects (tables, views, synonyms, sequences, procedures) that have previously been exported.

Sample Code

IMPORT "testsch"."*" FROM '/data' WITH REPLACE THREADS 10 AT LOCATION '8001'

106 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 107: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

IMPORT FROM

Import external data from a CSV file into an existing multistore table. The optional enclosure must be a single character. Schema flexibility is not supported for multistore tables.

Sample Code

IMPORT FROM CSV FILE 'bigfile.csv' INTO ms_table1

See SAP Note 2348194 – Behavior Differences When Loading Data into SAP HANA 2.0, Extended Tables, or Multistore Tables .

3.10.2.2 Export Data from a Multistore Table

Export tables, views, column views, synonyms, sequences, or procedures in CSV format.

Execute all SQL statements through an SQL interface or custom applications. See the SQL Reference for SAP HANA Options section in the SAP HANA SQL and System Views Reference for complete syntax.

BINARY format is supported on multistore tables, but only for column store partitions; extended storage partitions are ignored. You can export a schema as well as data. The path specified must be to a shared disk. The REPLACE, CATALOG ONLY, NO DEPENDENCIES, and THREADS clauses are supported, but not the SCRAMBLE or STRIP clause. It is possible to cancel an EXPORT statement before completion.

The EXPORT statement exports extended store partitions and extended tables using parallel temp extract functionality. If you want to disable this functionality, use the following configuration option, set in the import_export section of the indexserver.ini file on the HANA host:

Option Supported Values (Default)

Description

use_temp_extract_multistore_export (True)/False True setting uses temp extract instead of remote scan ap­proach to export extended store partitions.

NoteNo modifications should be made to the table during ex­port.

Sample Code

EXPORT MY_SCHEMA.tab1 AS CSV INTO '/tmp' WITH REPLACE THREADS 10

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 107

Page 108: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.10.2.3 Functional Restrictions on Importing and Exporting for Multistore Tables

Some restrictions affect IMPORT, EXPORT, and IMPORT FROM operations.

File locations when importing and exporting data must be on a shared file system available to both SAP HANA and dynamic tiering.

EXPORT

These clauses are unsupported, or are supported with restrictions when exporting a multistore table using the EXPORT statement.

Clause Behavior if Specified

BINARY Exports only data from column store partitions.

SCRAMBLE BY scramble_seed Clause unsupported and returns an error.

IMPORT

These clauses are unsupported, or are supported with restrictions when importing a multistore table using the IMPORT statement.

Clause Behavior if Specified

AT LOCATION Use only to specify an index server location, as in the CRE­ATE TABLE Statement (Multistore Table) [Dynamic Tiering].

BINARY Only data from column store partitions can be exported or imported.

IGNORE IDENTICAL Clause ignored for multistore tables.

THREADS Only supported when importing data from column store partitions.

IMPORT FROM

These clauses are unsupported, or are supported with restrictions when importing a multistore table using the IMPORT FROM statement.

108 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 109: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Clause Behavior if Specified

COLUMN LIST IN FIRST ROW Only supported if the SCHEMA FLEXIBILITY clause is not specified. An error is returned if both are specified.

TABLE LOCK Not supported when importing external data to an extended store table using CSV format using the IMPORT FROM statement.

CSV file data is automatically saved to the appropriate partition, based on the defined values.

See SAP Note 2348194 – Behavior Differences When Loading Data into SAP HANA 2.0, Extended Tables, or Multistore Tables .

3.10.3 Import Partial Rows to an Extended Store or MultistoreTable

A CSV file may contain partial rows.

A partial row exists when the number of columns in the data is less than the number of rows specified in the IMPORT statement's column specification. During import, any field missing from the partial row is assigned a NULL value unless the field is not nullable. An error message appears and no data is imported when a missing field is not nullable.

3.11 Monitoring Dynamic Tiering

Monitor resource usage and performance to identify patterns, forecast requirements, and correct problems.

In this section:

Monitoring Dynamic Tiering in the SAP HANA Studio [page 109]To optimize performance, monitor the status of the dynamic tiering service in the SAP HANA studio.

Monitoring Dynamic Tiering in the SAP HANA Cockpit [page 110]The SAP HANA cockpit provides several monitoring applications through a Web browser.

3.11.1 Monitoring Dynamic Tiering in the SAP HANA Studio

To optimize performance, monitor the status of the dynamic tiering service in the SAP HANA studio.

Monitor status in the Administration editor of the dynamic tiering service:

● General status displays on the Overview tab.● Details about memory use are on the Landscape tab. To view details for a dynamic tiering service, locate

the appropriate host on a row where the Service column contains esserver.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 109

Page 110: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

● For storage details, see the system views M_ES_DBSPACES, M_ES_DBSPACE_FILES, and M_ES_TABLES in the Systems view under Catalog SYS Views .

3.11.2 Monitoring Dynamic Tiering in the SAP HANA Cockpit

The SAP HANA cockpit provides several monitoring applications through a Web browser.

From the SAP HANA cockpit, you can:

● Monitor dbspace percentage in use● View alerts for dbspaces nearing capacity● Check availability of dbspaces and dbspace files● Monitor memory usage and change allocation● Diagnose problematic internal connections and cancel corresponding sessions

To get started, see Open SAP HANA Cockpit in the SAP HANA Administration Guide.

In this section:

Dynamic Tiering Alerts [page 111]Alerts notify you of critical situations for dynamic tiering storage before processing may be affected. The DT Alerts tool lets you configure alerts and view alerts related to the usage and availability of dbspaces and dbspace files used by dynamic tiering.

Dynamic Tiering Memory [page 111]SAP HANA dynamic tiering uses several types of memory. The HANA Dynamic Tiering Memory application in the SAP HANA cockpit shows used and available memory by host, by type, and by memory component.

Dynamic Tiering Connections [page 112]The Dynamic Tiering Connections tool in the SAP HANA cockpit helps you diagnose problematic internal connections and, if necessary, cancel the corresponding session to correct an unresponsive system.

Related Information

SAP HANA Administration GuideSAP HANA Administration Guide

110 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 111: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.11.2.1 Dynamic Tiering Alerts

Alerts notify you of critical situations for dynamic tiering storage before processing may be affected. The DT Alerts tool lets you configure alerts and view alerts related to the usage and availability of dbspaces and dbspace files used by dynamic tiering.

Alerts appear on the home page of the SAP HANA cockpit. To manage alerts, click DT Alerts in the list of Dynamic Tiering Administration tools.

Alert Description Use

Dbspace Usage Lists the percentage of the dbspace that is used, the total size, and the amount used.

Trigger the alert to notify you when the dbspace has passed a threshold, and add new dbspace files or enlarge existing files before lack of space affects processing.

Dbspace Status Warns you if a dbspace is unavailable. Trigger the alert to notify you if the dynamic tiering dbspace goes offline.

Dbspace File Status Warns you if a dbspace file is unavailable.

Trigger the alert to notify you if the dynamic tiering dbspace file goes offline.

See Monitoring Alerts and Alert Details in the SAP HANA Administration Guide.

Related Information

SAP HANA Administration Guide

3.11.2.2 Dynamic Tiering Memory

SAP HANA dynamic tiering uses several types of memory. The HANA Dynamic Tiering Memory application in the SAP HANA cockpit shows used and available memory by host, by type, and by memory component.

In the Dynamic Tiering Links on the System Overview, click Manage Dynamic Tiering Memory.

The selected dynamic tiering host displays its machine name, role, total physical memory, total allocated memory, and cumulative memory used:

● Allocated memory is the total memory allocated to both SAP HANA and dynamic tiering.● Cumulative usage is the memory used as a percentage of total allocated memory (total memory allocated,

used, and available then broken down by component).

Click the dropdown beside the host name to display memory for a different dynamic tiering host.

Select:

Component Property

Delta delta_memory_mb

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 111

Page 112: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Component Property

Large/Load load_memory_mb

Temp Cache temporary_cache_mb

Main Cache main_cache_mb

NoteTo reallocate memory for dynamic tiering components, change the value of the corresponding property in the esserver.ini file.

Related Information

Dynamic Tiering Service Properties (esserver.ini) [page 18]

3.11.2.3 Dynamic Tiering Connections

The Dynamic Tiering Connections tool in the SAP HANA cockpit helps you diagnose problematic internal connections and, if necessary, cancel the corresponding session to correct an unresponsive system.

Prerequisites

You have the system privilege EXTENDED STORAGE ADMIN.

Context

If your system becomes unresponsive and you suspect that a large load statement is running or a deadlock has occurred, examine the dynamic tiering connections. Dynamic tiering connections are internal and are not exposed as user connections.

Procedure

1. In the Dynamic Tiering Links on the System Overview, click Manage Dynamic Tiering Connections to display all connections.

2. To filter connections displayed, click Idle or Active.

112 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 113: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3. Click any row for connection details. To view related details for the given connection, click Active Transactions or Remote Statements.

4. Click Cancel Session to stop the session for an unresponsive connection.5. Click Modify Configuration to change properties of the dynamic tiering service, such as the maximum

number of concurrent connections or the number of threads.

Related Information

Dynamic Tiering Service Properties (esserver.ini) [page 18]

3.12 Backup and Recovery for Dynamic Tiering

Backup and recovery applies to the whole database, including the SAP HANA database and extended storage.

SAP HANA dynamic tiering only supports backup and recovery options explicitly documented in the dynamic tiering documentation. Other tools and options mentioned in the SAP HANA documentation are supported for SAP HANA but not necessarily for dynamic tiering.

Dynamic tiering supports:

● Data backup:○ Complete data backup○ Incremental backup○ Differential backup

● Log backup● Database copy● Point-in-time recovery● Recovery to a specific data backup without using logs or log backups● Third-party backup tools certified by SAP● Changing the encryption state of a system using the RECOVER DATA command (data-only restore)

NoteFor backup and recovery features not supported by dynamic tiering, see 2375865 – SAP HANA Dynamic Tiering 2.0: Backup and Restore Functional Restrictions .

In this section:

Creating Backups [page 114]A backup includes data from both SAP HANA and dynamic tiering.

Finding and Checking Backups for Recovery [page 117]Use hdbbackupdiag to list the data and log backup files for a successful recovery, and to check whether recovery of a system with dynamic tiering is possible with the provided data and log backup files.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 113

Page 114: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Recovering SAP HANA Databases with Dynamic Tiering [page 118]You can recover using only the data backup, or you can perform a point-in-time recovery.

3.12.1 Creating Backups

A backup includes data from both SAP HANA and dynamic tiering.

Data Backups

See Creating Backups in the SAP HANA Administration Guide for steps to back up an SAP HANA database.

Backups create files for dynamic tiering in the location specified by the parameter <basepath_databackup> in the persistence section of the global.ini file. The navigation path defaults to ($DIR_INSTANCE)/backup/data.

This is the default path for file-based data backups. As system administrator, you can overwrite this path with every data backup without changing global.ini just by adding the path in the SQL statement, or in the backup wizard of SAP HANA studio, or in the backup application of SAP HANA cockpit.

The backup directory for dynamic tiering must be on a shared file system and available to all hosts, including the host where hdbesserver runs.

Log Backups

After the first data backup, a database with extended storage automatically makes a log backup every 15 minutes (default). The parameter <es_log_backup_interval>, in the database section of the esserver.ini file, controls the period between backups.

NoteSAP recommends that you choose the same log backup interval in both extended storage and SAP HANA.

Log backups create files for dynamic tiering in the location specified by the parameter <basepath_logbackup> in the persistence section of the global.ini file. The navigation path defaults to ($DIR_INSTANCE)/backup/log.

The log directory for dynamic tiering stores information about the data changes in transaction logs. Log backups of dynamic tiering write only the transaction log and metadata related to data modifications to the log backup files.

In SAP HANA cockpit, you can modify global.ini by clicking the corresponding Administration link in Overview of a single system, and then opening Configuration of System Properties.

In SAP HANA studio, you can modify global.ini using the Configuration tab.

See the SAP HANA Administration Guide.

114 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 115: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

In this section:

Viewing Backup History [page 115]The SAP HANA backup catalog maintains information about backup execution history for dynamic tiering data and backups.

Backups with Third-Party Backup Tools [page 116]Backint for SAP HANA is an API that enables third-party tool vendors to directly connect their backup agents to the SAP HANA database.

Adjust Log Backup Frequency [page 116]After the first data backup, a database with dynamic tiering automatically makes a log backup every 15 minutes (default). Change the log backup interval to adjust the backup frequency.

Related Information

Configuring Dynamic Tiering Properties (INI Files) [page 17]Finding and Checking Backups for Recovery [page 117]Recovering SAP HANA Databases with Dynamic Tiering [page 118]Changing Persistence Encryption States [page 139]SAP HANA Administration Guide

3.12.1.1 Viewing Backup History

The SAP HANA backup catalog maintains information about backup execution history for dynamic tiering data and backups.

Refer to the backup catalog to determine:

● Whether recovery is possible● Which data and log backups for dynamic tiering are required to perform a recovery● Which backups are no longer needed● Which part of the dynamic tiering transaction log is contained in a log backup● Whether a data or log backup was successful or not● The size of data and log backups

See Backup Catalog in the SAP HANA Administration Guide.

Dynamic tiering backup information is found in these system views:

● M_BACKUP_CATALOG_FILES System View● M_BACKUP_CATALOG System View

See the SAP HANA SQL and System Views Reference.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 115

Page 116: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Related Information

SAP HANA Administration GuideSAP HANA SQL and System Views Reference

3.12.1.2 Backups with Third-Party Backup Tools

Backint for SAP HANA is an API that enables third-party tool vendors to directly connect their backup agents to the SAP HANA database.

Third-party backup tools certified by SAP provide an alternate destination for data and log backups. All third-party backup tools certified for Backint with SAP HANA are supported by SAP HANA dynamic tiering.

NoteIn a multitenant database container system, tenant databases configured for SAP HANA dynamic tiering do not support backup and recovery using Backint.

For more information about the backup catalog and about installing and configuring a third-party backup tool, see Backup with Third-Party Backup Tool in the SAP HANA Administration Guide and the documentation provided by the backup tool vendor.

Related Information

Recovering SAP HANA Databases with Dynamic Tiering [page 118]

3.12.1.3 Adjust Log Backup Frequency

After the first data backup, a database with dynamic tiering automatically makes a log backup every 15 minutes (default). Change the log backup interval to adjust the backup frequency.

Prerequisites

You have the EXTENDED STORAGE ADMIN or INIFILE ADMIN system privilege.

116 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 117: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Context

Set the value to 0 to disable automatic log backups. Enter a value from 5 to 4294967295UL (2^32-1) minutes. Logging remains on, so the point-in-time log continues to grow and unallocated space on the RLV dbspace is not freed.

Procedure

1. In a SQL console, connect to the system to be modified as a user with required privileges.2. Execute the ALTER SYSTEM ALTER CONFIGURATION statement:

ALTER SYSTEM ALTER CONFIGURATION ('esserver.ini','SYSTEM') SET ('<parameter_key_value_list>') = '<parameter_key_value>' [WITH RECONFIGURE];

For complete syntax and requirements, see ALTER SYSTEM ALTER CONFIGURATION Statement [Dynamic Tiering] in the SAP HANA SQL and System Views Reference guide.

You may also use SAP HANA Cockpit or SAP HANA studio to set the log backup interval. See Change an esserver.ini Property – Single Database [page 20].

ExampleChanges the setting of log backup interval to 5 minutes:

ALTER SYSTEM ALTER CONFIGURATION ('esserver.ini','SYSTEM') SET ('database', 'log_backup_interval')='5' WITH RECONFIGURE

Related Information

Change an esserver.ini Property – Single Database [page 20]

3.12.2 Finding and Checking Backups for Recovery

Use hdbbackupdiag to list the data and log backup files for a successful recovery, and to check whether recovery of a system with dynamic tiering is possible with the provided data and log backup files.

The hdbbackupdiag tool obtains information about the required data and log backup files from both the SAP HANA database and its extended storage from the HANA backup catalog. See "Determining and checking Backups for Recovery (hdbbackupdiag Program)" in the SAP HANA Administration Guide.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 117

Page 118: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Related Information

SAP HANA Administration Guide

3.12.3 Recovering SAP HANA Databases with Dynamic Tiering

You can recover using only the data backup, or you can perform a point-in-time recovery.

Restrictions on Recovery

Certain restrictions affect recovery of SAP HANA databases with extended storage:

● The number and type of services must be identical in both the source and target system.● Recovery of a system configured with SAP HANA dynamic tiering requires the data and log backups for

both the SAP HANA database and dynamic tiering. You cannot recover one without the other.● If you restore a tenant database from a backup whose source has dynamic tiering configured and

extended storage created, you must provision the esserver service to the destination tenant database before you restore it. See Assigning the Dynamic Tiering Service to a Tenant Database in the SAP HANA Dynamic Tiering: Administration Guide. The destination tenant database can be on a different SAP HANA instance.

● After successful recovery using data backups, you cannot perform a point-in-time recovery until a log backup for dynamic tiering occurs. Log backups for dynamic tiering occur every 15 minutes. To avoid waiting, you can take a data backup immediately after the successful recovery from data backups.

● When performing point-in-time recovery through Backint for SAP HANA, omit the CLEAR LOG option of the RECOVER DATABASE command. Deselect the Initialize log area option in SAP HANA studio.

● When recovery uses Backint, SAP HANA materializes log backups from Backint into the backup/log directory. Allow sufficient disk space in the backup/log directory for the restore to complete successfully. Disk space required depends on the number of days of log backups that you want to recover since the data backup.

● In a multitenant database container SAP HANA system, tenant databases configured for dynamic tiering do not support backup and recovery using Backint for SAP HANA.

● On a dynamic tiering system enabled for HANA system recovery, you must reinitialize the dynamic tiering service on the secondary system after any recovery operation on the primary system. First, query the M_VOLUMES monitoring view on the primary system for the volume ID::

SELECT VOLUME_ID FROM SYS.M_VOLUMES WHERE SERVICE_NAME CONTAINS 'esserver'

Next, to reinitialize the secondary server, run the following on the primary system:

hdbnsutil -sr_initialize --volume = #DT_VOLUME_ID#

118 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 119: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Preparing for Recovery

Recovery of a system with SAP HANA dynamic tiering requires the data backups for both the SAP HANA database and dynamic tiering, which are located in the same directory by default.

Point-in-time recovery requires the log backups for both the SAP HANA database and SAP HANA dynamic tiering.

Log backups for dynamic tiering are located in the same directory as SAP HANA log backups.

Recovery Procedure

Use the command line tool or the Recovery Wizard in the SAP HANA studio. For both recovery procedures, see Recovering an SAP HANA Database in the SAP HANA Administration Guide.

Recovery includes an option to check availability of required backups. Specify the option to check for log backups from both SAP HANA and SAP HANA dynamic tiering. If any backups are missing, recovery lists the missing log backups and stops before changing data.

In cases where the transaction log of dynamic tiering is corrupt, specify the recovery option to initialize the log area. This option prevents the replay of the active transaction log during recovery, and reinitializes the log.

In this section:

Recovery in Upgraded Databases [page 119]Certain restrictions affect recovery of data from databases that have been upgraded to the current version.

Recovery from a Backup on Another System [page 121]Best practices for recovering your database from a backup on another system.

Related Information

Finding and Checking Backups for Recovery [page 117]Changing Persistence Encryption States [page 139]SAP HANA Administration Guide

3.12.3.1 Recovery in Upgraded Databases

Certain restrictions affect recovery of data from databases that have been upgraded to the current version.

Three types of recovery are possible:

● Recovery using the data backup or snapshot backup.● Recovery to a specific point in time

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 119

Page 120: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

● Recovery to the latest point in time

Point-in-time recovery requires both data and log backups.

Backups must be at least SAP HANA dynamic tiering version 12.0 SP10 or later.

Recovery Using Data Backup Only

To recover a data backup created before upgrade, requirements vary according to the recovery tool:

● When using a SQL client to recover, specify the USING FILE clause. For example, RECOVER DATA USING FILE ('COMPLETE_DATA_BACKUP' ') CLEAR LOG".

● When using SAP HANA studio to recover, choose the recovery type Recover to a specific data backup or storage snapshot, then choose the Specify backup without catalog backup location option.

Recovery Using Data and Log Backups

When recovery after upgrade uses data and log backups created before upgrade, always specify CLEAR LOG. To recover to the latest point in time, you have two choices:

● Before performing upgrade, disconnect all connections and wait for automatic dynamic tiering and SAP HANA log backup.

● Take a full data backup before upgrade, then recover from that data backup (no log replay).

When using a SQL client to recover, specify USING DATA PATH, USING LOG PATH, CLEAR LOG, and CHECK ACCESS ALL clauses in the recovery syntax (as you do in a system copy). For example:

Sample Code

RECOVER DATA USING BACKUP_ID 1432268516180 USING DATA PATH ('/usr/sap/C17/HDB17/backup/data') USING LOG PATH ('/usr/sap/C17/HDB17/backup/log') CLEAR LOG CHECK ACCESS ALL

When using SAP HANA studio to recover:

1. The Locate Log Backups screen supplies the log backup location for you. For example, /usr/sap/C17/HDB17/backup/log.Do not remove the log backup location supplied. dynamic tiering recovery requires it.

2. On the Select a Backup screen, specify Alternative Locations for data backups as /usr/sap/C17/HDB17/backup/data.

3. On the Other Settings screen, select two check boxes: File System and Initialize log area.4. Click Show SQL Statement to verify that the recovery statement includes USING DATA PATH, USING

LOG PATH, CLEAR LOG, and CHECK ACCESS clauses.

120 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 121: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Related Information

SAP HANA Dynamic Tiering: Installation and Update Guide

3.12.3.2 Recovery from a Backup on Another System

Best practices for recovering your database from a backup on another system.

● Verify that the <SID>adm user on the target system has access rights to the backup files.● Verify that the number and type of services is identical in both the source and target system.● Decide if you want to perform the recovery with a generated backup catalog, or without a backup catalog.

For details on recovering with or without the backup catalog, see:○ Backup Catalog in SAP HANA Administration Guide.

● Manually Checking Whether a Recovery is Possible in SAP HANA Administration Guide.● Recover a Database to a Specific Full Data Backup in SAP HANA Administration Guide.

Related Information

SAP HANA Administration Guide

3.13 Dynamic Tiering High Availability (Failover)

SAP HANA Dynamic Tiering supports both automatic and manual failover.

Automatic failover is available when the dynamic tiering worker and standby host are assigned to the same high availability group. Manual failover is available when the worker and standby hosts are assigned to different, unique, high availability groups.

Automatic failover is supported for dynamic tiering using NFS, GPFS, and SAN storage.

Do not use the same standby host for both SAP HANA and dynamic tiering; each requires its own dedicated standby host.

Refer to the High Availability for SAP HANA section in the SAP HANA Administration Guide for configuration details.

In this section:

System Replication [page 122]System replication is a high-availability feature that maintains a secondary system for fault and disaster recovery support.

Change High Availability Group Assignment [page 123]

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 121

Page 122: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

To switch between automatic and manual failover, you change the assigned high availability group of the worker and standby host.

Manual Failover to Dynamic Tiering Standby Host [page 124]Failing over from the SAP HANA dynamic tiering worker host to the standby host is a manual process when the hosts are assigned to different failover groups.

Dynamic Tiering Automatic Failover with SAN Storage [page 125]Automatic failover for dynamic tiering data residing on SAN requires configuration in the global.ini file.

Failover in a Same Host Deployment [page 125]SAP HANA Dynamic Tiering supports both automatic and manual failover in a same host deployment.

Related Information

SAP HANA Administration Guide

3.13.1 System Replication

System replication is a high-availability feature that maintains a secondary system for fault and disaster recovery support.

System replication requires a secondary system with the same SID and the same number of SAP HANA and dynamic tiering worker hosts. The number of standby hosts need not to be identical.

Host BHost A

Shared Resources Location

Data Logs

SAP HANA Server

Dynamic Tiering ES Server

Primary System

Host BHost A

Shared Resources Location

Data Logs

SAP HANA Server

Dynamic Tiering ES Server

Secondary System

Figure 3: Dynamic Tiering System Replication Landscape

For a list of system replication features that dynamic tiering supports, see SAP Note 2356851 – SAP HANA Dynamic Tiering Support for SAP HANA System Replication .

122 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 123: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

For more information and steps for configuring system replication, see the Availability and Scalability section of the SAP HANA Administration Guide.

3.13.2 Change High Availability Group Assignment

To switch between automatic and manual failover, you change the assigned high availability group of the worker and standby host.

Context

Automatic failover is available when the dynamic tiering worker and standby hosts belong to the same high availability group. The default group name is extended_storage, but any name can be used, as long as it is not already used for automatic failover of the SAP HANA system. The dynamic tiering worker and standby hosts should never be assigned to an existing SAP HANA high availability group.

When the dynamic tiering worker and standby hosts are assigned to different, unique groups, the failover process is manual.

Procedure

1. In the SAP HANA studio Administration console, do one of:

Database Type Action

Single database Double-click the system in the Systems panel.

Tenant database Double-click the SYSTEMDB in the Systems panel.

2. Choose Landscape Hosts .

3. Click the (Configure Hosts for Failover Situation) button.4. Modify the values for the dynamic tiering worker and standby hosts in the Configured Group column to be

the same.5. Click Check, then OK, then Save.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 123

Page 124: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.13.3 Manual Failover to Dynamic Tiering Standby Host

Failing over from the SAP HANA dynamic tiering worker host to the standby host is a manual process when the hosts are assigned to different failover groups.

Prerequisites

The dynamic tiering worker and standby host belong to different failover groups.

Context

Fail over to the standby host if the dynamic tiering worker host goes offline.

Procedure

1. Verify that either the dynamic tiering worker host, or the dynamic tiering service process, is inactive.

CautionFailing over when the dynamic tiering service is still running can result in data inconsistencies.

2. Connect to the index server.3. Issue this SQL command to fail over from the current dynamic tiering worker host ('<source-host-

name>') to the standby host ('<target-host-name>'):

CALL SYS.UPDATE_LANDSCAPE_CONFIGURATION('host failover', '<source-host-name>', '<target-host-name>')

For example:

CALL SYS.UPDATE_LANDSCAPE_CONFIGURATION ('host failover', 'abcdehana1106', 'abcdehana1107')

Results

The dynamic tiering service restarts on the standby host. The standby host is renamed worker in the topology. If the original worker node comes back online, it is renamed standby in the topology.

124 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 125: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.13.4 Dynamic Tiering Automatic Failover with SAN Storage

Automatic failover for dynamic tiering data residing on SAN requires configuration in the global.ini file.

Set the storage > enable_extended_storage parameter in the global.ini file to true (default) when dynamic tiering data resides on SAN using the storage connector API. A setting of false indicates dynamic tiering data resides on an NFS share.

Add the parameters partition_1024_data_es__wwid = <wwid3> and partition_1024_log_es__wwid = <wwid4> to the storage section.

See SAP Note 1900823 – SAP HANA Storage Connector API .

3.13.5 Failover in a Same Host Deployment

SAP HANA Dynamic Tiering supports both automatic and manual failover in a same host deployment.

A dedicated dynamic tiering standby host is not required in a same host deployment. SAP HANA and dynamic tiering share the same standby host. This is done by assigning both the SAP HANA and dynamic tiering worker roles to the same failover group.

3.14 Performing Consistency Checks

The SAP HANA database provides procedures that let you perform a range of consistency check actions on catalog objects and database tables for both multistores and extended tables.

Procedure Description

CHECK_CATALOG Performs consistency checks of metadata in both multistore and extended store tables, de­pending on arguments to the procedure call.

CHECK_ES Lets you check the validity of the current database in the extended store.

CHECK_TABLE_CONSIS­TENCY

Lets you perform consistency checks in the column store partition of a multistore table.

For more information about consistency checks, see Table and Catalog Consistency Checks in SAP HANA Administration Guide and SAP Note 1977584 – Technical Consistency Checks for SAP HANA Databases .

In this section:

Catalog Consistency Checker [page 126]The CHECK_CATALOG procedure performs consistency checks of metadata in both multistore and extended store tables, based on the actions you specify as arguments to the procedure call.

Extended Store Database Consistency Checker [page 128]

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 125

Page 126: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

The CHECK_ES procedure checks the validity of the current database in the extended store. Optionally, it corrects allocation problems for dbspaces or databases. CHECK_ES does not check a partitioned table if partitioned data exists in offline dbspaces.

Table Consistency Checker [page 131]The CHECK_TABLE_CONSISTENCY procedure performs consistency check actions in the column store partition of a multistore table.

Related Information

SAP Note 1977584SAP HANA Administration Guide

3.14.1 Catalog Consistency Checker

The CHECK_CATALOG procedure performs consistency checks of metadata in both multistore and extended store tables, based on the actions you specify as arguments to the procedure call.

Syntax

CALL CHECK_CATALOG ('<action>'), '<object_type>', '<schema_name>', '<object_name>')

Syntax Elements

action

The type of consistency check to perform.

<action> ::= CHECK_ES_METADATA | REPAIR_ES_METADATA | CHECK | CHECK_VALUE_DOMAIN | CHECK_OBJECT_REFERENTIAL_INTEGRITY

CHECK_ES_METADATA

Checks the metadata of a multistore or extended store table for inconsistencies such as missing tables, columns, and indexes.REPAIR_ES_METADATA

Fixes metadata inconsistencies by deleting orphaned objects found by running CHECK_ES_METADATA.

126 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 127: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

CHECK

Performs all available checks. When you perform this action on a multistore table, it is only applied to the column store partitions of the multistore table; checks are not performed on extended storage partitions.CHECK_VALUE_DOMIAIN

Checks the consistency of value domains in the catalog object (such as table type, field types, and so on). When you perform this action on a multistore table, it is only applied to the column store partitions of the multistore table; checks are not performed on extended storage partitions.CHECK_OBJECT_REFERENTIAL_INTEGRITY

Checks the consistency of references in the catalog object. When you perform this action on a multistore table, it is only applied to the column store partitions of the multistore table; checks are not performed on extended storage partitions.

<action> ::= CHECK | CHECK_VALUE_DOMAIN | CHECK_OBJECT_REFERENTIAL_INTEGRITY

object_type The type of analyzed database object.

<object_type> ::= TABLE | INDEX | COLUMN | NULL

NULL Checks for all extended storage objects.schema_name Specifies the name of the analyzed schema.object_name Specifies the name of the analyzed object.

Description

CHECK_CATALOG only checks the metadata of objects, and does not check the actual structure or data of tables and indexes.

See the following:

● CALL Statement (Procedural) in SAP HANA SQL and System Views Reference● Catalog Consistency Checks in SAP HANA Administration Guide● SAP Note 1977584 – Technical Consistency Checks for SAP HANA Databases

Related Information

SAP Note 1977584SAP HANA Administration GuideSAP HANA SQL and System Views Reference

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 127

Page 128: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3.14.2 Extended Store Database Consistency Checker

The CHECK_ES procedure checks the validity of the current database in the extended store. Optionally, it corrects allocation problems for dbspaces or databases. CHECK_ES does not check a partitioned table if partitioned data exists in offline dbspaces.

Syntax

CALL CHECK_ES ('<action>', '<object_type>', '<object_name>', '<resource_percentage>')

Syntax Elements

action

The type of consistency check to perform.

<action> ::= CHECK | VERIFY | ALLOCATION | ALLOCATION_LEAKED_BLOCKS | ALLOCATION_DUPLICATE_BLOCKS | ALLOCATION_UNALLOCATED_BLOCKS | DROPLEAKS

CHECK

Verifies that all database pages can be read for the entire database, main cache, specific index, specific index type, specific table, or specific dbspace. If the table is partitioned, the CHECK action checks the table’s partition allocation bitmaps. Use the CHECK action if metadata, null count, or distinct count errors are returned when running a query.VERIFY

Verifies the content of indexes for the entire database, or a specific index, table, or dbspace to detect keys or rows that are missing or extras.ALLOCATION

Checks allocation with blockmap information for the entire database, a specific index, a specific index type, specific table, or a specific dbspace. Does not check index consistency.ALLOCATION_LEAKED_BLOCKS

Detects leaked blocks (allocated blocks unclaimed by any object you specify in <object_name>) for database or dbspace targets, and returns the block numbers for leaked blocks.ALLOCATION_DUPLICATE_BLOCKS

Detects duplicate blocks (blocks for which two or more objects claim ownership) or extra blocks (unallocated blocks owned by an object), and returns the block numbers for duplicate blocks.ALLOCATION_UNALLOCATED_BLOCKS

128 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 129: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Checks allocation for the entire database, and returns block numbers for unallocated blocks.DROPLEAKS

Resets the allocation map for the entire database or dbspace. Use the DROPLEAKS action to repair allocation problems.

object_type

Specifies the analyzed object:

<object_type> ::= INDEX | DATABASE | TABLE | PARTITION | COLUMN | DBSPACE

DATABASE If you specify DATABASE as your <object_type>, all dbspaces must be online.object_name Specifies the name of the analyzed object.

<object_name> :: = <indexname> | <table_name> | <column_name> | <dbspace_name> | NULL

indexname

Requires a fully qualified name in the form of <owner>.<tablename>.<indexname>.table_name

Requires a fully qualified name in the form of <owner>.<tablename>, where <tablename> cannot be a temporary or pre-join table.

If either the table name or the index name contains spaces, enclose the <tablename>. The resources percentage allows you to limit the CPU utilization of the or <indexname> parameter in double quotation marks.dbspace_name

This parameter contains no qualifiers, but if the name contains spaces, enclose it in double quotation marks. Specifying DBSPACE examines a subset of the database's pages that belong to that dbspace. The dbspace must be online. Specifying DBSPACE and DATABASE are semantically equivalent when the table has only one dbspace.NULL Specify when <object_type> is DATABASE.

resource_percentage Specify 100 (default value) to create one thread per CPU. Specify a value greater than 100 to create more threads than CPUs; this may increase performance for some machine configurations. The minimum number of threads is 1.

Examples

This procedure checks the consistency of block allocation for the entire database, allocating a resource percentage of 100 percent (creating one thread per CPU):

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 129

Page 130: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Sample Code

Call CHECK_ES ( 'allocation', 'database', '', '100' )

Output Code

Statistic Value Flag =========================================================DBCC Allocation Mode Report ========================================================= DBCC Status No Errors Detected ========================================================= Allocation Summary========================================================= Blocks Total 25600 Blocks in Current Version 5917 Blocks in All Versions 5917 Blocks in Use 5917 % Blocks in Use 23 =========================================================Allocation Statistics========================================================= Marked Logical Blocks 8320 Marked Physical Blocks 5917 Marked Pages 520 Blocks in Freelist 2071196 Imaginary Blocks 2014079 Highest PBN in Use 1049285 Total Free Blocks 19683 Usable Free Blocks 19382 % Total Space Fragmented 1 % Free Space Fragmented 1 Max Blocks Per Page 16 1 Block Page Count 165 3 Block Page Count 200 4 Block Page Count 1 10 Block Page Count 1 16 Block Page Count 153 2 Block Hole Count 1 3 Block Hole Count 19 6 Block Hole Count 12 7 Block Hole Count 1 10 Block Hole Count 1 15 Block Hole Count 1 16 Block Hole Count 1220

Description

Enclose the CHECK_ES parameter string in single quotes. It cannot be greater than 255 bytes in length.

Depending on the type of action, CHECK_ES output includes summary results, errors, informational statistics, and repair statistics. Error statistics are indicated by asterisks (*****), and appear only if errors are detected.

For more information, see CALL Statement (Procedural) in SAP HANA SQL and System Views Reference.

130 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 131: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Related Information

SAP HANA SQL and System Views Reference

3.14.3 Table Consistency Checker

The CHECK_TABLE_CONSISTENCY procedure performs consistency check actions in the column store partition of a multistore table.

Syntax

CALL CHECK_TABLE_CONSISTENCY ('<action>', '<schema name>', '<table name>')

Syntax Elements

action The type of consistency check to perform.

<action> ::= CHECK | CHECK_COLUMN_TABLES | CHECK_PRIMARY_KEY | CHECK_ROWID | CHECK_PARTITIONING | CHECK_PARTITIONING_DATA | REPAIR_PARTITIONING_DATA

CHECK

Performs all available checks.CHECK_COLUMN_TABLES

Performs a check restricted to default (column) store and multistore tables.CHECK_PRIMARY_KEY

Checks the consistency of the primary key in the default store.CHECK_ROWID

Checks the consistency of the internal $rowid$ column only for the column store partition of a multistore table.CHECK_PARTITIONING

Checks the consistency of partitioning-related metadata.CHECK_PARTITIONING_DATA Checks the assignment of rows to partitions.REPAIR_PARTITIONING_DATA Repairs the assignment to rows to partitions.

schema_name Specifies the name of the analyzed schema.

SAP HANA Dynamic Tiering: Administration GuideSystem Administration P U B L I C 131

Page 132: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

object_name Specifies the name of the analyzed object.table_name Specifies the name of the analyzed table.

Description

You can only perform a table consistency check for column store partitions in a multistore table.

This procedure requires the following system privileges:

● DATA ADMIN or CATALOG READ for check actions● DATA ADMIN for repair actions

If you have tables or schemas with names containing lowercase characters, slashes ("/"), or other special characters, enclose them in double-quotation marks to prevent CHECK_TABLE_CONSISTENCY from normalizing them, treating them as strings.

For more information about CALL and table consistency checks, see:

● CALL Statement (Procedural) in SAP HANA SQL and System Views Reference● Table Consistency Checks in SAP HANA Administration Guide● SAP Note 1977584 – Technical Consistency Checks for SAP HANA Databases

Examples

This procedure checks the consistency for a table named "ABC/abc" in the SYSTEM schema:

CALL CHECK_TABLE_CONSISTENCY ('CHECK', 'SYSTEM', '"ABC/abc"')

Related Information

SAP Note 1977584SAP HANA Administration GuideSAP HANA SQL and System Views Reference

132 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

System Administration

Page 133: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

4 Security Administration

Security administration is usually handled separately from general system administration tasks.

SAP HANA dynamic tiering adds a new user to the list of SAP HANA standard users.

User Description Password Specification

_SYS_ES _SYS_ES is a technical user used by dynamic tiering. It is automatically cre­ated when you create extended storage.

Not applicable.

This is a technical database user. _SYS_ES logs on in­ternally through the dynamic tiering service. You cannot log on with this user.

To perform operations, users need the necessary privileges. See the GRANT EXTENDED STORAGE ADMIN System Privilege Statement [Dynamic Tiering] statement in the SAP HANA SQL and System Views Reference.

Network and Communication Security

Internal communication between the dynamic tiering host and the SAP HANA database is secured using the secure sockets layer (SSL) protocol. In addition to securing internal communications with the SSL protocol, each dynamic tiering and SAP HANA database host in the system has a public and private key pair and a public-key certificate.

See Communication Channel Security and Secure Internal Communication in the SAP HANA Security Guide.

To improve performance and security in multiple-host systems, you may configure SAP HANA to use only an internal IP address to communicate with the dynamic tiering service.

User Privileges

To perform dynamic tiering administration tasks, you need the EXTENDED STORAGE ADMIN system privilege. It must be granted to your database user or relevant role by a user administrator.

See the GRANT EXTENDED STORAGE ADMIN System Privilege Statement [Dynamic Tiering] statement in the SAP HANA SQL and System Views Reference.

In this section:

Configure Private Internal Communication Using the Command Line Interface [page 134]To increase security and improve performance, configure communication between the SAP HANA database and the SAP HANA dynamic tiering service over an internal network, using the command line interface.

Configure Private Internal Communication Using the Graphical User Interface [page 136]

SAP HANA Dynamic Tiering: Administration GuideSecurity Administration P U B L I C 133

Page 134: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

To increase security and improve performance, configure communication between the SAP HANA database and the SAP HANA dynamic tiering service over an internal network, using the graphical user interface.

Data Volume Encryption [page 137]SAP HANA dynamic tiering supports data encryption in the persistence layer through data volume encryption, ensuring that anyone who can access the data volume on disk using operating system commands cannot see the actual data.

Related Information

Dynamic Tiering Administration User [page 152]SAP HANA SQL and System Views Reference SAP HANA Security Guide

4.1 Configure Private Internal Communication Using the Command Line Interface

To increase security and improve performance, configure communication between the SAP HANA database and the SAP HANA dynamic tiering service over an internal network, using the command line interface.

Prerequisites

● The SAP HANA system has been installed or updated with the SAP HANA database lifecycle manager (HDBLCM).

● The SAP HANA database server is up and running.● You are logged on with the required root user or system administrator user <sid>adm credentials.

Procedure

1. Change to the SAP HANA resident HDBLCM directory:

cd <sapmnt>/<SID>/hdblcm

By default, <sapmnt> is /hana/shared.

2. Start the SAP HANA database lifecycle manager interactively in the command line:

./hdblcm

134 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Security Administration

Page 135: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

3. Select the index for the configure_internal_network action. Then select Enter .

4. Define the required parameters.

Field Name Description

Inter-Service Communication Specifies the listen interface for the internal network communication.

global - Binds the processes to all interfaces. This option does not re­quire an internal network address entry.internal - Binds the processes to this address only and to all local host interfaces. This option requires an internal network address entry.local - Opens the communication ports for internal usage on the local interfaces. This configuration is only an option for single installations as the server is not reachable from outside. This option does not require an internal network address entry.

If you define a value other than local, the local interfaces will always be open.

Internal Network Address Specifies the internal subnet address in CIDR notation.

5. Review the summary, and select y to finalize the configuration.

Results

When you apply the change, the SAP HANA database lifecycle manager shuts down and restarts the system. After the restart, the SAP HANA database uses internal IP with other HANA worker nodes and the dynamic tiering host.

NoteWhen using the command line, the options can be set interactively during configuration only if they are marked as interactive in the help description. All other options have to be specified in the command line. To call the help, in the SAP HANA resident HDBLCM directory of the SAP HANA system, execute the following command:

./hdblcm --action=configure_internal_network --help

ExampleThe following example configures the internal network communication with an internal interface:

./hdblcm --action=configure_internal_network --listen_interface=internal --internal_network=192.456.78/21

SAP HANA Dynamic Tiering: Administration GuideSecurity Administration P U B L I C 135

Page 136: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

4.2 Configure Private Internal Communication Using the Graphical User Interface

To increase security and improve performance, configure communication between the SAP HANA database and the SAP HANA dynamic tiering service over an internal network, using the graphical user interface.

Prerequisites

● The SAP HANA system has been installed or updated with the SAP HANA database lifecycle manager (HDBLCM).

● The SAP HANA database server is up and running.● You are logged on with the required root user or system administrator user <sid>adm credentials.

Procedure

1. Change to the SAP HANA resident HDBLCM directory:

cd <sapmnt>/<SID>/hdblcm

By default, <sapmnt> is /hana/shared.

2. Start the SAP HANA database lifecycle manager interactively in the graphical user interface:

./hdblcmgui

The SAP HANA database lifecycle manager graphical user interface appears.3. Select Configure Inter-Service Communication from the activity options. Then select Next.4. Define the required parameters. Then select Next.

Field Name Description

Inter-Service Communication Specifies the listen interface for the internal network communication.

global - Binds the processes to all interfaces. This option does not re­quire an internal network address entry.internal - Binds the processes to this address only and to all local host interfaces. This option requires an internal network address entry.local - Opens the communication ports for internal usage on the local interfaces. This configuration is only an option for single installations as the server is not reachable from outside. This option does not require an internal network address entry.

If you define a value other than local, the local interfaces will always be open.

136 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Security Administration

Page 137: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Field Name Description

Internal Network Address Specifies the internal subnet address in CIDR notation.

5. Review the summary, and select Run to finalize the configuration.

You can find more information about SAP HANA system internal network and the network security recommendations, in the SAP HANA Update Master, SAP HANA Security Guide, and SAP HANA Administration Guide.

Results

You have configured the inter-service communication so that the SAP HANA database uses internal IP with other HANA worker nodes and the dynamic tiering host. The parameter values are entered in the global.ini configuration file under [communication].

4.3 Data Volume Encryption

SAP HANA dynamic tiering supports data encryption in the persistence layer through data volume encryption, ensuring that anyone who can access the data volume on disk using operating system commands cannot see the actual data.

If SAP HANA is enabled for data volume encryption, any extended store you create using the dynamic tiering option is automatically encrypted; you need not perform any additional steps or configurations.

The characteristics of an encrypted extended store are:

● No additional steps are required during creation to enable database encryption for extended stores.● The level of encryption is the same as that of an SAP HANA database, using the AES algorithm with a 256-

bit page encryption key.● Encrypting the extended store database encrypts all database files, including the transaction log.

See Data Volume Encryption in the SAP HANA Security Guide for information on data volume encryption.

For information on encryption, see Data Storage Security in SAP HANA in the SAP HANA Security Guide, and Enable Data Volume Encryption in an Existing SAP HANA System in the SAP HANA Administration Guide.

Key Management

The SAP HANA database data volume encryption root key is stored using the secure storage in the file system (SSFS) functionality, and is automatically retrieved during start-up. This same root key is used for encrypted extended stores. The encryption key for encrypting dynamic tiering pages, however, differs from the SAP HANA database page encryption key.

SAP HANA Dynamic Tiering: Administration GuideSecurity Administration P U B L I C 137

Page 138: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Monitoring Views

To check the encryption status of extended storage, use the M_PERSISTENCE_ENCRYPTION_STATUS monitoring view. The view lists the encryption status of all SAP HANA services, including extended storage. The M_PERSISTENCE_ENCRYPTION_STATUS monitoring view also provides information about the root key version used for dynamic tiering persistence encryption. See the SAP HANA SQL and System Views Reference for details on M_PERSISTENCE_ENCRYPTION_STATUS.

In this section:

Functional Restrictions [page 138]There are functional restrictions when configuring an SAP HANA and dynamic tiering system for data volume encryption.

Changing Persistence Encryption States [page 139]To change the persistence encryption state of an existing SAP HANA and dynamic tiering system, perform a full data backup, enable or disable data volume encryption in a new system, then recover the backup into the new system.

Related Information

SAP HANA Security GuideSAP HANA SQL and System Views Reference

4.3.1 Functional Restrictions

There are functional restrictions when configuring an SAP HANA and dynamic tiering system for data volume encryption.

Changing the Encryption State After Extended Storage Creation

You cannot change the HANA persistence encryption state once extended storage is created.

● If your SAP HANA database is unencrypted when you create extended storage, you cannot then enable data volume encryption on the system to encrypt your system; attempts to enable encryption fail. Instead, encrypt the system by performing a backup and recovery into an encrypted database.

● If your SAP HANA database with extended storage is encrypted, you cannot disable data volume encryption to turn off encryption in SAP HANA; attempts to disable encryption fail. Instead, unencrypt the system by performing a backup and recovery into an unencrypted database.

138 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Security Administration

Page 139: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Changing the Page Encryption Key

While you can change the encryption key for SAP HANA through the Security editor, this method is not supported for encrypted extended storage. Changing the page encryption key for extended storage is supported only as part of a full data recovery to a target system that has encryption enabled.

Backup and Recovery

You cannot restore backups of an SAP HANA database or an extended store that are earlier than SAP HANA 2.0 to a target system that is encrypted (that is, with data volume encryption enabled).

Point-in-time recovery is not supported if:

● The target system has encryption enabled, and the backup is of a source system that does not have encryption enabled.

● The target system has encryption disabled, and the backup is of a source system that has encryption enabled.

4.3.2 Changing Persistence Encryption States

To change the persistence encryption state of an existing SAP HANA and dynamic tiering system, perform a full data backup, enable or disable data volume encryption in a new system, then recover the backup into the new system.

If you have an existing unencrypted SAP HANA system that uses dynamic tiering for external storage, you cannot turn on data volume encryption to encrypt the system. Instead, perform a clear text full data backup, enable encryption, then restore the backup. The process for reverting from an encrypted to unencrypted system also requires a backup and recovery.

This table shows the encryption status of SAP HANA and dynamic tiering in the phases of a full data backup and recovery process:

HANA/Dynamic Tier­ing Status Before Backup

Contents of the Backup HANA/Dynamic Tiering Status After Recov­ery

HANA Dynamic Tiering (Ex­tended Store)

With Data Volume En­cryption Enabled

With Data Volume En­cryption Disabled

Clear text Clear text Clear text Encrypted Clear text

Encrypted Clear text Clear text Encrypted Clear text

See Data Volume Encryption in the SAP HANA Security Guide and Enable Data Volume Encryption with System Reinstallation in the SAP HANA Administration Guide for the details on data volume encryption.

In this section:

Enable Data Volume Encryption in an Existing SAP HANA System with Dynamic Tiering [page 140]

SAP HANA Dynamic Tiering: Administration GuideSecurity Administration P U B L I C 139

Page 140: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

To encrypt an unencrypted SAP HANA system with dynamic tiering, enable data volume encryption during a full data backup and recovery.

Disable Data Volume Encryption in an Existing SAP HANA System with Dynamic Tiering [page 141]If your SAP HANA and dynamic tiering system is encrypted and you need to decrypt it, the process requires a full data backup and recovery, as well as disabling data volume encryption.

4.3.2.1 Enable Data Volume Encryption in an Existing SAP HANA System with Dynamic Tiering

To encrypt an unencrypted SAP HANA system with dynamic tiering, enable data volume encryption during a full data backup and recovery.

Context

The process of enabling data volume encryption for an existing SAP HANA and dynamic tiering system is similar to the steps performed for encrypting SAP HANA by itself, and involves a backup and recovery.

See the following for more information:

● SAP HANA Backup and SAP HANA Recovery in the SAP HANA Administration Guide for the procedures to back up and restore an SAP HANA database

● Backup and Recovery for Dynamic Tiering in this guide for instructions specific to dynamic tiering● Enable Data Volume Encryption in an Existing SAP HANA System in the SAP HANA Administration Guide

for detailed instructions on how to reinstall SAP HANA as part of enabling data volume encryption.

Procedure

1. Perform a data backup of both SAP HANA and the extended store.2. Uninstall your system. If possible, overwrite the former data area with random values.3. Reinstall your system.4. Using SQL, execute the DROP EXTENDED STORAGE CASCADE statement to drop the extended store and

all its associated objects.5. Enable data volume encryption for the SAP HANA database by executing the following SQL statements:

ALTER SYSTEM PERSISTENCE ENCRYPTION ON;

ALTER SYSTEM SAVEPOINT;

6. Recover your system. A full recovery re-creates your extended store even though you dropped it before disabling data volume encryption.

140 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Security Administration

Page 141: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Results

All data persisted to data volumes is encrypted for both SAP HANA and dynamic tiering. The status of the data volume encryption is Encrypted.

Related Information

Creating Backups [page 114]Recovering SAP HANA Databases with Dynamic Tiering [page 118]SAP HANA Administration GuideSAP HANA Security Guide

4.3.2.2 Disable Data Volume Encryption in an Existing SAP HANA System with Dynamic Tiering

If your SAP HANA and dynamic tiering system is encrypted and you need to decrypt it, the process requires a full data backup and recovery, as well as disabling data volume encryption.

Context

See the following for more information:

● SAP HANA Backup and SAP HANA Recovery in the SAP HANA Administration Guide for the procedures to back up and restore an SAP HANA database

● Backup and Recovery for Dynamic Tiering in this guide for instructions specific to dynamic tiering● Disable Data Volume Encryption in an Existing SAP HANA System in theSAP HANA Administration Guide

Procedure

1. Perform a data backup of both SAP HANA and the extended store.2. Using SQL, execute the DROP EXTENDED STORAGE CASCADE statement to drop the extended store and

all its associated objects.3. Disable data volume encryption for the HANA database by executing the following SQL statements:

ALTER SYSTEM PERSISTENCE ENCRYPTION OFF;

ALTER SYSTEM SAVEPOINT;

Encryption is now deactivated. Data starts being decrypted in the background. Depending on the size of the SAP HANA system, this process can be very time consuming. Only after this process has completed is

SAP HANA Dynamic Tiering: Administration GuideSecurity Administration P U B L I C 141

Page 142: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

all your data unencrypted. You can monitor the progress of decryption service by service. Once decryption of a data volume has completed, the status changes to Unencrypted.

4. Recover your system from the full data backup you performed of both SAP HANA and the extended store. A full recovery re-creates your extended store even though you dropped it before disabling data volume encryption.

Related Information

Creating Backups [page 114]Recovering SAP HANA Databases with Dynamic Tiering [page 118]SAP HANA Administration GuideSAP HANA Security Guide

142 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Security Administration

Page 143: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

5 Using Dynamic Tiering with Multitenant Databases

SAP HANA dynamic tiering is supported in a multitenant database container SAP HANA system.

Use SAP HANA dynamic tiering with any tenant database. Each tenant database using SAP HANA dynamic tiering requires its own dedicated dynamic tiering worker, but not a dedicated (optional) standby host.

SAP HANA dynamic tiering only supports low tenant isolation. Any attempt to provision the dynamic tiering service (esserver) to a tenant database in a new installation with high-level tenant isolation will fail. If you raise the isolation level too high for an existing installation, the dynamic tiering service stops working. To lower the isolation level , see Decrease the System Isolation Level in the SAP HANA Administration Guide.

The concepts and tasks presented in this section focus on installing and configuring SAP HANA dynamic tiering on an existing multitenant database container SAP HANA system. Refer to the SAP HANA Server Installation and Update Guide and SAP HANA Administration Guide to create and configure the multitenant database container system, then use this guide to configure SAP HANA dynamic tiering on the tenant database.

For an existing SAP HANA system with SAP HANA dynamic tiering recently converted to a multi-container system, see Converted Multitenant Containers Using Dynamic Tiering.

The workflow to configure a multitenant database container SAP HANA system to use SAP HANA dynamic tiering is:

1. Verify that the SAP HANA multitenant database system is installed and running without errors. Ensure that all tenant databases can be accessed and managed by SAP HANA Cockpit.

2. Install SAP HANA dynamic tiering on a multitenant database container SAP HANA system.3. Add the dedicated SAP HANA dynamic tiering worker and (optional) standby hosts.4. Provision the SAP HANA dynamic tiering service (esserver) to the tenant database.5. Create extended storage on the tenant database.6. Repeat steps 3 [page 143] through 5 [page 143] for each tenant database to use SAP HANA dynamic

tiering.

In this section:

Verify Configuration of the SAP HANA Core System [page 144]Before configuring an SAP HANA system to use dynamic tiering in a multi-container environment, verify that the core system is correctly configured.

Adding the Dynamic Tiering Host to a Multitenant Database System [page 146]Adding the SAP HANA dynamic tiering worker and standby hosts to a multitenant database system uses the same process as adding a host to a single-host SAP HANA system.

Prepare the Tenant Database Resources for Dynamic Tiering [page 146]You modify properties in the global.ini file to prepare resources on each tenant database to support SAP HANA dynamic tiering.

Provision the Dynamic Tiering Service to a Tenant Database [page 148]

SAP HANA Dynamic Tiering: Administration GuideUsing Dynamic Tiering with Multitenant Databases P U B L I C 143

Page 144: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

To use SAP HANA dynamic tiering with a tenant database, assign the dynamic tiering service (esserver) to the tenant database.

Failing Over with Multitenant Databases [page 149]Automatic and manual failover is supported with tenant databases.

Create Extended Storage on the Tenant Database [page 149]You create extended storage on the tenant database as you would on a single-host system

Remove Dynamic Tiering from a Tenant Database [page 150]Unassign the esserver service from a tenant database when it no longer requires dynamic tiering.

Converting Multitenant Database Containers Using Dynamic Tiering [page 151]When you migrate a single database SAP HANA system that has SAP HANA dynamic tiering installed to a multitenant database container, the container continues to support dynamic tiering.

Using Multitenant Databases with Same Host Deployment [page 151]You can use dynamic tiering with multitenant databases in a same host deployment.

Related Information

SAP HANA Dynamic Tiering: Installation and Update GuideSAP HANA Server and Update Installation Guide SAP HANA Administration Guide

5.1 Verify Configuration of the SAP HANA Core System

Before configuring an SAP HANA system to use dynamic tiering in a multi-container environment, verify that the core system is correctly configured.

This includes verifying:

● The tenant databases to use dynamic tiering exist.● You can access each tenant database using SAP HANA Cockpit.

In this section:

Verify That Tenant Databases Exist [page 145]A tenant database must exist before you can provision it to use dynamic tiering.

Verifying SAP HANA Cockpit Access [page 145]In a multi-container environment, make sure each tenant database appears as a registered resource in SAP HANA cockpit.

144 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Using Dynamic Tiering with Multitenant Databases

Page 145: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

5.1.1 Verify That Tenant Databases Exist

A tenant database must exist before you can provision it to use dynamic tiering.

Prerequisites

You have the system privilege DATABASE ADMIN.

Procedure

1. Open the SQL console and connect to the SYSTEMDB.2. Execute:

SELECT * from m_databases

Results

A list of tenant databases is returned. If the database to use dynamic tiering is not listed, see Managing Multitenant Database Containers in the SAP HANA Administration Guide before continuing.

Related Information

SAP HANA Administration Guide

5.1.2 Verifying SAP HANA Cockpit Access

In a multi-container environment, make sure each tenant database appears as a registered resource in SAP HANA cockpit.

Use Cockpit Manager to register any missing tenant databases. See Using the Cockpit Manager in the SAP HANA Administration Guide.

See SAP HANA Administration Tools > SAP HANA Cockpit in the SAP HANA Administration Guide for details on starting SAP HANA cockpit.

SAP HANA Dynamic Tiering: Administration GuideUsing Dynamic Tiering with Multitenant Databases P U B L I C 145

Page 146: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Related Information

SAP HANA Administration Guide

5.2 Adding the Dynamic Tiering Host to a Multitenant Database System

Adding the SAP HANA dynamic tiering worker and standby hosts to a multitenant database system uses the same process as adding a host to a single-host SAP HANA system.

When you add the SAP HANA dynamic tiering worker host, the dynamic tiering service (esserver) runs in utility mode. The service is only visible to the SYSTEMDB. You provision the service to a specific tenant database, making it visible to the tenant database, but invisible to SYSTEMDB. When you add the (optional) standby host, you do not provision it to a tenant database. It remains assigned to the SYSTEMDB, running in standby mode.

The same SAP HANA dynamic tiering worker host cannot be provisioned to multiple tenant databases.

Related Information

SAP HANA Dynamic Tiering: Installation and Update Guide

5.3 Prepare the Tenant Database Resources for Dynamic Tiering

You modify properties in the global.ini file to prepare resources on each tenant database to support SAP HANA dynamic tiering.

Context

The customizable_functionalities property controls whether the tenant database can use SAP HANA dynamic tiering. It is enabled (true), by default, but SAP recommends that you verify this setting before proceeding.

In a multitenant database container SAP HANA system using dynamic tiering, the paths for datavolumes_es and logvolumes_es can be unique for each tenant database. These values, which are defined during installation of SAP HANA dynamic tiering, are used as default values for each tenant database. You manually modify these values on each tenant database to use dynamic tiering to make them unique. The path specified

146 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Using Dynamic Tiering with Multitenant Databases

Page 147: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

need not exist when defining the value, but it must exist before you attempt to create extended storage for the tenant. The extended storage create process fails if the specified path cannot be found.

Perform these preparation tasks for each tenant database on which you plan to use SAP HANA dynamic tiering.

Prepare Resources Using SAP HANA Studio

Context

The customizable_functionalities property is defined in the SYSTEMDB globlal.ini file at the system level.

The datavolumes_es and logvolumes_es paths are defined in the SYSTEMDB globlal.ini file at the system level, but are applied at the database level. When set, a diamond appears in the database column. The values are visible in the global.ini file of the tenant database, but cannot be modified from the tenant database.

Procedure

1. In the SAP HANA studio Administration console, logged on as the SYSTEM user, double-click SYSTEMDB in the Systems panel, and then select the Configuration tab.

2. Expand global.ini customizable_functionalities .3. Verify that the dynamic_tiering property is set to true. If set to false, double-click

dynamic_tiering, enter a value of true, and click Save.

4. Expand global.ini persistence .5. Double-click basepath_datavolumes_es.6. Click within the Databases field, select the database name, and click OK.7. Enter a unique path available to both the SAP HANA and dynamic tiering hosts, and click Save.

A diamond appears in the database column. To review the setting, repeat steps 5 and 6.8. Double-click basepath_logvolumes_es.9. Click within the Databases field, select the database name, and click OK.10. Enter a unique path available to both the SAP HANA and dynamic tiering hosts, and click Save.

Prepare Resources Using SQL

Procedure

1. In a SQL console, connect to the SYSTEMDB as a user with the DATABASE ADMIN privilege.

SAP HANA Dynamic Tiering: Administration GuideUsing Dynamic Tiering with Multitenant Databases P U B L I C 147

Page 148: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

2. Execute the ALTER SYSTEM ALTER CONFIGURATION statement to configure the tenant database can use dynamic tiering

ALTER SYSTEM ALTER CONFIGURATION ( 'global.ini', 'SYSTEM' ) SET( 'customizable_functionalities', 'dynamic_tiering' ) = 'true'

3. Execute the ALTER SYSTEM ALTER CONFIGURATION statement to change the base path for data_es and log_es volumes. The paths must be unique for each tenant database and available to the SAP HANA and dynamic tiering hosts. Use the syntax:

ALTER SYSTEM ALTER CONFIGURATION ( 'global.ini', 'DATABASE' , '<database_name>' ) SET( 'persistence', 'basepath_datavolumes_es') = '<path_basepath_datavolumes_es>' WITH RECONFIGURE ALTER SYSTEM ALTER CONFIGURATION ( 'global.ini', 'DATABASE' , '<database_name>' ) SET( 'persistence', 'basepath_logdatavolumes_es') = '<path_basepath_logvolumes_es>' WITH RECONFIGURE

5.4 Provision the Dynamic Tiering Service to a Tenant Database

To use SAP HANA dynamic tiering with a tenant database, assign the dynamic tiering service (esserver) to the tenant database.

Context

Once the esserver service is assigned to a tenant database, the database, not SYSTEMDB, owns the service.

Procedure

1. In a SQL console, connect to the SYSTEMDB as a user with the DATABASE ADMIN privilege.2. Execute the following ALTER DATABASE statement:

ALTER DATABASE <database_name> ADD 'esserver' [ AT [ LOCATION] '<tiering_hostname>[:<port_number> ]' ]

The host and port information is that of the SAP HANA dynamic tiering host. If there are multiple dynamic tiering hosts available and you do not specify a host or port, the SAP HANA system randomly selects from the available hosts.

148 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Using Dynamic Tiering with Multitenant Databases

Page 149: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

5.5 Failing Over with Multitenant Databases

Automatic and manual failover is supported with tenant databases.

Unlike with the dynamic tiering worker host, you do not provision the dynamic tiering standby host to a specific tenant. You leave it assigned to the SYSTEMDB, with the dynamic tiering service (esserver) running in standby mode.

In the event of a worker host failure, one of the following occurs:

Failover Type Behavior

Automatic From the SYSTEMDB, the SAP HANA system selects the first available dynamic tiering standby host assigned to the same failover group as the failed dynamic tiering worker host, and provi­sions it to the tenant database. The failed dynamic tiering worker host is then removed from the tenant database and returned to the SYSTEMDB with a status of standby.

Manual You execute the same SQL syntax to replace the failed dynamic tiering worker host with a spe­cific dynamic tiering standby host as with a single-host SAP HANA system.

Related Information

Manual Failover to Dynamic Tiering Standby Host [page 124]

5.6 Create Extended Storage on the Tenant Database

You create extended storage on the tenant database as you would on a single-host system

Prerequisites

The path specified under global.ini persistence for the basepath_datavolumes_es and basepath_logvolumes_es parameters for the tenant database exists.

Context

Each tenant database has its own extended storage.

SAP HANA Dynamic Tiering: Administration GuideUsing Dynamic Tiering with Multitenant Databases P U B L I C 149

Page 150: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Procedure

1. Log on to the tenant database as a user with the EXTENDED STORAGE ADMIN privilege role.2. Refer to the SAP HANA Dynamic Tiering: Administration Guide for details on creating extended storage.

Related Information

SAP HANA Dynamic Tiering: Administration Guide

5.7 Remove Dynamic Tiering from a Tenant Database

Unassign the esserver service from a tenant database when it no longer requires dynamic tiering.

Context

Unassigning the esserver service from the tenant database returns the service to utility mode on the SAP HANA dynamic tiering host, and returns ownership to the SYSTEMDB. The service is then available for assignment to another tenant database.

Procedure

1. Open a SQL console and connect to the tenant database as a user with the EXTENDED STORAGE ADMIN privilege.

2. Execute the following DROP EXTENDED STORAGE statement:

DROP EXTENDED STORAGE [CASCADE | RESTRICT]

3. In a SQL console, connect to the SYSTEMDB as a user with the DATABASE ADMIN privilege.4. Execute the following ALTER DATABASE statement, where the host and port information is that of the SAP

HANA dynamic tiering host provisioned to the database:

ALTER DATABASE <database_name> REMOVE 'esserver' AT [ LOCATION ] '<hostname>[:<port_number> ]'

150 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Using Dynamic Tiering with Multitenant Databases

Page 151: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

5.8 Converting Multitenant Database Containers Using Dynamic Tiering

When you migrate a single database SAP HANA system that has SAP HANA dynamic tiering installed to a multitenant database container, the container continues to support dynamic tiering.

After conversion, the original database becomes the first tenant. Conversion automatically provisions the SAP HANA dynamic tiering service (esserver) to the first tenant database.

To configure new tenant databases, follow the workflow outlined in Using Dynamic Tiering with Multitenant Databases [page 143].

Related Information

Using Dynamic Tiering with Multitenant Databases [page 143]SAP HANA Administration Guide

5.9 Using Multitenant Databases with Same Host Deployment

You can use dynamic tiering with multitenant databases in a same host deployment.

NoteAll functional restrictions pertaining to a same host deployment apply to using multitenant databases in a same host deployment. See Installing Same Host Deployment in the SAP HANA Dynamic Tiering: Installation and Update Guide.

If the tenant databases to use dynamic tiering reside on the same host as SAP HANA, only one of the tenants can use the dynamic tiering esserver service running on the SAP HANA host. Each remaining tenant database using dynamic tiering must use its own dedicated host for the esserver service. For example, tenant databases DB1 and DB2 reside on SAP HANA Host1. If you wanted to configure these tenants to use dynamic tiering, you would require a second host, Host2. You would then provision the esserver service on Host1 to DB1 and the esserver service on Host2 to DB2.

If the tenant databases using dynamic tiering reside on different hosts than the SAP HANA host, each tenant can use the same esserver service on the SAP HANA host. For example, tenant databases DB3 and DB4 reside on Host3 and Host4, respectively. SAP HANA and the esserver reside on Host1. You would provision the same esserver service on Host1 to DB3 on Host3 and DB4 on Host4.

SAP HANA Dynamic Tiering: Administration GuideUsing Dynamic Tiering with Multitenant Databases P U B L I C 151

Page 152: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

6 Troubleshooting

Familiarize yourself with troubleshooting tools and tracing features of SAP HANA dynamic tiering. Use this section as a reference to identify and resolve configuration and operation issues.

In this section:

Tools and Tracing [page 152]This section gives you an overview of tools and tracing options for dynamic tiering troubleshooting.

Configuration Issues [page 154]Use this section to identify and resolve issues for extended storage configuration and internal communications with the SAP HANA host.

Operational Issues [page 156]Use this section to identify and resolve issues with dynamic tiering transactions, backup, and recovery.

6.1 Tools and Tracing

This section gives you an overview of tools and tracing options for dynamic tiering troubleshooting.

In this section:

Dynamic Tiering Administration User [page 152]SAP HANA dynamic tiering supports an administration user to help troubleshoot issues on the dynamic tiering host.

Dynamic Tiering Stack File [page 153]When the landscape has dynamic tiering installed, a full system dump includes the stack of the esserver process.

Sample Query Plan Showing Dynamic Tiering [page 153]You can use the plan visualizer to analyze query plans in systems with dynamic tiering.

6.1.1 Dynamic Tiering Administration User

SAP HANA dynamic tiering supports an administration user to help troubleshoot issues on the dynamic tiering host.

Always perform troubleshooting with this user under the guidance of the SAP support team and remove this user after troubleshooting.

Execution of these statements requires the EXTENDED STORAGE ADMIN system privilege.

152 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Troubleshooting

Page 153: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

To create the user, run this SQL statement:

ALTER EXTENDED STORAGE CREATE ADMIN USER ES_ADMIN PASSWORD admin123 FORCE PASSWORD CHANGE OFF

To remove the user, run this SQL statement:

ALTER EXTENDED STORAGE DROP ADMIN USER ES_ADMIN

6.1.2 Dynamic Tiering Stack File

When the landscape has dynamic tiering installed, a full system dump includes the stack of the esserver process.

The stack file esserverinfo.txt file is included in the .gzip file generated for the system dump by SAP HANA Studio under:

HDB<instance_no>/<hostname>/trace/ where <hostname> is the dynamic tiering host.

6.1.3 Sample Query Plan Showing Dynamic Tiering

You can use the plan visualizer to analyze query plans in systems with dynamic tiering.

Analysis of the following query is visualized in the figure below:

Sample Code

select count(*) from tpcds.store_sales,tpcds.store_returns,tpcds.web_sales, tpcds.web_returns,tpcds.promotion, tpcds.date_dim pdatewhere p_promo_name in ('ought', 'able','pri')and pdate.d_year in (2000,2001)and pdate.d_date_sk between p_start_date_sk and p_end_date_skand p_promo_sk=ss_promo_skand p_promo_sk=ws_promo_skand ss_ticket_number = sr_ticket_numberand ws_order_number = wr_order_number

SAP HANA Dynamic Tiering: Administration GuideTroubleshooting P U B L I C 153

Page 154: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Figure 4: Plan Visualization Fragment

6.2 Configuration Issues

Use this section to identify and resolve issues for extended storage configuration and internal communications with the SAP HANA host.

In this section:

Cannot Create Extended Storage Configuration [page 154]Issue: Creation of extended storage from the SAP HANA cockpit Dynamic Tiering Configuration wizard fails if a previous attempt failed.

Cannot Communicate with SAP HANA Host [page 155]Issue: Problems with internal communications may prevent communication with the SAP HANA host.

6.2.1 Cannot Create Extended Storage Configuration

Issue: Creation of extended storage from the SAP HANA cockpit Dynamic Tiering Configuration wizard fails if a previous attempt failed.

An error message like the following appears:

ES config create failed: Configuration is already running

154 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Troubleshooting

Page 155: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

This error is valid when multiple users try to create extended storage at the same time. However, if the error occurs after the failure of a previous attempt to create extended storage, perform the following steps.

Solution:

In the SAP HANA studio or another SQL tool, enter:

SELECT * FROM "SAP_HANA_TIERING"."sap.hana.tiering.data::HDT_VALUES"

If you see an entry with DT_CONFIG and status RUNNING, run this SQL command:

DELETE FROM "SAP_HANA_TIERING"."sap.hana.tiering.data::HDT_VALUES"

Return to the SAP HANA cockpit, click the Dynamic Tiering Configuration tile, and retry creating the configuration.

6.2.2 Cannot Communicate with SAP HANA Host

Issue: Problems with internal communications may prevent communication with the SAP HANA host.

Solution:

Internal communications between the SAP HANA dynamic tiering host and the SAP HANA database are secured by the SSL protocol and certificate mutual authentication.

Follow the instructions in this topic to resolve issues.

Sample Connectivity Error

ALTER TABLE "DT_SCHEMA"."TAB_A" USING EXTENDED STORAGE

The indexserver trace shows following error:

[4863]{207439}[95/10731633] 2015-05-06 17:50:26.455132 e FedTrace odbcaccess.cpp(03672) : ODBC error: connected: 1 state: HY000 code: -656 [SAP][ODBC Driver]Unable to connect to server 'HANA': [SAP AG][LIBODBCHDB SO][HDBODBC] General error;1033 error while parsing protocol

This error indicates the dynamic tiering host could not communicate with SAP HANA to fetch the contents of the table required for the conversion.

Enable Traces

Collect the required traces and contact SAP Support to resolve the communication problem. Enable these traces before running the ALTER TABLE statement again:

ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini','SYSTEM') SET ( 'authentication','SapLogonTicketTrace' ) = 'true' WITH RECONFIGURE;ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini','SYSTEM') SET ('trace','saptracelevel')='3' WITH RECONFIGURE;ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini','SYSTEM') SET ('trace','authentication')='debug' WITH RECONFIGURE;ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini','SYSTEM') SET ('trace','crypto')='debug' WITH RECONFIGURE;

Check for Different Certificate Sizes

SAP HANA Dynamic Tiering: Administration GuideTroubleshooting P U B L I C 155

Page 156: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Certificate sizes on the SAP HANA host and dynamic tiering host should be the same. Different certificate sizes indicate an inconsistency in the certificates that could lead to connection problems. Compare the certificate sizes.

On the dynamic tiering host, log in as SIDadm and execute these commands:

1. cdglo2. cd security/rsecssfs/data3. ls -al sap_system_pki_instance.*

Note the file sizes. The file sizes should match those on the SAP HANA host.

On the SAP HANA host, log in as SIDadm and execute these commands:

1. cdhdb2. cd $SECUDIR 3. ls -al sap_system_pki_instance.*

Note the file sizes. These sizes should match those on the dynamic tiering host.

NoteFor these certificates to work correctly, the clocks on the SAP HANA and dynamic tiering hosts must be synchronized. To ensure that the clocks are synchronized, run the date command on each host.

6.3 Operational Issues

Use this section to identify and resolve issues with dynamic tiering transactions, backup, and recovery.

In this section:

Cannot Create Extended Store Table with Delta Enabled [page 157]Issue: Creating an extended store table with the DELTA ENABLED parameter fails because the store isn't delta enabled.

Importing an Extended Table into HANA Without Dynamic Tiering Returns Error [page 157]Issue: When you import an extended table into an SAP HANA system with no dynamic tiering configured, you receive an error and the import fails because SAP HANA dynamic tiering does not exist on the system where you are importing the table.

Dynamic Tiering Operations Moving Large Amounts of Data Fail [page 158]Issue: dynamic tiering operations that move a lot of data fail with an error if executing the operation exhausts all large memory used to stage extended tables.

Out of Space Errors for Delta Dbspace [page 158]Issue: Certain transactions, such as bulk loads, may run longer than expected for their workload.

Query Returns "You have run out of space in <DBSPACE_NAME> DBSpace" Error [page 159]Issue: A query that involves an extended storage object can fail with the error "[SAP][ODBC Driver]You have run out of space in <DBSPACE_NAME> DBSpace."

Writing Date or Time Data to Extended Storage Violates Unique Constraint [page 160]

156 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Troubleshooting

Page 157: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Issue: When writing date- or time-related data to an extended table, you receive an error indicating a unique constraint has been violated.

Point-in-Time Recovery Leaves Dynamic Tiering Service in Utility Mode [page 160]Issue: An issue may occur on systems with SAP HANA dynamic tiering option installed when performing a point-in-time recovery from a backup where dynamic tiering was not installed.

Point-in-Time Recovery After Dropping Database Results in Error [page 160]Issue: An error message may display in a point-in-time recovery if you do not clear the logs after dropping the database.

6.3.1 Cannot Create Extended Store Table with Delta Enabled

Issue: Creating an extended store table with the DELTA ENABLED parameter fails because the store isn't delta enabled.

An error message like the following appears:

[SAP][ODBC Driver]Cannot enable RLV storage for table '<table name>'. An RLV dbspace does not exist.

Solution:

Specify DELTA ENABLED when creating extended storage before you can use the DELTA ENABLED parameter to create an extended store table.

NoteOnce you create extended storage, you cannot change the delta option setting.

6.3.2 Importing an Extended Table into HANA Without Dynamic Tiering Returns Error

Issue: When you import an extended table into an SAP HANA system with no dynamic tiering configured, you receive an error and the import fails because SAP HANA dynamic tiering does not exist on the system where you are importing the table.

An error like the following appears:

SAP DBTech JDBC: [2048]: column store error: table import failed: [30111] Import failed (could not execute create statement);object=SAPKIT:/BI0/B0054680000en,invalid data source name: __esstore$ at ptime/query/checker/check_table.cc:321

However, you can import the table as a row table in order to preserve its data. Use the enable_convert_es_to_row_tables parameter.

Solution:

SAP HANA Dynamic Tiering: Administration GuideTroubleshooting P U B L I C 157

Page 158: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Import the extended table as a row table:

ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini', 'SYSTEM') SET ('import_export', 'enable_convert_es_to_row_tables') = 'true' WITH RECONFIGURE;

6.3.3 Dynamic Tiering Operations Moving Large Amounts of Data Fail

Issue: dynamic tiering operations that move a lot of data fail with an error if executing the operation exhausts all large memory used to stage extended tables.

An error message like the following appears:

All large memory has been used, allocation canceled

This occurs if the system has insufficient memory for the operation, or other processes running on the system are utilizing large amounts of it, leaving insufficient available for the dynamic tiering operation.

Such operations include converting tables to extended tables, loading tables using the IMPORT command, performing large bulk inserts into extended tables, or altering an extremely large extended table to DELTA ENABLED, into delta extended table.

Solution:

In the esserver.ini file, in the Startup section, increase the value of the load_memory_mb parameter and restart the esserver service.

6.3.4 Out of Space Errors for Delta Dbspace

Issue: Certain transactions, such as bulk loads, may run longer than expected for their workload.

Check the logs for an error like the following, which indicates a snapshot versioning issue with a dynamic tiering transaction:

(rv_PersistenceException); SQLCode: -1009170, SQLState: 'QSB66', Severity: 14 esserver_cj7635.12345.004.trc:[00014]{0000030233}[-1/-1] 2015-04-13 19:20:46.037921 i esserver UNKNOWN(0) : [20223]: You have run out of space in ES_DELTA DBSpace.

Long-running transactions may cause dynamic tiering to run out of space, but do not trigger SAP HANA Alerts 73, 74, or 75.

Solution:

1. Identify the statement and connection that cause the issue.Example:Run the following statement in the SAP HANA SQL console:SELECT * FROM SYS.M_TRANS_TOKENS WHERE ES_SNAPSHOT_COUNT > 0 ORDER BY ES_SNAPSHOTSOutput column ES_SNAPSHOTS returns two values. The first value, 1024, is the volume ID for extended storage. The second value, 911322, identifies the extended storage snapshot. The column

158 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Troubleshooting

Page 159: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

LOGICAL_CONNECTION_ID holds the connection identifier of the blocked transaction. If the query returns multiple rows, choose the oldest running dynamic tiering transaction.For the purposes of this example, the table only shows selected columns from the results of the select statement.

HOST PORT TRANSAC­TION_ID

LOGICAL_CON­NECTION_ID

ES_SNAP­SHOT_COUNT

ES_SNAPSHOT

hostDT4a 20,010 58 301,456 1 (1024,911322)

2. To kill the blocking connection, use:ALTER SYSTEM DISCONNECT SESSION 'CONNECTION_ID' where <CONNECTION_ID> is the value in the LOGICAL_CONNECTION_ID column.

In this example, corrective action is to kill long running transactions. It is also possible that the user might have actually run out of space, and you must add more dbspace or additional dbfiles.

6.3.5 Query Returns "You have run out of space in <DBSPACE_NAME> DBSpace" Error

Issue: A query that involves an extended storage object can fail with the error "[SAP][ODBC Driver]You have run out of space in <DBSPACE_NAME> DBSpace."

The <DBSPACE_NAME> identifies which dbspace is out of memory. You can query the complete list of configured dbspaces in the M_ES_DBSPACES monitoring view, or using the SAP HANA cockpit. For a list of dbspaces created by default, see Types of Dbspaces.

This error occurs if one of the dbspaces is full and requires you to allocate additional space in order to complete a failed query or action.

Solution:

Identify the dbspace that requires additional space, then add one or more files to that dbspace file, as described in Add a Dbspace File, or enlarge a dbspace file, as described in Enlarge a Dbspace File, in the SAP HANA Dynamic Tiering: Administration Guide.

NoteIf the dbspace name in the error message does not exactly correlate with names shown, you can reliably identify the correct dbspace by checking the name and type. For example the name of the main system dbspace contains “SYSTEM_MAIN.”

Related Information

Types of Dbspaces [page 40]Enlarge a Dbspace File [page 43]

SAP HANA Dynamic Tiering: Administration GuideTroubleshooting P U B L I C 159

Page 160: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

6.3.6 Writing Date or Time Data to Extended Storage Violates Unique Constraint

Issue: When writing date- or time-related data to an extended table, you receive an error indicating a unique constraint has been violated.

Solution:

In your SAP HANA data, use NULL instead of EMPTY.

For date and time data types, SAP HANA supports a special EMPTY value that is distinct from NULL. SAP HANA dynamic tiering does not support the EMPTY value.

6.3.7 Point-in-Time Recovery Leaves Dynamic Tiering Service in Utility Mode

Issue: An issue may occur on systems with SAP HANA dynamic tiering option installed when performing a point-in-time recovery from a backup where dynamic tiering was not installed.

1. Install an SAP HANA system and set up a database.2. Perform a full database backup.3. Add the dynamic tiering service, and provision the dynamic tiering service to a database.4. Recover the database from an early full backup without using the delta backup option.

When recovery completes, the dynamic tiering service runs in utility mode.

Solution: Perform a full database backup after adding the dynamic tiering service to the HANA system to allow the recovery of the database to work properly.

Perform a full database backup after adding the dynamic tiering service to the HANA system to allow the recovery of the database to work properly.

The section Create Extended Storage advises a full backup immediately after you create extended storage.

If a full database backup is not performed after adding the dynamic tiering service to the HANA system, and the dynamic tiering service is running in utility mode, re-provision the dynamic tiering service to the database to resolve the issue.

6.3.8 Point-in-Time Recovery After Dropping Database Results in Error

Issue: An error message may display in a point-in-time recovery if you do not clear the logs after dropping the database.

1. You create extended storage (either cleartext or encrypted).2. You take a complete data backup.3. You take a delta backup.

160 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Troubleshooting

Page 161: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

4. You drop extended storage.5. You recover using the complete data backup (from step 2).6. A recovery error message displays:

Output Code

ERROR RECOVERY RECOVER DATA finished with error: [448] recovery could not be completed, volume 1024, reached log position 0, [110025] BackupExecutor: Unable to obtain Max recoverable log position for Extended Storage. [SAP][ODBC Driver]Error backing up existing log area. Found '0' logs in '/data/HANA_CK2/es_log/mnt00001/es/txnlog' directory (1)

Solution: Dropping extended storage makes the log area unusable. You must initialize the log area.

In a point-in-time recovery after dropping the database, you must either use the CLEAR LOG option in the RECOVER DATABASE SQL statement, or enable the Initialize Log Area option from SAP HANA Studio or SAP HANA Cockpit.

SAP HANA Dynamic Tiering: Administration GuideTroubleshooting P U B L I C 161

Page 162: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

7 Glossary

This glossary describes many commonly used technical terms for the SAP HANA dynamic tiering option.

Term Description

Cold data Data stored on-disk.

Column store Contains in-memory HANA tables.

Column-store table A HANA table kept in (or that resides in) memory.

Dbspace A logical name for a container of files or raw partitions within extended storage.

Default store For dynamic tiering, refers to the HANA column store. For multistore tables, con­tains in-memory column store partitions.

Delta For dynamic tiering, refers to row-level versioning.

Delta merge A process that transforms delta storage data into a format optimized for read performance and memory consumption, and transfers it to main storage.

Delta store For dynamic tiering, write-optimized, in-memory store that works with the ex­tended store. Delta stores use row-level versioning to allow concurrent table changes by multiple users without transaction lock waits.

esserver The name of the dynamic tiering service.

Extended storage Contains on-disk dynamic tiering extended tables.

Extended table A dynamic tiering table kept on (or that resides on) disk.

hdbesserver The executable for esserver.

Hot data Data stored in memory.

Hot store HANA column store in multistore.

Import You can import catalog objects (tables, views, synonyms, sequences, proce­dures) that have previously been exported from dynamic tiering by using the IM­PORT statement.

This differs from the IMPORT FROM statement, which imports external data from a CSV file into an existing extended store table.

Main storage The part of the column store that contains the main part of the data, compressed and optimized for read access.

162 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Glossary

Page 163: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

Term Description

Multistore table A type of HANA table. At least two partitions, one of which resides in default stor­age, and one in extended storage.

Row-level versioning (RLV) Allows more than one user to modify the same table concurrently.

Warm storage Data stored on disk.

SAP HANA Dynamic Tiering: Administration GuideGlossary P U B L I C 163

Page 164: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

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).

164 P U B L I CSAP HANA Dynamic Tiering: Administration Guide

Important Disclaimers and Legal Information

Page 165: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

SAP HANA Dynamic Tiering: Administration GuideImportant Disclaimers and Legal Information P U B L I C 165

Page 166: SAP HANA Dynamic Tiering: Administration Guide · 1 SAP HANA Dynamic Tiering Administration Guide ... 5 Using Dynamic Tiering with Multitenant Databases ... System privilege EXTENDED

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.