FAQ: SAP HANA Statistics Server: Symptom
FAQ: SAP HANA Statistics Server: Symptom
Symptom
You are interested in the SAP HANA statistics server.
Environment
SAP HANA
Cause
1. What is the SAP HANA statistics server?
2. Where do I find more information about the SAP HANA statistics server?
3. Which indications exist for problems in the area of the SAP HANA statistics server?
4. How is the statistics server implemented?
5. How can I determine details about the statistics server?
6. What are the advantages of the embedded statistics server?
7. How can the standalone statistics server be migrated to the embedded statistics server?
8. How can the statistics server be configured?
9. How can the memory requirements of the statistics server be minimized?
10. How can the runtime and CPU requirements of the statistics server actions be analyzed and optimized?
11. Why is the history collection for some tables inactive?
12. Why are some statistics server actions disabled?
13. How can I take care for disabled statistics server actions?
14. How can I check for problems in the area of the statistics server?
15. What is a good retention time for statistics server histories?
16. What can I do if a statistics server action fails with "301: unique constraint violated"?
17. Is it possible to mark an alert as acknowledged or handled?
18. Are the default alert thresholds generally sufficient?
19. How can the statistics server check intervals be adjusted?
20. How can internal statistics server errors be analyzed?
21. What happens if the STATISTICS_SCHEDULE table is manually modified in a wrong way?
22. How can I analyze and resolve SAP HANA alerts?
23. Is it possible to restart the statistics server?
24. What is the difference of SNAPSHOT_ID and SERVER_TIMESTAMP in histories?
25. Why do different statistics server actions run in the system database and tenants?
26. How can I monitor and tackle issues with event acknowledgement?
27. How can I check the state of the statistics server and restart it if required?
28. Can Native Storage Extension (NSE) be used in context of the statistics server tables?
29. Are there SQLScript version requirements for the statistics server?
30. Do statistics server histories also contain information for remote system replication sites?
Resolution
3. Which indications exist for problems in the area of the SAP HANA statistics server?
The following SAP HANA alerts indicate problems in the SAP HANA statistics server area:
0 Internal statistics server problem 2081609 Identifies internal statistics server problem.
SQL: "HANA_Configuration_MiniChecks" (SAP Notes 1969700, 1999993) returns a potentially critical issue (C = 'X') for one
of the following individual checks:
Check ID Details
Standalone statistic SSS Rev. <= 1.0 Rev. <= 1.00 Old approach using a dedicated process (statisticsserver), various disa
s server 0.92 .73 dvantages:
Embedded statistics ESS Rev. >= 1.0 Rev. >= 1.00 New approach embedded into indexserver process
server 0.93 .74
SQL: "HANA_TraceFiles_MiniChecks" (SAP Notes 1969700, 2380176) reports one of the following check IDs:
Check ID Details
SQL: "HANA_StatisticsServer_Mai ESS Overview of existing e-mail notifications, amount can increase considerably if
lProcessing" e-mail is configured improperly, see SAP Note 2133799
SQL: "HANA_StatisticsServer_Pri all Checks for primary keys are defined on statistics server histories, can be remo
maryKeysOnHistoryTables" ved in exceptional situations as described in SAP Note 2143679
SQL: "HANA_StatisticsServer_Pro ESS General properties, can be used to check if migration to ESS was successful
perties"
SQL: "HANA_StatisticsServer_Sch ESS Schedule of statistics server actions (e.g. frequency, last run, runtime per hour
edule" )
Statistics server alerts can be monitored and configured in SAP HANA Studio -> Administration -> Alerts.
7. How can the standalone statistics server be migrated to the embedded statistics server?
The standalone statistics server is typically active when the following parameter is set:
A manually triggered migration to the embedded statistics server can be performed based on SAP Notes 2092033 and
1917938. See also SAP Note 1925684 that describes prerequisites from SAP ABAP and Solution Manager perspective that
need to be fulfilled.
The main technical activation for the embedded statistics server is the following parameter setting:
System DB, standalone DB:
Tenant DB:
When installing or upgrading to SAP HANA 1.00.93 or higher, the embedded statistics server is activated automatically.
If the embedded statistics server disables itself automatically or doesn't collect data, see SAP Notes 2006652,
2036630 and 2091256 for corrective measures. Additionally you can proceed according to the troubleshooting tree provided
in SAP Note 2223237. In case of corruptions in statistics server objects you can also consider SAP Note 2343366 for repair /
re-creation steps.
Disable the history collection of M_CS_UNLOADS in HOST_CS_UNLOADS as described in SAP Note 2084747.
Check according to SAP Note 2084747 if there are other unnecessarily large histories and adjust the data collection if
required.
Embedded statistics server:
Manually delete existing records with EXECUTION_COUNT = 0 from HOST_SQL_PLAN_CACHE:
DELETE FROM _SYS_STATISTICS.HOST_SQL_PLAN_CACHE_BASE WHERE EXECUTION_COUNT = 0
If you are below Revision 85, you should perform this DELETE operation on a regular basis (e.g. weekly).
Once you have upgraded to Revision 85 or higher, the embedded statistics server will massively reduce the collected data
of HOST_SQL_PLAN_CACHE and no manual intervention is required.
Disable the data collection of M_CS_UNLOADS in HOST_CS_UNLOADS (if it is still active):
UPDATE _SYS_STATISTICS.STATISTICS_SCHEDULE SET STATUS = 'Inactive' WHERE ID = 5035;
TRUNCATE TABLE _SYS_STATISTICS.HOST_CS_UNLOADS_BASE
Check "How can I monitor and tackle issues with event acknowledgement?" in order to rule out an increased amount of
non-acknowledged events.
Make sure that there is no high amount of records for single alerts in table STATISTICS_ALERTS_BASE, e.g. via SQL:
"HANA_StatisticsServerAlerts_FrequentAlerts_ESS" (RETAINED_RECORDS_PER_ALERT = 500000) available via
SAP Note 1969700. Particularly high number of records can exist due to a bug with alert 65 that is fixed with Rev.
1.00.97.02 and 1.00.101.
On SAP HANA SPS 09 and below you can implement SAP Note 2186299 in order to make sure that the size of heap
allocator Pool/RowEngine/MonitorView doesn't grow unnecessarily.
A large size of HOST_LOAD_HISTORY_SERVICE and HOST_LOAD_HISTORY_HOST can be caused by a small
setting of parameter global.ini -> [resource_tracking] -> load_monitor_granularity. Make sure that at least a value of
1000 ms is used for that setting. See SAP Note 2222110 for more information.
If HOST_OBJECT_LOCK_STATISTICS contains a very large number of entries, you can increase the collection interval
of the related ID 5032, e.g. from one minute to 10 minutes. Starting with Rev. 1.00.102.01 the data collection is changed
so that only long running lock waits (>= 1 s) are historicized instead of all.
The transactional lock history in HOST_OBJECT_LOCK_STATISTICS may contain a high amount of entries for
OBJECT_NAME = '(unknown)'. They typically refer to already dropped temporary tables and can be deleted. This
problem is fixed starting with SAP HANA 2.0 SPS 00. You can consider using SAP HANACleaner (SAP Note 2399996)
to configure an automatic cleanup.
DELETE FROM _SYS_STATISTICS.HOST_OBJECT_LOCK_STATISTICS_BASE WHERE OBJECT_NAME = '(unknown)'
See SAP Note 2170779 and make sure that table old records are deleted from table STATISTICS_ALERTS_BASE, e.g. by
executing the following command. Starting with SAP HANA 1.0 SPS 11 the statistics server will automatically purge old
alerts after 42 days:
DELETE FROM _SYS_STATISTICS.STATISTICS_ALERTS_BASE WHERE ALERT_TIMESTAMP < ADD_DAYS(CURRENT_TI
MESTAMP, -42)
10. How can the runtime and CPU requirements of the statistics server actions be analyzed and optimized?
All checks and collections triggered by the statistics server are executed with the following wrapper call (statement hash
d6fd6678833f9a2e25e7b53239c50e9a):
call _SYS_STATISTICS.STATISTICS_SCHEDULABLEWRAPPER('Timer', ?, ?, ?, ?)
You can check its load key figures by executing SQL: "HANA_SQL_StatementHash_KeyFigures" (STATEMENT_HASH =
'd6fd6678833f9a2e25e7b53239c50e9a') available via SAP Note 1969700. If you observe a significant average runtime (e.g.
time per execution >= 500 ms), you can have a closer look at the individual actions by executing SQL:
"HANA_StatisticsServer_Schedule" (ORDER_BY = 'TIME_PER_H') available via SAP Note 1969700. The following output
illustrates a case where the collector for the HOST_BLOCKED_TRANSACTIONS histories is responsible for significant
execution times of more than 600 seconds per hour:
You can now find a good trade-off between the load and the collected data. If it is e.g. okay that the history of blocked
transactions is only collected every five minutes instead of every single minute, you can increase the interval from 60 to 300
seconds:
For the following alerts and collectors special considerations are useful if they are responsible for a high runtime or resource
consumption:
I Action Details
D
65 Alert_Bac The runtime of backup related actions can be impacted by a large backup catalog. See check ID M0940 (SAP Note 1
kup_Long 999993) and SAP Note 2505218 and make sure that the catalog remains on a reasonable size.
_Log_Bac
kup
41 Alert_Dec The Alert_Dec_Extractor_Status and Collector_Global_Dec_Extractor_Status checks don't work correctly and ha
50 _Extractor ve an increased runtime as long as the CATALOG READ privilege isn't assigned to the _SYS_STATISTICS user. Th
0 _Status erefore you should either grant CATALOG READ to _SYS_STATISTICS or disable the check with ID 5008. See SAP
8 Collector_ Note 2000002 ("Are there standard recommendations for specific SQL statements available?" -> "ba8161b6133633
Global_De e2984828ce38aa669a, 905dbaa93a672b087c6f226bc283431d") for more details.
c_Extract
or_Status
50 Collector_ This collector can suffer from the existence of large row store tables. See SAP Note 2000002 ("Are there standard r
01 Global_Ro ecommendations for specific SQL statements available?" -> "0c2d40de2702bc576de87a9aec2cef30, f45e2eaba236
wstore_Ta b6655804f6585d631923") for more details.
bles_Size
50 Collector_ For this collector, an execution frequency of 5 minutes is sufficient (issue number 334265). See SAP Note 2000002
2 Host_Lon ("Are there standard recommendations for specific SQL statements available?" -> COLLECTOR_HOST_LONG_R
8 g_Runnin UNNING_STATEMENTS) for more details.
g_Stateme
nts
50 Collector_ This collector can suffer from the existence of large row store indexes. See SAP Note 2000002 ("Are there standard
45 Host_RS_ recommendations for specific SQL statements available?" -> "ac52398f58a752bed7843aac8d829464, e9f2feac54a0
Indexes 48984928f3fcbcfacedd") for more details.
50 Collector_ The runtime of this collector can be increased if the secondary system replication site is not accessible. See SAP Not
46 Host_Serv e 2000002 ("Are there standard recommendations for specific SQL statements available?" -> "M_SERVICE_REPL
ice_Replic ICATION") for more details.
ation
The maximum parallelism of the statistics server threads is controlled by the following parameter (default: 5):
It is usually not recommended to adjust this parameter, instead workload classes as suggested below should be used.
For SAP HANA <= 2.0 SPS 05 see SAP Note 2970921 and make sure that a workload class is defined for the
_SYS_STATISTICS user in order to avoid temporary CPU spikes.
With SAP HANA >= 2.0 SPS 06 an Embedded Statistics Service Workload Class is automatically implemented in case no
workload class for the _SYS_STATISTICS user exists, yet. When the delivered workload class is used, the following parameter
is set to its default 'yes':
In case a workload class already exists from the past, the parameter is set to 'no'. If you want to enable the delivered workload
class, you need to drop the previous workload class and subsequently unset the parameter so that its default 'yes' becomes
active. See SAP Note 2222250 for more information related to workload classes.
Be aware that the suggested workload class is based on the database user name ('USER NAME' = '_SYS_STATISTICS'). In the
thread information (SAP Note 2114710) the database user name may be empty for statistics server activities and only the
application user name is filled with _SYS_STATISTICS. This topic is tracked via issue number 266415 and has no impact on
the validity of the defined workload class.
Also check "How can the memory requirements of the statistics server be minimized?" in terms of
STATISTICS_ALERTS_BASE recommendations, because a high number of records in this table can also have CPU and
runtime effects.
The following wrapper call is typically triggered by Solution Manager monitoring (statement hash
dc571bf5eb7cad9c313c20de904ab709):
If SAP HANA >= 1.00.122.04 is in place, you can activate the new SAP HANA monitoring mechanism of the Solution
Manager (SAP Note 2374272). Then the Solution Manager will rely on information already collected by the statistics server
rather than executing statistics server checks on its own. As a consequence this particular
STATISTICS_SCHEDULABLEWRAPPER call will no longer be executed.
Attention: Be aware that in system databases of MDC environments (SAP Note 2101244) several other actions are
deactivated per default starting with SAP HANA 2.0 SPS 04. This is normal and there is usually no need for adjustments.
Ty Revision Details
pe
ES 1.0 SPS 0 Individual actions are disabled if the previous execution is not finished when the next execution is started.
S 7
Disabled actions won't be enabled automatically, you can only enable them manually.
1.0 SPS 0
8 <= Rev.
85.03
1.0 SPS 0
9 <= Rev.
92
ES 1.0 SPS 0 Individual actions are disabled if the previous execution is not finished when the next execution is started.
S 8 >= Rev.
Disabled actions are skipped at least once and at least for one hour. Afterwards they are automatically enabled by t
85.04
he statistics server. So roughly speaking actions with a high execution frequency are enabled after one hour and acti
1.0 Rev. >
ons with a low execution frequency are enabled after they have been skipped once.
= 93
13. How can I take care for disabled statistics server actions?
Disabled statistics server actions are particularly critical with ESS and Revisions <= 1.00.92, because no automatic enabling
happens.
Disabled statistics server actions are reported with check ID M0717 ("Number of disabled actions") of SQL:
"HANA_Configuration_MiniChecks" (SAP Note 1969700).
The most frequent root cause for disabled statistics server actions are timeouts. You can check via SQL:
"HANA_StatisticsServer_Schedule" (SAP Note 1969700) for STATUS, which contains "Disabled" and the related reason,
e.g. "Disabled (timeout)".
If you find disabled actions due to timeout, you can enable them with the following command:
UPDATE "_SYS_STATISTICS"."STATISTICS_SCHEDULE" SET STATUS = 'Idle' WHERE STATUS = 'Disabled' AND S
TATUSREASON = 'timeout'
If the same check disables itself repeatedly due to timeouts, you have to analyze the underlying performance problem. A
timeout is triggered, if the previous execution is still active when the next execution is triggered, so as a workaround you can
reduce the risk of timeouts by reducing the execution frequency of the involved action:
Another reason for disabled statistics server actions can be invalid underlying procedures. A general activation of actions
regardless of the timeout reason can be performed with the following command:
14. How can I check for problems in the area of the statistics server?
You can run SQL: "HANA_Configuration_MiniChecks" (SAP Notes 1999993 and 1969700) and have a look at the check
results for the "STATISTICS SERVER" section starting with CHECK_ID 700. If potentially critical issues are reported (C =
'X'), you can perform an analysis as described in SAP Note 1999993 and SAP Notes referenced there, and take appropriate
actions if required.
Having a higher retention value (e.g. 365 days) for certain histories is usually possible without problems. You can take the
original table size with 42 days history and estimate the expected target table size for the new history retention (e.g. about
factor 9 for 365 days). Sizes of up to a few GB can still be justified.
16. What can I do if a statistics server action fails with "301: unique constraint violated"?
As a workaround the primary keys of the involved histories can be dropped as described in SAP Note 2143679.
Duplicate keys are typically related to statistics server bugs. The following scenarios are currently known:
Tables SAP Not Details Fixe
e / issue d wi
number th
GLOBAL_OUT_OF Collector 5053 (Collector_Global_Out_Of_Memory_Events) can suffer from unique const 2.00
_MEMORY_EVEN raint related terminations. .037.
TS 02
2.00
.041
COLLECTOR_GLO Row store tables with several containers can result in duplicate entries in M_RS_TABLES 2.00
BAL_ROWSTORE with SAP HANA 2.00.040 - 2.00.042. As a workaround you can reorganize these tables, e. .043
_TABLES_SIZE_B g. using SQL: "HANA_Tables_RowStore_TablesWithMultipleContainers" (SAP Note 196
ASE 9700).
COLLECTOR_HOS 235390 The primary key of the underlying table HOST_CS_INDEXES_BASE was designed withou 2.00
T_CS_INDEXES t SCHEMA_NAME and without TABLE_NAME / PART_ID. Therefore duplicates are poss .047
ible when indexes of the same name exist in more than one schema or when indexes are de
fined on partitioned tables.
COLLECTOR_TEL The parameter telemetry collector can terminate with unique constraint violation when par 2.00
_INIFILE_CONTE ameters are maintained on HOST level (SAP Note 2186744). .040
NTS
HOST_LONG_RU 1.00.
NNING_STATEME 122.
NTS_BASE 20
2.00
.023
HOST_SERVICE_ 2137142 Several threads with THREAD_ID -1 may exist in M_SERVICE_THREAD_SAMPLES. 1.00.
THREAD_SAMPL 90
ES_BASE
HOST_SQL_PLAN 2.00
_CACHE_OVERVI .024
EW_BASE .08
2.00
.036
STATISTICS_ALE The primary key doesn't contain table partitions. If the same alert is issued for different pa 1.00.
RTS_BASE rtitions of the same table, the "unique constraint violated" error is issued. 110
STATISTICS_ALE In context of alert ID 39 (long running statements) the unique index is defined on SNAPS 1.00.
RTS_BASE HOT_ID, ALERT_ID and TRANSACTION_ID. This is not generally sufficient in scale-out 122.1
systems, because the same transaction ID can exist on different hosts. 5
2.00
.012.
04
2.00
.023
STATISTICS_ALE In context of alert ID 49 (blocked transactions) duplicate keys are possible if different upda 1.00.
RTS_BASE te transaction IDs are blocked by the same blocker. 122.1
5
STATISTICS_ALE In context of alert ID 49 (blocked transactions) duplicate keys are possible if the same con 2.00
RTS_BASE nection ID exists on different scale-out nodes. .047
STATISTICS_ALE 259567 In context of alert ID 49 (blocked transactions) duplicate keys are possible due to inadequa 2.00
RTS_BASE te join operations. .048
.06
2.00
.056
STATISTICS_ALE 248283 Alert ID 75 (Alert_Row_Store_Version_Space_Skew) can also suffer from "unique constra 2.00
RTS_BASE int violated" errors. .048
.04
2.00
.055
STATISTICS_ALE 253739 In context of alert ID 94 (Alert_Replication_Logreplay_Backlog) duplicate keys are possib 2.00
RTS_BASE le if multiple secondary sites of the same primary site suffer from the backlog .048
.03
2.00
.053
STATISTICS_ALE 312954 Alert ID 131 (Alert_Admission_Control_Enqueue_Event) can suffer from duplicate keys d 2.00
RTS_BASE ue to a missing join condition in the procedure definition. .059.
15
2.00
.079.
01
17 Record count of Alerts may be issued quite early recommending partitioning of tables. Taking into account the risk of side e
non-partitioned c ffects of partitioning, it can be useful to increase the thresholds and implement / extend partitioning only
olumn-store tabl when the number of records gets closer to the 2 billion record limit. See SAP Note 2044468 for more infor
es mation related to partitioning.
27 Record count of c Alerts may be issued quite early recommending partitioning of tables. Taking into account the risk of side e
olumn-store tabl ffects of partitioning, it can be useful to increase the thresholds and implement / extend partitioning only
e partitions when the number of records gets closer to the 2 billion record limit. See SAP Note 2044468 for more infor
mation related to partitioning.
50 Number of diagn Up to SAP HANA 1.0 SPS 08 the number of trace files is counted on a system-wide basis and not per host.
osis files This can result in misleading alerts. As a workaround you can increase the threshold for the number of trac
e files. Starting with 1.0 SPS 09 this adjustment is normally no longer required.
77 Database disk us The default thresholds (e.g. 300 / 400 / 500 GB) may not match with your system size and so you can adju
age st them based on your needs.
Be aware that in SAP HANA Studio you can only adjust thresholds for the "low", "medium" and "high" level. Thresholds for
the "info" level can be adjusted with SAP HANA Cockpit (SAP Note 2800006).
If you e.g. want to make sure that the history of blocked transactions (ID = 5020) is only collected every five minutes instead
of every single minute, you can increase the interval from 60 to 300 seconds:
It is generally recommended that the history of thread samples (ID = 5034) is only collected at least every 10 minutes in order
to avoid too much data loss in case of a crash or shutdown (check ID M0751). If the current interval is higher you can reduce
it to 10 minutes (600 seconds) with the following command:
7 feature not supported: invalid charact 50 Due to the SAP HANA bug described in SAP Notes 2453766 and 2478767 certain
er encoding 34 column values of M_SERVICE_THREAD_SAMPLES can't be processed correctly
when being historicized to HOST_SERVICE_THREAD_SAMPLES (SAP HANA <
= 1.00.122.11, <= 2.00.012.00, 2.00.020). As a workaround the statistics server pr
ocedure can be adjusted based on the attachment to these SAP Notes.
2 invalid table name 60 This is a bug with SAP HANA 1.00.102.03 that is caused by the syntax change des
5 0 cribed in SAP Note 2241598. You can correct the procedures based on SAP Note 2
9 60 259611.
1
2 invalid column name 50 This is a bug with SAP HANA 1.00.102 to 1.00.102.01, see SAP Note 2239843 for
6 29 more information.
0
2 inserted value too large for column 50 This error can happen with SAP HANA 2.00.000 to 2.00.011 and it is typically lin
7 09 ked to an long FILESYSTEM_TYPE value caused by the fact that a file system typ
4 e is marked as unsupported (e.g. 'UNSUPPORTED (ext4)'). See SAP Note 199993
0 ("Are all types of filesystems supported for SAP HANA?") and make sure that on
ly supported file systems are in place.
2 inserted value too large for column 57 This termination can happen with SAP HANA 2.00.070 - 2.00.071 in context of C
7 05 ollector_Tel_Out_Of_Memory_Events when the string TOTAL_STATEMENT_
4 MEMORY_LIMIT_FROM_WORKLOAD_CLASS is inserted into column EVENT
_REASON, because it exceeds the defined limit of 32 characters (issue number 30
8466). You can use the normal OOM history HOST_OUT_OF_MEMORY_EVEN
TS collected by Collector_Global_Out_Of_Memory_Events that already uses a su
fficient EVENT_REASON length limit of 64 characters.
Analysis commands available via SAP Note 1969700 generally rely on the properl
y working history HOST_OUT_OF_MEMORY_EVENTS, so there is no risk of mi
ssing information.
2 cannot insert NULL or update to NUL 50 This error can happen in context of column OBJECT_TYPE of table HOST_OBJE
8 L 31 CT_LOCKS_BASE when a primary key including column OBJECT_TYPE is in pla
7 ce. The primary key implicitly results in NOT NULL constraints on all involved col
umns while at the same time column OBJECT_TYPE of the source monitoring vie
w M_OBJECT_LOCKS sometimes contains NULL values.
With all current SAP HANA Revision levels the statistics server table HOST_OBJ
ECT_LOCKS_BASE is delivered without primary key. You can manually drop it w
ith the following command:
3 unique constraint violated 50 See "What can I do if the history collection fails with "301: unique constraint viola
0 15 ted"?" above.
1 50
16
50
17
50
34
an
do
the
rs
3 division by zero undefined: search tabl This error can be a consequence of check thresholds being erroneously set to 0. Se
0 e error: [6859] AttributeEngine: divid e SAP Note 2548692 for details. Be aware that also alert IDs different from 3 can
4 e by zero be responsible for the issue.
3 invalid number: not a valid number str 98 This error can happen for action 98 (ALERT_CHECK_CS_LOB_SPACE_RECLAI
3 ing MS) in case a parameter like garbage_collect_daily_schedule_s or garbage_collec
9 t_interval_s is set to a non-number value, e.g. the empty string. Make sure that th
ese parameters are properly configured, i.e. unset or set in line with the best pract
ices in SAP Note 2600030.
Issue number 298734 exists to make sure that the alert implementation gets smar
ter and uses M_CONFIGURATION_PARAMETER_VALUES instead of M_INIFI
LE_CONTENTS for the parameter check. M_CONFIGURATION_PARAMETER_
VALUES properly maps the empty string to the default value of 43200.
4 internal error: Failed to execute create 50 This error can happen with SAP HANA <= 2.00.059.04 and <= 2.00.063 for colle
0 and insert statement: General error: 1 49 ctors COLLECTOR_HOST_LOAD_HISTORY_HOST and COLLECTOR_HOST_
3 29 transaction rolled back by an intern 50 LOAD_HISTORY_SERVICE when temporary tables need to be created on second
al error: cannot change this transactio 50 ary system replication sites in context of join relocation. See SAP Note 3221290 fo
n's access mode from read-only to upd r more details and possible workarounds and solutions.
ate directly: please use "SET TRANSA
CTION READ WRITE" statement first
5 not supported type conversion This error can be a consequence of check thresholds being erroneously set to a no
9 n-integer value. The actual problem value is part of the reported error, e.g.:
2
Not supported conversion from NString to BigInt
('3749.000000000000000000' isn't a valid numeric value)
In this case a threshold for one alert was erroneously set to 3749.000000000000
000000. A change to 3749 resolved the issue.
12 no data found This error can happen when alerts are configured inconsistently. Check metadata
9 tables like _SYS_STATISTICS.STATISTICS_ALERT_THRESHOLDS and correct
9 existing mistakes (e.g. missing severity levels).
6 missing smtp configuration in STATIS See SAP Note 2529478 and make sure that the SMTP parameters are set based on
0 TICS_PROPERTIES your needs:
0
0 internal.smtp.port
internal.smtp.sender
internal.smtp.server
<action> is disabled and will not be ca var This message is recorded when SAP HANA has disabled a check due to a long run
lled iou time, see "Why are some statistics server actions disabled?" above for more detail
s s.
If you want to understand why the long runtime happened, you can analyze the pe
rformance and activities of SAP HANA during the relevant time frame:
Example:
Detail Value
Attention: The timestamp shown in the error message (e.g. "12 is disabled and w
ill not be called. Reason: timeout SNAPSHOT_ID: 2017-09-13 11:23:50.0000000
.") is UTC time, not local system time.
21. What happens if the STATISTICS_SCHEDULE table is manually modified in a wrong way?
Sometimes updates on the STATISTICS_SCHEDULE table are necessary to adjust settings. Erroneous updates can have
undesired effects, so you have to make sure that you only adjust the table in a correct way. For example, setting the STATE to
a value different from 'Disabled', 'Idle', 'Inactive' or 'Scheduled' means that the action will no longer be executed. You can use
SQL: "HANA_StatisticsServer_Schedule" (ONLY_UNKNOWN_STATES = 'X') available via SAP Note 1969700 to detect
faulty states.
25. Why do different statistics server actions run in the system database and tenants?
In multitenant environments (SAP Note 2101244) different statistics server actions are run in the system database and the
tenants based on predefined best practices. It is controlled by the internal.sizing.profile entry in the statistics server control
table STATISTICS_PROPERTIES (SAP Note 2529478). Adjusting this parameter is possible, but it should normally not be
required.
In MCD system databases several alerts are deactivated per default for performance reasons so you shouldn't use the system
database for development or production operations. If you want to activate all alerts for specific reasons, you can adjust the
profile from SYSTEMDB to M:
When you want to return to the original state, you can switch back to SYSTEMDB:
26. How can I monitor and tackle issues with event acknowledgement?
Events are an internal mechanism to inform SAP HANA components like the statistics server about issues, e.g. system
replication issues.
You can evaluate existing events via SQL: "HANA_Events" (SAP Note 1969700).
Check ID M0720 of the SAP HANA Mini Checks (SAP Note 1999993) reports an issue in case events are not purged in time.
In general events should be handled properly, exceptions should always be analyzed. The following known issues and
exceptions exist:
SAP HANA <= 1.00.102.00: General problems with event cleanup
SAP HANA >= 2.00.040: It is normal that a few AddressspaceUsage events exist on a permanent basis, so they can be
ignored.
It is possible to use SAP HANACleaner (SAP Note 2399996) in order to schedule an automatic cleanup of events.
Alternatively you can manually acknowledge the events using hdbcons (SAP Note 2222218). Use "-e <process>" or "-p <pid>"
to individually connect to the services with a high number of events in M_EVENTS:
27. How can I check the state of the statistics server and restart it if required?
SAP Note 2896127 describes how to check the state of the statistics server and steps to activate it again.
28. Can Native Storage Extension (NSE) be used in context of the statistics server tables?
When Native Storage Extension (NSE, SAP Note 2799997) is used, it is recommended to configure it also for the column store
tables of the statistics server. See SAP Note 2983008 for more details. The following parameter is adjusted when NSE is
activated (true) or deactivated (default: false)
29. Are there SQLScript version requirements for the statistics server?
For SAP HANA >= 2.0 the statistics server uses SQLScript version 3 (v3). If for some reasons (e.g. SAP Note 2924907) an
earlier SQLScript version is configured (indexserver.ini -> [sqlscript] -> kernel_mode), the statistics server may terminate
with unspecific errors like "Error during installation: SQL error $code$: $text$".
30. Do statistics server histories also contain information for remote system replication sites?
Up to SAP HANA 2.0 SPS 05 the statistics server histories only contain information for the local database. Starting with SAP
HANA 2.0 SPS 06 and in SAP HANA Cloud also data of other system replication sites (SAP Note ) is collected for most
histories (and some alerts). The system replication site is indicated in column SITE_ID of the history tables. For technical
reasons the following histories don't contain information of other system replication sites:
Consistency checks (GLOBAL_CATALOG_CONSISTENCY, GLOBAL_TABLE_CONSISTENCY)
SQL cache (HOST_SQL_PLAN_CACHE, HOST_SQL_PLAN_CACHE_OVERVIEW)
Job history (HOST_JOB_HISTORY)
Analysis commands of SAP Note 1969700 are provided in specific versions for SAP HANA >= 2.0 SPS 06 that include the
possibility to filter and / or aggregate the system replication site.
You can use SQL: "HANA_StatisticsServer_Schedule" (SAP Note 1969700) in order to determine to what extent statistics
server actions consider remote system replication sites. Depending on the value in column EXT_TYPE the behavior is as
follows:
EXT_TYPE = '': Only primary site is considered
EXT_TYPE = 'SR': All kinds of remote system replication sites are considered
EXT_TYPE = 'AA': Remote system replication sites of type Active/Active (read enabled) are considered
Keywords
GLOBAL_DEC_EXTRACTOR_STATUS
GLOBAL_DISKS
GLOBAL_INTERNAL_EVENTS
GLOBAL_PERSISTENCE_STATISTICS
GLOBAL_ROWSTORE_TABLES_SIZE
GLOBAL_TABLE_PERSISTENCE_STATISTICS
HOST_BLOCKED_TRANSACTIONS
HOST_COLUMN_TABLES_PART_SIZE
HOST_CONNECTIONS
HOST_CONNECTION_STATISTICS
HOST_CS_UNLOADS
HOST_DATA_VOLUME_PAGE_STATISTICS
HOST_DATA_VOLUME_SUPERBLOCK_STATISTICS
HOST_DELTA_MERGE_STATISTICS
HOST_HEAP_ALLOCATORS
HOST_LONG_IDLE_CURSOR
HOST_LONG_RUNNING_STATEMENTS
HOST_LONG_SERIALIZABLE_TRANSACTION
HOST_OBJECT_LOCKS
HOST_OBJECT_LOCK_STATISTICS
HOST_ONE_DAY_FILE_COUNT
HOST_RECORD_LOCKS
HOST_RESOURCE_UTILIZATION_STATISTICS
HOST_RS_MEMORY
HOST_SAVEPOINTS
HOST_SERVICE_COMPONENT_MEMORY
HOST_SERVICE_MEMORY
HOST_SERVICE_STATISTICS
HOST_SERVICE_THREAD_SAMPLES
HOST_SQL_PLAN_CACHE
HOST_SQL_PLAN_CACHE_OVERVIEW
HOST_UNCOMMITTED_WRITE_TRANSACTION
HOST_VOLUME_FILES
HOST_VOLUME_IO_DETAILED_STATISTICS
HOST_VOLUME_IO_RETRY_STATISTICS
HOST_VOLUME_IO_TOTAL_STATISTICS
HOST_WORKLOAD
STATISTICS_ALERTS
STATISTICS_ALERT_INFORMATION
STATISTICS_ALERT_THRESHOLDS
STATISTICS_EMAILRECIPIENTS
STATISTICS_EMAIL_PROCESSING
STATISTICS_OBJECTS
STATISTICS_PROPERTIES
STATISTICS_SCHEDULE
is disabled and will not be called
Attributes
Key Value
Products
Products
2970921 HAN-DB-MON
2962294 HAN-DB- HANA Alert 27 is disabled and will not be called. Reason: timeout SNAPSHOT_ID: <timestamp>
MON
2800006 HAN-CPT- FAQ: SAP HANA Cockpit
CPT2
2548692 HAN-DB- Alert in HANA Studio '[3] 304 division by zero undefined: search table error: [6859] AttributeEngine:
MON divide by zero'
2399996 HAN-DB- How-To: Configuring automatic SAP HANA Cleanup with SAP HANACleaner
MON
2223237 HAN-DB Troubleshooting HANA Embedded Statistics Server Migration - decision tree
2222218 HAN-DB FAQ: SAP HANA Database Server Management Console (hdbcons)
2185556 HAN-CPT- FAQ: SAP HANA Cockpit (delivered with SAP HANA 1.0)
ADM
2159435 HAN-DB How-To: Keeping SAP HANA Row Store in Memory when restarting
2143679 HAN-DB- How-To: Removing Primary Keys of SAP HANA Statistics Server Histories
MON
2137142 HAN-DB- HANA Error: 301 unique constraint violated: TrexUpdate failed on table
MON "_SYS_STATISTICS:HOST_SERVICE_THREAD_SAMPLES_BASE"
2133799 HAN-DB- Analyzing problems with delivery of e-mails for Alerts raised by the SAP HANA Embedded
MON Statisticsserver checks
2127852 HAN-DB- HANA Error: 301 unique constraint violated: TrexUpdate failed on table
MON
2113228 HAN-DB- SAP HANA: Embedded statistics server is not correctly purging
MON
2084747 HAN-DB How-To: Disabling Memory-intensive Data Collections of standalone SAP HANA Statistics Server
2081609 HAN-DB- How to Handle HANA Alert 0: 'Internal statistics server problem'
MON
2044468 HAN-DB- FAQ: SAP HANA Partitioning
ENG
2036630 HAN-DB- statisticsserver migration fails with 'error installing' / 'SQL error 129'
MON
3221290 HAN-DB Internal Statistical Transaction is Rolled Back Due to Failure to Create a Temporary Table for Join
Relocation
2983008 HAN-DB Enable/Disable NSE (PAGE LOADABLE) for column tables of HANA statistics server
2924907 HAN-DB Unexpected Results in SQLScript of SAP HANA 2 SPS04 when Variables with Same Prefix are Used
2478767 HAN-DB Selecting Service Thread Sample Data Fails With an "invalid character encoding" Error Due to Columns
PASSPORT_ROOTCONTEXT_ID or PASSPORT_CONNECTION_ID
2453766 HAN-DB Selecting Service Thread Sample Data Fails With an "invalid character encoding" Error Due to Columns
PASSPORT_ACTION or PASSPORT_COMPONENT_NAME
2374272 HAN-DB- Enabling new HANA Monitoring mechanism for Solution Manager/Focused Run
MON
3583835 HANA_Tables_TopGrowingTables_Size_History/HANA_Tables_TopGrowingTables_Records_History
only shows the old data.
3217863 HAN-DB- Alert "Statistics server has been disabled. Data might be out of date"
MON
2800030 HAN-DB- FAQ: SAP HANA Kernel Profiler
PERF
3030821 HAN-DB- Cockpit does not show longer history than 10 days for performance monitor history data.
MON
2642446 BC-DB-HDB- Transaction DBACOCKPIT gives a warning that the "statisticsserver is deactivated"
CCM
2908132 HAN-DB- How to change the threshold value or scheduling interval for HANA Alerts
MON
2215093 HAN-DB- After upgrading the HANA Database the statisticsserver does not work
MON
2889270 HAN-DB- High CPU Usage by Embedded Statistics server with CALL
MON _SYS_STATISTICS.STATISTICS_SCHEDULABLEWRAPPER
2772514 HAN-DB- EWA report for HANA has the alert 'Identifies internal statistics server problem'
MON
2154844 HAN-DB HANA Alerts keep getting disabled after switching to the embedded statisticserver
2638539 HAN-DB- Difference between Statisticsserver check status 'Inactive' and 'Disabled'
MON
2736234 HAN-LM- Upgrade from HANA 1.0 to 2.0 failed due to ESS not converted
UPG-DB
2732928 HAN-DB-HA How to deal with Alert "Service on <hostname>:<service port number> has increased log replay backlog"
2313619 HAN-DB- How-To: Generating and Evaluating SAP HANA Call Stacks
MON
2629590 HAN-DB- Recommendation for Interval Length for a statistics server collector
MON
2536974 HAN-DB- The system is running without alerts, but not all checks are being performed
MON
2493696 HAN-DB- EWA Report - "Number of collectors with retention times < 14" is equal to 1
MON
2488311 HAN-DB- How to Manage the Volume of Data Collected by the Statistics Service
MON
2399996 HAN-DB- How-To: Configuring automatic SAP HANA Cleanup with SAP HANACleaner
MON
2222277 HAN-DB- FAQ: SAP HANA Column Store and Row Store
PER
2222218 HAN-DB FAQ: SAP HANA Database Server Management Console (hdbcons)
2143679 HAN-DB- How-To: Removing Primary Keys of SAP HANA Statistics Server Histories
MON
2159435 HAN-DB How-To: Keeping SAP HANA Row Store in Memory when restarting
1999020 HAN-DB How-To: SAP HANA Troubleshooting when Database is no longer accessible
2983008 HAN-DB Enable/Disable NSE (PAGE LOADABLE) for column tables of HANA statistics server
2957968 SV-SMG- Activate Table Statistics on HDB for DVM Cloud Application
DVM
2570661 HAN-DB Exception 71000287 During Execution of Internal Statement Within Procedure
"_SYS_STATISTICS"."HELPER_ALERT_MISSING_VOLUME_FILE_AGE"
2461913 HAN-DB Indexserver Crashes During Startup With "Assertion failed: size_t(readStart) - 1 ==
m_RowMapToTarget.size()"
2260972 HAN-DB- High memory consumption if some checks of embedded Statistics Server are called manually
MON