Both understanding the root cause of the corruption and resolving it are very important. You may not be able to resolve a corruption if you don’t understand how it is introduced, and you may have new corruptions if you haven’t understood and resolved the root cause of previous corruptions.
Consistency check in logical layer of database is checked via :
But, there is also a mechanism to diagnose corruptions at physical level.
hdbpersdiag tool is a persistence-based check method that will check structure-based aspects of the persistence only. It can be executed for all data volumes. Downtime is needed to run the consistency check of hana persistence and hana instance must also be stopped before executing the tool. Trace for hdbpersdiag tool is written by default into the database trace directory.
The tool hdbpersdiag is an expert tool and only the “check all” option is meant for public use. Make sure that you only use it if you know what you do.It is delivered as part of the standard SAP HANA installation in directory /usr/sap/<sid>/HDB<inst_id>/exe.
hdbpersdiag -c 'check all' <DATA_VOLUME_PATH>
Attention: Needs additional memory of up to 2 % of the data volume size (worst case if many small 4 KB pages exist)
1. If persistence encryption is enabled for your SAP HANA database, use it like below :
<sid>adm@<host>:/usr/sap/<SID>/HDB02> hdbpersdiag -c -e 'check all' /hana/data/<SID>/mnt00001/hdb00001 Loaded library 'libhdbunifiedtable' Loaded library 'libhdblivecache' Trace is written to: /usr/sap/<SID>/HDB02/<host>/trace Mounted DataVolume(s) #0 /hana/data/<SID>/mnt00001/hdb00001/ (8.2 GB, 8809873408