last updated: 2024-02-01
Introduction
There is huge knowledge available about SAP HANA reclaim / shrink / defragmentation topic, but the knowledge is very fragmented (Help Portal, Blog post, SAP KBA, SAP Note, other). In order to simply and make content consumption easier I have created a centralized page, a single source of the available information regarding SAP HANA persistence. Further I would like to help you with shrinking exercise in SAP HANA, express edition to demonstrate the process.
Table of Content (The internal links had been removed cause the new blogging platform only supports basic html, and the use of anchor links not supported.)
Prerequisites
Background
During the exercises I will use test database SFLIGHT. More information can be find:
SAP HANA, express edition and SFLIGHT demo database, modeling – Complete Tutorial
The SFLIGHT schema is in the Catalog folder.
Exercise
The actual fragmentation can be identified with the following SQL Statement: "HANA_Disks_Overview".
In production system the fragmentation (~30%) is accepted, should not do reclaim. It will be defragmented to demonstrate the process (test system).
ALTER SYSTEM RECLAIM DATAVOLUME 120 DEFRAGMENT;
The following values (all) had been decreased: TOTAL_GB, UNUSED_GB, FRAG_PCT.
❗Best Practice: the RECLAIM process can be scheduled when the system load is minimal.
"When RECLAIM is run in parallel to production load and modifications there is a certain risk of significant runtime overhead depending on the used SAP HANA Revision level:"
Conclusion
Free up space on DISK level is an easy task in case of SAP HANA. First, we need to identify if there is unused disk space available. When the unused space and the fragmentation details shows we can do the defragmentation. From SAP HANA 2.0 SPS06 this feature had been automated.
Task 2. – Documentation Library
IMPORTANT !
=================================================================
Where to find documentations in SAP Help Portal?
Which is the master SAP Knowledge Base Article of the SAP HANA persistence?
=================================================================
When (in general) and after what action, the fragmentation needs to be checked?
❗Note: To check the data management activity from DISK perspective that is a good practice to run the "HANA_Disks_Overview" report before and after the activity. Compare the numbers especially the fragmentation. After the delete/archive activity the USED_GB will decrease, the UNUSED_GB will increase, the FRAG_PCT will also increase in general. Probably the fragmentation now shows significant number (higher than accepted value). These indicators shows that reclaim can be executed.
Which other documentation is important in context of monitoring SAP HANA persistence?
Which other documentation is important regarding SAP HANA reclaim / shrink / defragmentation topic?
Which SAP HANA Alert IDs belongs to the topic?
What are the available tools for defragmentation?
The general way to do defragmentation is to use SQL commands. The action can be done in the following way also.
SAP HANA Academy video explains the reclaim process via SAP HANA Cockpit.
<VIDEO REMOVED from YOUTUBE because SAP HANA Academy channel stopped, video needs to be replaced with new URL when it is available>
What is the typical scenario after data deletion?
What are the known issues?
What blog posts can be helpful?
Other articles in this series
✍️ Collected information about memory in context of SAP HANA
✍️ Collected information regarding partitioning in SAP HANA (with examples)
✍️ Collected information regarding High Availability and Disaster Recovery in SAP HANA
Other articles in connected series
✍️ Where can I find knowledge and information belongs to SAP HANA?
✍️ Where can I find information about the available tools for SAP HANA (all types of use)?
Useful bookmark
🔖 2872774 – Bookmark of Frequently Asked Questions for SAP HANA
🔖 3311408 – Bookmark of SQL Statement Collection reports for SAP HANA
🔖 2658020 – List of SAP HANA SQL Error Codes
Do you have further questions?
Q&A link for SAP HANA: https://answers.sap.com/tags/73554900100700000996
Contribution
If you find any missing information belongs to the topic, please let me know. I am happy to add the new content. My intention is to maintain the content continuously to keep the info up-to-date.
Release Information
Release Date | Description |
2023.01.16 | First/initial Release of the SAP Blog Post documentation (Technical Article). |
2023.03.11 | Section added: Table of Content |
2024.02.01 | SAP Community 2024 optimized content. |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
17 | |
14 | |
12 | |
10 | |
9 | |
7 | |
7 | |
7 | |
6 | |
6 |