You are on page 1of 6

2023-04-21 2400024

2400024 - How-To: SAP HANA Administration and


Monitoring
Version 23 Type SAP Knowledge Base Article
Language English Master Language English
Release Status Released to Customer Category How To
Component HAN-DB-MON (SAP HANA Monitoring) Released On 07.03.2022

Please find the original document at https://launchpad.support.sap.com/#/notes/2400024

Symptom

You are interested in best practices about administering and monitoring a SAP HANA database.

Environment

SAP HANA

Cause

This SAP Note lists recommended tasks in the area of administration, monitoring and housekeeping in order
to keep the SAP HANA database in a healthy state.

For general information about SAP HANA administration see the SAP HANA Administration Guide (e.g.
section Database Administration Tasks at a Glance) and the SAP HANA Multitenant Database Containers
Operations Guide.

Resolution

The following table lists recommended tasks when administering a SAP HANA database. The columns
"Frequency" and "Threshold" contain suggestions that aren't set in stone but can be adjusted based on the
individual needs. In case of separate check and implementation activities (e.g. for data file fragmentation) the
"Frequency" incidates the check frequency. The actual implementation (e.g. data file defragmentation) is only
required when the defined threshold is exceeded.

SAP
Area Sub Area Frequency Threshold Details
Note
Schedule at least one data backup per day.
Make sure that you also consider other SAP
Data HANA backup recommendations: Keep data
Administration daily 1642148
backups and log backups at last for a backup cycle of
one month. Keep one consistent backup per
month on a permanent basis (i.e. for years).
Regularly test specific administration actions
quarterly 1642148 in order to make sure that the defined
Administration Tests or on 1999880 procedure works as expected and you are
demand 2057595 used to it Restore / recovery System
replication takeover Host auto-failover
Consistency at least Regularly check the consistency of the SAP
Administration 2116157
check monthly HANA database using procedure

© 2023 SAP SE or an SAP affiliate company. All rights reserved 1 of 6


2023-04-21 2400024
CHECK_TABLE_CONSISTENCY and make
sure that reported corruptions are corrected
in time. Physical consistency on persistence
level is checked while a normal data backup
is taken. Snapshot based backups don't
provide this consistency checks so it is
recommended to perform at least one
normal data backup during each backup
cycle for consistency check reasons.
Make sure that you stay on a SAP HANA
Patches
at least database Revision where patches can be
Administration and 2115815
yearly provided and plan upgrades to newer
upgrades
release levels in time.
Consider table redistribution in order to
Table on
Administration 2081591 optimize the layout and distribution of tables,
distribution demand
particularly in scale-out environments.
Frequently check for Security Notes and
SAP HANA Hot News in order to make sure
that you are aware about critical SAP HANA
Security issues in terms of security, system
at least
Administration Notes and availability and correctness of data. See
weekly
Hot News SAP Security Notes and Hot News for
details how to find Security Notes and Hot
News and how to configure automatic
notifications.
Run SQL: "HANA_Configuration_Param
eters" (SAP Note 1969700) and adjust
parameter settings unless there is a specific
2186744
Configuration Parameters monthly reason for deviating from the SAP best
2600030
practices. Check for new parameter
recommendations (SAP HANA, SAP ABAP,
operating system, ...) in SAP Note 2600030.
Regularly make sure that the statement hints
delivered via SAP Note 2700051 are
Statement every 6
Configuration 2700051 properly implemented so that known
hints months
scenarios of wrong optimizer decisions are
eliminated.
Make sure that timezone tables like TTZZ
yearly or
are kept up to date in order to avoid
Configuration Timezones on 1932132
overhead in timezone conversion or wrong
demand
timezone calculations.
The backup catalog can be cleaned
automatically with SAP HANACleaner (SAP
Note 2399996) or manually using SAP
HANA Studio or the following SQL
Backup
Housekeeping weekly 42 days 2399996 command: BACKUP CATALOG DELETE
catalog
ALL BEFORE BACKUP_ID ... See the SAP
HANA SQL and System Views Reference for
more information. You can use the following
approaches to monitor the backup catalog:

