LLI Wiki — My Digital Knowledge Base

Schedule and read SAP HANA statistics server alerts

SQL to schedule SAP HANA alert checks and read current alerts and last checks.

How to inspect and schedule the SAP HANA statistics server alert checks (for example the table consistency check) from SQL.

See SAP Note 2523296 for background (an SAP account is required to read SAP Notes).

Set the time of day of the alert check

Show the current schedule (local server time):

select EXECUTION_TIME_OF_DAY ,* from _SYS_STATISTICS.STATISTICS_SCHEDULE

Change it:

CALL CHECK_TABLE_CONSISTENCY('SET_ALERT_SCHEDULE', 'EXECUTION_TIME_OF_DAY', '<hh:mm:ss>')

Read the alerts

Current alerts:

select * from "_SYS_STATISTICS"."STATISTICS_CURRENT_ALERTS"

Last executed checks:

select * from "_SYS_STATISTICS"."STATISTICS_LAST_CHECKS"

List the actions of a check

CALL GET_CHECK_ACTIONS('CHECK_TABLE_CONSISTENCY')
Mastodon LLIMastodon SocialFosstodon