HANA ABAP MiniChecks
HANA ABAP MiniChecks
HANA ABAP MiniChecks
/*
[NAME]
- HANA_ABAP_MiniChecks
[DESCRIPTION]
[SOURCE]
- Needs to be run as ABAP schema owner as access to ABAP table data is required,
otherwise an error like the following is reported:
[259]: invalid table name: Could not find table/view <table> in schema <schema>
- If access to ABAP objects is possible but you cannot log on as ABAP user, you can
switch the default schema before executing the command:
- Checks returned with VALUE = <manual> are part of the TPO service (SAP Note
2177604) but need to
be checked manually because no simple SQL solution is available
[VALID FOR]
- Revisions: all
- Client application: ABAP
[INVOLVED TABLES]
- various
[INPUT PARAMETERS]
- ONLY_POTENTIALLY_CRITICAL_RESULTS
'X' --> Output only contains issues that can potentially indicate a
problem
' ' --> no output restriction
- EXCLUDE_MANUAL_CHECK
- MAX_VALUE_LENGTH
- CHECK_ID
- CHECK_ID_PREFIX
[OUTPUT PARAMETERS]
- CHID: Check identifier (defined and used by this Mini Check command)
- DESCRIPTION: Check description
- VALUE: Check value found on the system
- EXPECTED_VALUE: Expected check values
- C: 'X' if value found on the system is outside of the expected
values (indication for potentially critical problem)
- SAP_NOTE: Related SAP Note
[EXAMPLE OUTPUT]
-----------------------------------------------------------------------------------
-------------------------------------
|CHID |DESCRIPTION |VALUE
|EXPECTED_VALUE|C|SAP_NOTE|
-----------------------------------------------------------------------------------
-------------------------------------
|**** |SAP ABAP MINI CHECKS |
| | | |
| | |
| | | |
|A0009|ABAP mini check version |1.0.4 (2019/01/07)
| | | |
|A0010|Analysis date |2019/01/07 15:13:19 (CET)
| | | |
|A0012|SAP HANA version |1.00.122.17.1526900527
(fa/hana1sp12) | | | |
| | |
| | | |
|A0300|ABAP short dumps (last day) |115
|<= 500 | | |
|A0310|ABAP short dumps DB* (last day) |9
|<= 5 |X| 2399990|
|A0500|Parameter: rsdb/prefer_join_with_fda |okay (0)
|like 'okay%' | | 2600030|
|A0501|Parameter: dbs/hdb/prefer_join_with_fda|okay (0)
|like 'okay%' | | 2600030|
|A0502|Parameter: rsdb/supports_fda_prot |okay (1)
|like 'okay%' | | 2600030|
|A0503|Parameter: dbs/hdb/supports_fda_prot |okay (not set)
|like 'okay%' | | 2600030|
|A0505|Parameter: rsdb/max_in_blocking_factor |okay (100)
|like 'okay%' | | 2600030|
|A0507|Parameter: rsdb/max_blocking_factor |wrong (5 instead of 50)
|like 'okay%' |X| 2600030|
|A0510|Parameter: dbs/hdb/cmd_buffersize |wrong (1048576 instead of 2097152 to
10485760)|like 'okay%' |X| 2600030|
|A0512|Parameter: dbs/hdb/stmt_cache_size |okay (1000)
|like 'okay%' | | 2600030|
|A0800|Update requests in status Cancelled |1075
|<= 100 |X| |
|A0805|Update requests in status Started |0
|0 | | |
|A0850|Cancelled batch jobs (last day) |3
|<= 100 | | |
|A0855|Longest running batch job (s) |163002
|<= 86400 |X| |
|A0900|SQLM activated |no
|yes |X| 1885926|
|A1000|BW data targets with many requests |0
|0 | | 1431315|
|A1005|Number of HANA-optimized DSOs |0
|0 | | 1849497|
|A5000|Physical cluster tables |none
|none | | 1892354|
|A5001|Physical pool tables |none
|none | | 1892354|
| | |
| | | |
|**** |END OF CHECK |
| | | |
-----------------------------------------------------------------------------------
-------------------------------------
*/
BASIS_INFO AS
( SELECT /* Modification section */
' ' ONLY_POTENTIALLY_CRITICAL_RESULTS,
'X' EXCLUDE_MANUAL_CHECKS,
60 MAX_VALUE_LENGTH,
-1 CHECK_ID,
'A' CHECK_ID_PREFIX
FROM
DUMMY
),
HANA_RELEASE AS
( SELECT
VERSION,
REVISION
FROM
( SELECT
TO_NUMBER(SUBSTR(VALUE, 1, 1)) VERSION,
TO_DECIMAL(SUBSTR(VALUE, LOCATE(VALUE, '.', 1, 2) + 1, LOCATE(VALUE, '.', 1,
3) - LOCATE(VALUE, '.', 1, 2) - 1) ||
MAP(LOCATE(VALUE, '.', 1, 4), 0, '', '.' || SUBSTR(VALUE, LOCATE(VALUE, '.',
1, 3) + 1, LOCATE(VALUE, '.', 1, 4) - LOCATE(VALUE, '.', 1, 3) - 1 )), 10, 2)
REVISION
FROM
M_SYSTEM_OVERVIEW
WHERE
SECTION = 'System' AND
NAME = 'Version'
)
),
PARAMETER_SETTINGS AS
( SELECT
IFNULL(IFNULL(IFNULL(IFNULL(DATABASE_VALUE, SYSTEM_VALUE), HOST_VALUE),
DEFAULT_VALUE), 'n/a') COMPOSITE_STATISTICS_STRIPING
FROM
DUMMY LEFT OUTER JOIN
( SELECT
MAX(MAP(LAYER_NAME, 'DEFAULT', VALUE)) DEFAULT_VALUE,
MAX(MAP(LAYER_NAME, 'HOST', VALUE)) HOST_VALUE,
MAX(MAP(LAYER_NAME, 'SYSTEM', VALUE)) SYSTEM_VALUE,
MAX(MAP(LAYER_NAME, 'DATABASE', VALUE)) DATABASE_VALUE
FROM
M_INIFILE_CONTENTS
WHERE
KEY = 'composite_statistics_striping'
GROUP BY
KEY
) ON
1 = 1
),
WORK_PROCESSES AS
( SELECT
COUNT(DISTINCT(CLIENT_HOST || CLIENT_PID)) NUM_WPS
FROM
M_SESSION_CONTEXT SC,
M_CONNECTIONS C
WHERE
SC.KEY = 'APPLICATION' AND
( SC.VALUE LIKE 'ABAP:%' OR SC.VALUE LIKE 'dw.sap%' ) AND
SC.HOST = C.HOST AND
SC.PORT = C.PORT AND
SC.CONNECTION_ID = C.CONNECTION_ID
),
ABAP_CHECKS AS
( SELECT -1 CHECK_ID, '' NAME, '' DESCRIPTION,
'' SAP_NOTE, '' EXPECTED_OP, '' EXPECTED_VALUE FROM DUMMY WHERE 1 = 0 UNION ALL
( SELECT 1, 'INFO_LINE', 'SAP ABAP MINI CHECKS',
'', 'any', 'any' FROM DUMMY ) UNION ALL
( SELECT 2, 'BLANK_LINE', '',
'', 'any', 'any' FROM DUMMY ) UNION ALL
( SELECT 9, 'CHECK_VERSION', 'ABAP mini check version',
'', 'any', 'any' FROM DUMMY ) UNION ALL
( SELECT 10, 'ANALYSIS_DATE', 'Analysis date',
'', 'any', 'any' FROM DUMMY ) UNION ALL
( SELECT 11, 'DATABASE_NAME', 'Database name',
'', 'any', 'any' FROM DUMMY ) UNION ALL
( SELECT 12, 'REVISION_LEVEL', 'SAP HANA version',
'', 'any', 'any' FROM DUMMY ) UNION ALL