SAP HANA Database Consistency check
SAP HANA Database Consistency check –Technical Consistency Check:
SAP HANA Database Consistency check Part1:
In this Blog, we will explain the technical Hana database Consistency check.
Please find the below consistency check is available in SAP HANA Technical consistency
1. Metadata consistency:
2. Row and column store consistency:
Column store consistency:
Row store consistency:
3. Persistence check:
4. Backup Checks
5. Existence of the page dumps
6. SAP HANA Binaries
7. Topology consistency:
8. SAP HANA Installation consistency:
9. Virtual tables consistency check:
Based on situation and systems(Dev,Quality & Production), we will perform the SAP Hana Database Consistency check .We can’t perform the SAP HANA Database consistency regularly.
As per sap recommendation or Based on issue, we can perform the SAP HANA Database consistency checks.
Example:
- CHECK_TABLE_CONSISTENCY : Row and Column store Consistency.
- We can perform the consistency Monthly wise.
- Command: (All sap hana database tables)
CALL CHECK_TABLE_CONSISTENCY(‘CHECK’, NULL, NULL); - In additional some specific situation we can also perform the consistency check
• Upgrade/update
• Migration
• Crashes
• Out of memory termination
Other consistency check, we can perform on demand and some specific situation.
1.Metadata consistency:
Metadata Consistency check we will perform using CHECK_CATALOG procedure.
The CHECK_CATALOG procedure can be used to check the consistency of the Hana metadata
1.What is SAP HANA Metadata?
SAP Hana Metadata is the structure of the objects in the database.
Structure of the objects mean including tables, views and schema. It is stored in sap Hana database catalog.
- SAP Hana database Consistency check for Metadata consistency using CHECK_CATALOG procedure:
- You can perform the consistency check on non-Business Hours.
- Some cases it will be cause Performance issue.
- Command for consistency check:
- # CALL CHECK_CATALOG(‘CHECK’, SCHEMA,OBJECT_NAME, OBJECT_TYPE);
CHECK_NAME : ‘CHECK’ for performing all checks
SCHEMA_NAME: Name of analyzed schema
OBJECT_NAME: Name of analyzed object
OBJECT_TYPE: Type of analyzed database object (e.g. ‘TABLE’, ‘VIEW’)
- A consistency check of the whole Metadata, Please execute the below command.
- Command:
- # CALL CHECK_CATALOG(‘CHECK’, NULL, NULL, NULL);
- A consistency check for only one specific table
- Table: MARA and SCHEMA: SAPSR3
- Command:
CALL CHECK_CATALOG(‘CHECK’, ‘SAPSR3’, ‘MARA’, ‘TABLE’);
- If you will get the zero rows mean No error mean No inconsistency on Metadata.
- If you will get the inconsistency then take action accordingly.
- Based on your requirement –Please perform the individual consistency check.
- Check name: CHECK_DEPENDENCY :Consistency of object dependencies
Command:
CALL CHECK_CATALOG(‘CHECK_DEPENDENCY’, SCHEMA,OBJECT_NAME, OBJECT_TYPE); - Check name :CHECK_OBJECT_REFERENTIAL_INTEGRITY :Consistency of references in catalog object
Command:
CALL CHECK_CATALOG(‘CHECK_OBJECT_REFERENTIAL_INTEGRITY’, SCHEMA,OBJECT_NAME, OBJECT_TYPE); - Check name: CHECK_VALUE_DOMAIN :Consistency of value domains in catalog object
Command:
CALL CHECK_CATALOG(‘CHECK_VALUE_DOMAIN’, SCHEMA,OBJECT_NAME, OBJECT_TYPE);
Based on the requirement, Please perform the Consistency check.
SAP Note for reference: 1977584
2. Row and column store
Row and column store Consistency check, we will perform the consistency using CHECK_TABLE_CONSISTENCY procedure.
CHECK_TABLE_CONSISTENCY procedure can be used to check the consistency of structure and data of tables
What is SAP HANA Row and column store tables?
SAP Hana database there are 2 types of store data tables.
1 . SAP HANA Row store tables
2. SAP HANA Column store tables
- SAP Hana database Consistency check for Row and column store consistency using CHECK_TABLE_CONSISTENCY procedure
- You can perform the consistency check on non-Business Hours.
- Some cases it will be cause Performance issue.
- Command for consistency check for Row and column store
Command:: CALL CHECK_CATALOG(‘CHECK’, SCHEMA, Table_NAME); - Based on below details, we can execute the command
ACTION : Type of action, use ‘CHECK’
SCHEMA_NAME : Name of analyzed schema (NULL for all schemas)
TABLE_NAME : Name of analyzed object (NULL for all objects)
- A consistency check of the whole SAP HANA Row and column store, Please execute the below command.
CALL CHECK_TABLE_CONSISTENCY(‘CHECK’, ‘<schema>’, ‘<table>’); - Use below command we can check the All row and column table consistency in sap hana database.
Command:
CALL CHECK_CATALOG(‘CHECK’, NULL, NULL);
- If Hana database is HANA2.0 SP6 or Higher version then use below command:
CALL CHECK_TABLE_CONSISTENCY(‘CHECK_FULL’, ‘<schema>’, ‘<table>’);
- A consistency check for only one specific table—
Table: MARA
SCHEMA: SAPSR3 - Command:
CALL CHECK_CATALOG(‘CHECK’, SAPSR3, MARA);
If you will get the zero rows mean No error mean No inconsistency on Row and column store. If you will get the inconsistency then take action accordingly.
Based on your requirement –Please perform the individual consistency check.
• CHECK_CHAR
• CHECK_COLUMN_TABLES
• CHECK_COLUMN_TABLES_FULL
• CHECK_INDEXES
• CHECK_LOBS
• CHECK_LOBS_FULL
• CHECK_ROW_TABLES
• CHECK_TABLE_CONTAINER_PERSISTENCE
• CHECK_REPLICATION
• CHECK_REPLICATION_DATA_FULL
Please check the 1977584 sap note for more information.
Example: We will check only ROW table consistency check
CHECK_ROW_TABLES:
Using below command to check the SAP HANA Database consistency for SAP HANA Database column store table. Consistency check command is changed after Hana2.0 SP6.
- Hana2.0 SP6 USE below command
CALL CHECK_TABLE_CONSISTENCY(‘CHECK_FULL’, ‘<schema>’, ‘<table>’);
CHECK_FULL: CHECK_ROW_TABLES
CALL CHECK_TABLE_CONSISTENCY(‘ CHECK_ROW_TABLES, ‘<schema>’, ‘<table>’);
- All row tables Consistency check:
CALL CHECK_TABLE_CONSISTENCY(‘ CHECK_ROW_TABLES, ‘null’, ‘ null ‘); - Below lower version Hana2.0 SP6 USE below command
CALL CHECK_TABLE_CONSISTENCY(‘CHECK’, ‘<schema>’, ‘<table>’);
CHECK: CHECK_ROW_TABLES
CALL CHECK_TABLE_CONSISTENCY(‘ CHECK_ROW_TABLES, ‘<schema>’, ‘<table>’);
- All row tables Consistency check:
CALL CHECK_TABLE_CONSISTENCY(‘ CHECK_ROW_TABLES, ‘null’, ‘ null ‘);
- If you want to check the list of the consistency details in SAP HANA Database then execute the below command and check the list of the consistency.
CALL GET_CHECK_ACTIONS(‘CHECK_TABLE_CONSISTENCY’); - We have explained the below SAP HANA Database consistency details in this blog.
1. META DATA Consistency using CHECK_CATALOG Procedure.
2. Row and column store Consistency using CHECK_TABLE_CONSISTENCY Procedure.
If you have facing the sap hana inconsistencies, then you can perform the consistencies and Take action/REPAIR the corruptions.
Please check the Next Blog for SAP HANA Database Consistency check Part2:
In this blog we will explain the below SAP HANA Database Consistency check:
1. Persistence check:
2. Backup Checks
3. Existence of the page dumps
4. SAP HANA Binaries
5. Topology consistency:
6. SAP HANA Installation consistency:
7. Virtual tables consistency check:
Conclusion:
In this blog we have successfully explain the two sap hana database consistencies checks steps and process details. Remaining consistency checks please check the Next Part2 Blog.
FAQ for SAP HANA Database Consistency check –Technical Consistency Check:
1. What are the minimum recommendation for SAP HANA Database consistency?
Main consistency check is
CHECK_CATALOG
CHECK_TABLE_CONSISTENCY
Backup
Hdbpersdiag. Please check below blog for more information.
2. Why need to perform the consistency checks?
If you will perform the SAP HANA Consistency checks on Monthly wise you can identify the Database health status.
So you have easy to identify the issue and take action and avoid P1 & P2 situation.
Other Blogs:
We have explained the SAP HANA Database Administrator tasks blogs.
Please check:
Hana1.0 to Hana2.0 Upgrade steps Popular Part 1
SAP Hana Upgrade Guide Popular Part 2
Hana Fast Restart Option Configuration 2024
‘