© 2023 SAP SE or an SAP affiliate company. All rights reserved 2 of 6


2023-04-21 2400024
SQL: "HANA_Backups_CatalogDele
tion_CommandGenerator" (SAP Note
1969700) can be used to generate an
appropriate deletion command based on the
defined retetion time and the minimum
amount of retained backups. Check IDs 940
("Size of backup catalog (MB)"), 941
("Catalog size share (last day, %)") and 942
("Age of oldest backup in catalog (days)") of
the SAP HANA Mini Checks (SAP Note
1999993)
The backup.log and backint.log files can be
automatically renamed and compressed with
backup.log
SAP HANACleaner (SAP Note 2399996).
Housekeeping and weekly 50 MB 2399996
Alternatively you can manually rename /
backint.log
delete / compress these files once they
exceed a certain size limit.
Old SAP HANA trace files can be
automatically cleaned with SAP
HANACleaner (SAP Note 2399996),
manually on operating system level or using
Housekeeping Trace files weekly 42 days 2399996 the following commands: ALTER SYSTEM
CLEAR TRACES ... ALTER SYSTEM
REMOVE TRACES ... See the SAP HANA
SQL and System Views Reference for more
information.
Make sure that deletion and / or archiving
tasks are implemented for large and growing
technical tables. You can use SQL:
Technical "HANA_Tables_LargestTable
Housekeeping weekly 2388483
tables s" (ONLY_TECHNICAL_TABLES = 'X')
available via SAP Note 1969700 in order to
display the largest technical tables in a
system.
Consider a data file reorganization in case of
significant fragmentation: ALTER SYSTEM
RECLAIM DATAVOLUME ... See the SAP
HANA SQL and System Views Reference for
more information. You can determine data
Housekeeping Data files monthly 30 % 1870858
file fragmentation in the following ways:
SQL: "HANA_Disks_Overview" (SAP Note
1969700) Check ID M0370 ("Unused space
in data files (%)") of the SAP HANA Mini
Checks (SAP Note 1999993)
Consider a row store reorganization in case
of significant fragmentation. You can
determine row store fragmentation in the
Housekeeping Row store weekly 30 % 1813245 following ways: SQL:
"HANA_RowStore_Overview" (SAP Note
1969700) Check ID 535 ("Row store
fragmentation (%)") of the SAP HANA Mini

© 2023 SAP SE or an SAP affiliate company. All rights reserved 3 of 6


2023-04-21 2400024
Checks (SAP Note 1999993) Alert 71: Row
store fragmentation
Consider to reclaim logs in case of a high
number of free log files: ALTER SYSTEM
RECLAIM LOG Additionally you should
check why a high number of free log files
summed up (e.g. due to savepoint, backup
or system replication issues) and take
appropriate actions to avoid similar
scenarios in the future. You can determine
free log files in the following ways: SQL:
"HANA_Logs_LogSegments" (SAP Note
Housekeeping Log monthly 250 2083715 1969700) Check ID 952 ("Log segments free
for reuse") of the SAP HANA Mini Checks
(SAP Note 1999993) With SAP HANA >=
2.0 SPS 06 you can also configure an
automatic log segment reclaim using the
following parameter that defines the file
system usage <used_pct> in percent when
an automatic reclaim of free segments is
triggered: global.ini -> [persistence] ->
log_disk_usage_reclaim_th
reshold = <used_pct>
Check for critical SAP HANA statisticsserver
at least
Monitoring Alerts 2147247 alerts and implement corrections in order to
daily
eliminate existing issues.
Execute SQL: "HANA_Configuration_MiniC
hecks" (SAP Note 1969700) and check the
results rated as "potentially critical" i.e.
at least
Monitoring Mini Checks 1999993 having C = 'X'. Implement fixes or
weekly
optimizations if appropriate in order to
resolve existing issues. See SAP Note
1999993 for more details.
Check the SAP HANA database trace files
for critical errors. You can use SQL:
at least
Monitoring Trace files 2380176 "HANA_TraceFiles_MiniChec
weekly
ks" and SQL: "HANA_TraceFiles_Content"
for that purpose (SAP Note 1969700).
SAP Solution Manager provides many
Solution at least features for monitoring and managing SAP
Monitoring
Manager daily HANA systems. See SAP HANA Operations
with SAP Solution Manager for more details.
Depending on the type of critical issue you
1999020
can proceed as follows: Issue SAP Note
1999997
Database inaccessible 1999020 High
2000000
Critical on memory utilization 1999997 Bad
Monitoring 2100040
issues demand performance 2000000 High CPU
2116157
consumption 2100040 Corruptions 2116157
2169283
Blocked garbage collection 2169283 Wrong
2222121
results 2222121

© 2023 SAP SE or an SAP affiliate company. All rights reserved 4 of 6


2023-04-21 2400024
In general it is useful to regularly check for
missing indexes in order to optimize
performance and reduce resource
yearly and consumption. In context of S/4HANA or SoH
during 2160391 it is recommended to run
Monitoring Indexes
ABAP 1794297 SHDB_INDEX_ANALYZE (SAP Note
upgrades 1794297) at least yearly and during ABAP
upgrades in order to make sure that
secondary ABAP indexes are properly in
place.

All aspects described in the table above are covered by the SAP HANA Technical Performance Optimization
Service (TPO) and the SAP System Administration Service. These services consist of analysis and
empowering parts. So you can consider to order a regular (e.g. yearly) TPO service and / or a System
Administration service complementary to your standard administration and monitoring.

Keywords

SAP HANA monitoring administration operations handbook housekeeping performance

Products

SAP HANA, platform edition all versions

This document refers to

SAP Note/KBA Title

2700051 Delivery of Statement Hints (SAP HANA >= 1.00.122.03)

2600030 Parameter Recommendations in SAP HANA Environments

2399996 How-To: Configuring automatic SAP HANA Cleanup with SAP HANACleaner

2399979 How-To: Configuring automatic SAP HANA Data Collection with SAP HANASitter

2388483 How-To: Data Management for Technical Tables

2380176 FAQ: SAP HANA Database Trace

2222121 SAP HANA Wrong Result Sets

2186744 FAQ: SAP HANA Parameters

2169283 FAQ: SAP HANA Garbage Collection

2160391 FAQ: SAP HANA Indexes

2147247 FAQ: SAP HANA Statistics Server

© 2023 SAP SE or an SAP affiliate company. All rights reserved 5 of 6


2023-04-21 2400024
2116157 FAQ: SAP HANA Consistency Checks and Corruptions

2115815 FAQ: SAP HANA Database Patches and Upgrades

2100040 FAQ: SAP HANA CPU

2081591 FAQ: SAP HANA Table Distribution

2057595 FAQ: SAP HANA High Availability

2000000 FAQ: SAP HANA Performance Optimization

1999997 FAQ: SAP HANA Memory

1999993 How-To: Interpreting SAP HANA Mini Check Results

1999880 FAQ: SAP HANA System Replication

1999020 How-To: SAP HANA Troubleshooting when Database is no longer accessible

1870858 HANA Alerts related to file system utilization

1932132 Large Time Difference Between Application Server and SAP HANA Database

1794297 Secondary Indexes for S/4HANA and the business suite on HANA

Database Administration Tasks at a Glance

SAP HANA Administration Guide

SAP HANA SQL and System Views Reference

SAP Security Notes and Hot News

SAP HANA Multitenant Database Containers Operations Guide

SAP HANA Operations with SAP Solution Manager

Terms of use | Copyright | Trademark | Legal Disclosure | Privacy

© 2023 SAP SE or an SAP affiliate company. All rights reserved 6 of 6

You might also like