A How-to practical example of installing SAP HANA Dynamic Tiering, creating extended storage, provisioning to a tenant database and creating table using extended storage
1. SAP HANA Dynamic Tiering Test-drive
This is a compilation of notes collected while installing Dynamic Tiering, creating extended
storage, provisioning to a tenant database and creating table using extended storage.
By OZSoft Consulting for ITConductor.com
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 1
Image courtesy blogs.sap.com
2. References
• Dynamic Tiering Option Installation Guide
• Dynamic Tiering Option Administration Guide
• SAP HANA Administration Guide
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 2
3. Introduction
HANA’s multi-temperature data management feature allows data to be classified
and stored in different location, based on access frequency.
• HOT – data is accessed frequently, and resides in HANA memory
• WARM – data is less accessed, and resides in SAP HANA Dynamic Tiering (disk
storage)
• COLD – very low/random access of data and resides in Near-Line Storage.
Dynamic Tiering (DT) option optimizes and reduces HANA memory requirement by
moving less frequently access data (warm) into (DT) disk. Table definition of HOT
and WARM (extended) table are the same, except that the WARM has ‘using
extending storage’ attribute.
In a simple case scenario, older data (e.g. older than 5 years) are stored in Dynamic
Tiering, while newer data, which are still frequently accessed remains in HANA
memory.
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 3
4. Overview/Testing
Overview of using/implementing the Dynamic
Tiering/Extended Storage Feature
1. Installation/adding the host
2. Data Provisioning to a tenant database
3. Creating extended storage
Testing
1. Creating the HOT and WARM tables
2. Moving some data from HOT into WARM tables
3. Creating a view on top of both HOT and WARM tables
4. Accessing data from both HOT and WARM using the view
Some of the steps can be done through HANA Cockpit. In this
document, the steps were done through SQL.
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 4
5. Installation - 1
• Dynamic Tiering and SAP HANA can be installed in the same host (and at the
same time), for small and testing purposes only.
• In this note, Dynamic Tiering is installed (on its own dedicated host) to an
existing SAP HANA system (with several hosts).
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 5
6. Installation - 2
• Current Hosts
• Dynamic Tiering host to be added
ozdtnode1 - slave
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 6
7. Installation - 3
Installation steps
1. Make sure that the /hana shared directory is mounted to the DT node
2. Make sure that saphostagent in the DT node is installed and running
3. Extract the DT SAR file (e.g. /mnt/software/SAP/HANA/Dynamic_Tiering)
4. Logon as root to the master node
5. cd /hana/shared/HDB/hdblcm
6. ./hdblcmgui –
component_dirs=/mnt/software/SAP/HANA/DT/SAP_HANA_DYNAMIC_TIERING
7. Select ‘Install or Update Additional Components
8. Choose Components to be installed
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 7
8. Installation - 4
9. Existing hosts will be displayed
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 8
10. Click on ‘Add host’ and select its role
10. Installation - 6
HANA Studio – overview after DT installation
After the installation, since its not yet ‘provisioned’ to a tenant database,
• It will have status ‘Installed but not yet running’
• Service ‘esserver’ will appear as utility under SYSTEMDB. This service can be
stopped/started through HANA Studio, HANA Cockpit or SQL.
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 10
11. Installation - 7
The newly added Dynamic Tiering node ozdtnode1 is now part of the
Hosts
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 11
In the configuration, section esserver.ini contains parameters for the
extended storage
12. Data Provisioning Dynamic Tiering to Tenant DB
• There is one-to-one relationship between Tenant DB and one DT host,
i.e. one DT can only be assigned to one tenant DB, and vice-versa.
• The tenant DB should be ‘ACTIVE_STATUS=YES’ (select * from
m_databases)
• Import delivery units HANA_TIERING and HDC_TIERING and assign
the roles
• Set SYSTEMDB configuration parameter
‘global.ini’.’customizatble_functionalities’.’dynamic_tiering’ to true, for
SYSTEM.
• From system DB, issue SQL ‘alter database <tenant DB> add ‘esserver’
• If there are more than available esserver, the first available will be
automatically assigned – there is no need to specify
• Once esserver is added to a tenant DB, service ‘esserver’ will
disappear from the SYTEMDB display, but will appear in the tenant DB
display, with ‘utility’
Provisioning to DT to a tenant DB is complete
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 12
13. Create Extended Storage
• From the tenant database, issue the following SQL
‘Create extended storage at ‘<Dynamic Tiering node>’ size <size> KB|MB|GB’
• The ‘size’ allocated is the initial. Additional size can be increased by adding DBSPACE
FILE.
• The SQL will create a new extended storage database, starts it, and registers it as a
SAP HANA server.
• The data (with 4 different dbspaces, and log directory/files will be created in the
shared location.
• Detail are also available from tenant DB’s catalog view M_DBSPACE_FILE
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 13
DBSPACES
14. Creating HOT and WARM tables, and VIEW (1)
In a BW production scenario, period will be used, e.g. move data older than 2
years to WARM tables. In this testing example, value of a column is used as
criteria in moving data from HOT to WARM.
Steps in this exercise are -
(1) copy an existing table TSP06 from schema ‘SAPABA’ to schema/table
W12345.TSP06_HOT
(2) define another table W12345.TSP06_WARM, with the same definition as
the HOT, using extended storage,
(3) create a VIEW joining the HOT and WARM table showing the two tables
are accessed.
(4) move some data from HOT to WARM
(5) Verify that ALL data (from HOT and WARM) are accessible through the
VIEW
(6) Confirm that data are accessed from both HOT and WARM through the
tool ‘Visualize Plan’
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 14
15. Creating HOT and WARM tables, and VIEW (2)
1. Create/copy table SQL from TSP06
‘create column table W12345.TSP06_HOT
like SAPABA.TSP06 with data’
The SQL will copy/create the table definition and also the data (parameter
‘with data’).
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 15
16. Creating HOT and WARM tables, and VIEW (3)
2. Define the WARM table
Generate DDL, click on the top right corner
Change the table name from TSP06_HOT to TSP06_WARM, remove the ‘UNLOAD
and AUTO MERGE’, and append ‘USING EXTENDED STORAGE, then execute
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 16
17. Creating HOT and WARM tables, and VIEW (4)
3. Create a view which joins the HOT and WARM table
CREATE VIEW W12345.TSP06_ALL
AS
SELECT * FROM W12345.TSP06_HOT
UNION
SELECT * FROM W12345.TSP06_WARM
Display the newly created tables and view
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 17
18. Creating HOT and WARM tables, and VIEW (5)
Display number of entries of table TSP06_HOT
Note that TSP06_HOT has 1,547,201 entries
Display grouping/detail of table TSP06_HOT
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 18
19. Creating HOT and WARM tables, and VIEW (6)
a. From the HOT table, copy entries with PDPAER like ‘DINA%’ to WARM
table
insert into W12345.TSP06_WARM
(select * from W12345.TSP06_HOT
where pdpaper like ‘DINA%’)
b. Delete all ’DINA%’ entries from HOT table
delete from TSP06_HOT
where pdpaper like ‘DINA%’
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 19
4. Move some data from HOT to WARM
20. Creating HOT and WARM tables, and VIEW (7)
Verify that all DINA% is not in HOT table anymore
Verify that all DINA% is in WARM table
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 20
21. Creating HOT and WARM tables, and VIEW (8)
Verify that all data can be
retrieved from HOT
and WARM through
the VIEW TSP06_ALL
Verify that total number of
entries matches the
original count (1,547,201)
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 21
22. Creating HOT and WARM tables, and VIEW (9)
Verify tables used, using Visualize Plan tool (a)
Highlight the SQL against TSP06_ALL right-click Visualize
Plan execute
Click on the ‘2’ to show table details
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 22
23. Creating HOT and WARM tables, and VIEW (10)
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 23
Verify tables used,
using Visualize Plan
tool (b) – SIMPLE view
WARM
HOT
24. Creating HOT and WARM tables, and VIEW (11)
An index can be created on the extended table to enhance
performance.
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 24
25. Additional Notes
• Dynamic Tiering can also have a standby host
• When the tenant database is backup, its related extended
storage is also backup at the same time. Data and Extended
storage are also recovered as one. ES Log backup has its own
interval time parameter.
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 25
• Up to SPS12, dynamic tiering is not supported by system
replication – (OSS note 2140959 DT additional information).
Consider special design/architecture in System Replication
scenario.
26. Monitoring/Reporting (1)
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 26
For reporting purposes, there are several
M_ES*table related to extended storage
HANA Studio
27. Monitoring/Reporting (2)
• In addition to SQL commands, Dynamic Tiering tiles are
available in HANA Cockpit for administration and monitoring.
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 27
28. HANA Cockpit - Dynamic Tiering Alert
Alerts on Dynamic Tiering are available in HANA Cockpit
Author: Terry Kempis
Editor: Linh Nguyen
ITConductor.com 28
29. • Any Questions?
• Contact Info:
Linh Nguyen linh.nguyen@itconductor.com
Terry Kempis terry.kempis@itconductor.com
Let
itconductor.com
@itconductor