You are on page 1of 9

A New Home in New Year for SAP Community: Exciting times ahead for the SAP 

Community!
Not yet a member on the new home? Join today and start participating in the discussions!

Read about the migration and join SAP Community Groups!

Ask a Question Write a Blog Post Login / Sign-up

Technical Articles

Laszlo
Thoma
January 16, 2023 | 5 minute read

Collected information about reclaim / shrink / defragmentation


topic in context of SAP HANA persistence (with example)

 0  5  2,995

last updated: 2023-03-11

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

1. Task 1. – Exercise
A. Prerequisites

This siteB. Background


uses cookies and related technologies, as described in our privacy statement, for purposes that may include site
operation,
C. analytics,
Exerciseenhanced user experience, or advertising. You may choose to consent to our use of these
technologies, or manage your own preferences.
D. Conclusion
2. Task 2. – Documentation Library Manage Settings Accept All Reject All
Cookie Statement
A. Where to nd documentations in SAP Help Portal?
B. Which is the master SAP Knowledge Base Article of the SAP HANA persistence?
C. When (in general) and after what action, the fragmentation needs to be checked?
D. Which other documentation is important in context of monitoring SAP HANA persistence?
E. Which other documentation is important regarding SAP HANA reclaim / shrink /
defragmentation topic?
F. Which SAP HANA Alert IDs belongs to the topic?
G. What are the available tools for defragmentation?
H. What is the typical scenario after data deletion?
I. What are the known issues?
J. What blog posts can be helpful?
K. Other articles in this series
L. Other articles in connected series
M. Useful bookmark

Task 1. – Exercise

Prerequisites

Hypervisor (VMware Workstation Player 16)


SAP HANA, express edition (db version: 2.00.061)
Install SAP HANA 2.0, express edition on a Precon gured Virtual Machine (with SAP HANA XS
Advanced)
SAP HANA Studio (version: 2.3.63)
Frequently Asked Questions About SAP HANA®, Express Edition

Background

During the exercises I will use test database SFLIGHT. More information can be nd:
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 identi ed with the following SQL Statement: “HANA_Disks_Overview”.

1969700 – SQL Statement Collection for SAP HANA


3293572 – SQL Statement Collection: “HANA_Disks_Overview” report for SAP HANA

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.

2400005 – FAQ: SAP HANA Persistence

7. How can the persistence be defragmented?

“When RECLAIM is run in parallel to production load and modi cations there is a certain risk of signi cant
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 nd documentations in SAP Help Portal?

SAP HANA Administration Guide for SAP HANA Platform – Persistent Data Storage in the SAP HANA
Database
SAP HANA SQL Reference Guide for SAP HANA Platform – ALTER SYSTEM RECLAIM DATAVOLUME
Statement (System Management)
SAP HANA Troubleshooting and Performance Analysis Guide – Reclaiming Disk Space
Which is the master SAP Knowledge Base Article of the SAP HANA persistence?

2400005 – FAQ: SAP HANA Persistence

=================================================================

When (in general) and after what action, the fragmentation needs to be checked?

2388483 – How-To: Data Management for Technical Tables


2400024 – How-To: SAP HANA Administration and Monitoring
2718597 – Collection solutions for some big growth tables relevant to HANA DB
3348393 – Overview of the data management process in the context of SAP HANA

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 signi cant 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?

2988616 – /hana/shared volume full or growing


3054023 – Monitoring hana/data volume growth
3047379 – Monitoring hana/log volume consumption
3195436 – Analyze high disk utilization in HANA Database

Which other documentation is important regarding SAP HANA reclaim / shrink / defragmentation topic?

3194175 – How to reduce table disk size


3265639 – How to reduce History Table size
2910857 – Increase Data Volume free space
2499913 – How to shrink SAP HANA Data Volume size
3272698 – Data volume reclaim in High Availability setup
2984269 – How to cancel DATAVOLUME RECLAIM activity
2815538 – High disk consumption reported under OTHER_GB
2696420 – How to Manually Reclaim LOB space on SAP HANA
3235614 – HANA data volume size increased after table redistribution
3100336 – What is fragmentation in context of SAP HANA persistence?
3198269 – Enable Automatic Data Volume Reclaim in SAP HANA 2 SPS06
2937935 – High disk usage on SAP HANA Data volume caused by technical tables
2348397 – Shrink the Data Volume on Secondary Site with SAP HANA System Replication

Which SAP HANA Alert IDs belongs to the topic?


1870858 – HANA Alerts related to le system utilization

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 Administration with SAP HANA Cockpit – Reclaim Space


2222218 – FAQ: SAP HANA Database Server Management Console (hdbcons)

SAP HANA Academy video explains the reclaim process via SAP HANA Cockpit.

[2.0 SP08] SAP HANA Administration: Monitor D…


Watch later Share

Watch on

What is the typical scenario after data deletion?

3209719 – Data le size is not reduced after data deletion.


3028886 – Table size on disk does not decrease after data archiving
3202583 – Disk size of the Audit Log table is huge even after clearing
2088183 – Memory usage not decreasing after the deletion of entries in a table
2731449 – After table deletion and successful Delta Merge, table size Is not decreased

What are the known issues?

2973560 – Data Volume Reclaim Finishes Early


2332284 – Data volume reclaim failed because of snapshot pages
3166382 – Reclaim database space, overhead parameter on SAP HANA
2910343 – SAP HANA data volume reclaim free up less space than expected
2539644 – Reclaim datavolume e ected by data backup and System Replication SAP HANA
3202911 – ALTER SYSTEM RECLAIM DATAVOLUME DEFRAGMENT does not release all the expected
space

What blog posts can be helpful?

How to reduce your HANA database size by 30%


How to Reclaim size of volume “/hana/log” when it is full.
SAP Hana DB Disk Persistence –Shrink HANA Data volume
How to reclaim fragmented space at OS level from HANA Data volume
Did you know that running a reorganization or mass cleanup in HANA will increase data volume usage at
FS by minimum of 25%-50%

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 nd knowledge and information belongs to SAP HANA?

Where can I nd 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 nd 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

Follow  Like  RSS Feed

Alert Moderator

Assigned Tags

SAP HANA

Basis Technology

SAP HANA Cloud, SAP HANA database

SAP HANA studio

SAP HANA, express edition

SAP HANA, platform edition

defragmentation

View more... 

Similar Blog Posts 


SAP Hana DB Disk Persistence --Shrink HANA Data volume
By Sumit Patel Jul 28, 2019

Collected information regarding High Availability and Disaster Recovery in SAP HANA
By Laszlo Thoma Apr 14, 2023
Criteria for HANA administrator to decide on proceeding with DATA Volume reclaim activity
By Raju Doppalapudi Jun 04, 2019

Related Questions 
Reclaim free space datavolume
By Mostefa Kenida Jul 25, 2019

SQL Command "ALTER SYSTEM RECLAIM LOG" not shrinking log les
By Hussain Khatib Nov 04, 2021

SAP HANA savepoint taking long time


By Albin Ary Jul 26, 2023

Be the rst to leave a comment

You must be Logged on to comment or reply to a post.

Find us on

Privacy Terms of Use

Legal Disclosure Copyright

Trademark Cookie Preferences

Newsletter Support

You might also like