Professional Documents
Culture Documents
This document contains a brief description of the purpose and usage of the ABAP
report RSDU_TABLE_CONSISTENCY. Please note that checking for and repairing
inconsistencies needs constant changes and enhancements. This document is
therefore subject to frequent updates and will be delivered with note 1937062.
Table of Contents
1
Purpose.......................................................................................................................... 3
Delivery .......................................................................................................................... 3
Operation ....................................................................................................................... 3
3.1
3.2
3.3
Restrictions ............................................................................................................. 4
4.1.1
4.1.2
4.1.3
4.2
4.3
6.1
CL_SCEN_DEAD_TABLES ...................................................................................11
6.2
CL_SCEN_SEC_INDEX ........................................................................................11
6.3
CL_SCEN_PRIMARY_KEY ...................................................................................11
6.4
CL_SCEN_PARTITION_SPEC ..............................................................................11
6.4.1
6.4.2
6.4.3
6.4.4
6.5
CL_SCEN_STORAGE_TYPE ................................................................................14
6.6
CL_SCEN_COMPRESSION ..................................................................................14
Page 2 of 16
Purpose
RSDU_TABLE_CONSISTENCY checks the consistency of table properties on HANA with
certain needs and restrictions defined by SAP BW application. The report should help to
ensure a consistent work of BW functionality on HANA DB and its suggested to run after
critical processes like migration, restore etc. Moreover, you can use this report during regular
operation, if error messages or slow performance are suspected to be caused by
inconsistencies of BW tables on HANA.
1 Delivery
Since RSDU_TABLE_CONSISTENCY is part of the regular SAP BW coding it is delivered
with the support packages of the releases 7.30, 731, 7.40 and above. Moreover the latest
corrections and enhancements will be available with the notes 2163258 (SAP_BASIS) and
2164519 (SAP_BW). Please note that the note numbers will change from time to time. It is
updated in each case in this document. Its important to apply the notes above in the correct
sequence: first apply SAP_BASIS followed by the note for SAP_BW! You need to apply the
latest notes only.
To avoid unnecessary problems when implementing notes, it is advisable to previously
ensure the correct operation of SNOTE with the note 1668882.
Table 1: History of notes for RSDU_TABLE_CONSISTENCY
Change No.
Note for
SAP_BASIS
Note for
SAP_BW
07
2163258
2164519
06
2093836
2099114
05
2025241
2025271
04
1953984
1953493
03
1892492
1888511
02
1814339
1814097
2 Operation
The operation of the report is strongly divided into two parts: Check and Repair, which
cant be combined in a single run!
an Issue Store.1 Apart from the storage of the issues, the check for inconsistencies is
pure read-only for both HANA and BW.
2.3 Restrictions
RSDU_TABLE_CONSISTENCY will work with HANA DB only. It will not regard a HANA DB
at secondary DB connections.
The report can analyze only tables of BW objects which are activated and consistent within
their BW metadata.
Data selection
By default the Table names field remains empty. In this case all tables found on HANA DB
will be checked, if they are relevant for BW2. Alternatively a selection of tables can be
provided by including or excluding (multiple) table names and/or ranges. Also the use of
wildcards (*) is supported.
Page 4 of 16
3.1.2
Operational modes
If there are no stored issues, only two possible modes are displayed in this section:
Show issues in GUI will perform the consistency check and display the found issues on
screen only. This is intended to get a quick view of the consistency for only few tables, if no
repair is wanted and no storage of the result is needed. Please note: the results are lost,
after leaving the report.
Store issues will perform the consistency check like above but the results are stored in the
issues store. You can review the issues later, since they are persistent. This is the
prerequisite to repair the found issues later.
3.1.3
In the 3th section you can enable several check scenarios where the selected tables are
checked for certain properties. Not all scenarios are relevant for any type of tables. However
in most cases its recommended to select all available scenarios. Please refer a description
of the available consistency check scenarios in section 5 (on page 11).
As usual with ABAP reports, the consistency check is started with the F8 key resp. icon .
Since the report may need a long runtime if lots of tables are checked, its reasonable to run
this report in background via menu Program -> Execute in Background. Please note: if you
run the program in background, any results will be available only with usage of the
operational mode Store issues!
Page 5 of 16
Please note: After the report is closed, the results are not available anymore!
If the mode Store issues was selected, the log screen is displayed too (in case of online
processing), but all found issues are additionally stored in the issue store and youll find an
additional section in the initial screen as shown in
Figure 3 (on page 7) named Issues from previous checks.
Page 6 of 16
Here youll find the overall number of found issues as well as the number of already selected
issues. Using the button
an overview of issues found in the various check scenarios
will be displayed as shown in Figure 4 (on page 7). In this example some check scenarios
results numerous inconsistencies.
This screen provides an overview at an overview of when and by whom any missing
references were found. Whenever the consistency check is performed again and
inconsistencies are found, they are added here.
In the Example (as shown in Figure 4) 31 issues found during the partition check
scenario is marked among lots of other results.
A detailed view of the found inconsistencies of a particular check scenario will be displayed
when you double-click on the relevant line. In Figure 5 (on page 8) the corresponding
Example of the detailed view is shown.
Page 7 of 16
Please use the first (selection-) column and the [Ctrl]-Key in order to select multiple ranges of issues.
If you want to select all issues, use the
button above.
Page 9 of 16
After selecting the issues for repair go back to the initial screen. Here a third operational
mode Repair is available. If this mode is selected the scenario list vanishes, since check
scenarios are irrelevant in this mode. As shown in Figure 7 a number of issues is selected
now.
Starting the report with the button
will repair the selected issues. However, since any
repair contains write processes on HANA the runtime might be quite long. Therefore its
recommended to run RSDU_TABLE_CONSISTENCY in repair mode always in background
in order to avoid timeout errors.
Page 10 of 16
5.2 CL_SCEN_SEC_INDEX
Fact tables should have no secondary indices, neither on HANA DB nor in the data
dictionary. This scenario checks all fact tables for secondary indexes and proposed them to
delete the secondary indexes from HANA DB as well as from DDIC if found any.
5.3 CL_SCEN_PRIMARY_KEY
In SAP BW all fact tables, PSA tables as well as tables of Write Optimized DSOs should not
have primary keys. The primary key scenario checks this tables for primary key on HANA DB
and proposed the table to delete the primary key from HANA DB if found one.
5.4 CL_SCEN_PARTITION_SPEC
This scenario reads the partition specs of BW tables from HANA DB and compares them
with the partitioning expected by BW application. Due to the increased importance of table
partitioning in HANA, it may be the most frequent used check scenario in this consistency
check report. This check is relevant for tables maintained by PSA-service (PSA-Tables), the
Page 11 of 16
Active Tables and Activation Queues of DSOs as well as the E- and F-Fact Tables of
Infocubes.
5.4.1
Tables using the BW naming conventions /BI*/B* (e.g. ErrorStacks, ChangeLogs, FastStore
etc.) are expected to have a HASH partitioning in first level and may have a RANGE
partitioning in second level. The HASH partitioning contains the technical key of the DSO:
HASH <NumServers> REQUEST, DATAPAKID, RECORD
where <NumServers> is the number of servers to which the table is distributed. Whether a
RANGE partitioning is expected or not, depends on certain factors:
The property Unique Key corresponds to the attribute "Allow Duplicate Data Records, which can
be maintained for a DSO e.g. via TA RSA1.
Page 12 of 16
If Unique Key is used, the First level HASH partitioning is expected to contain the semantical
key of the DSO
HASH <NumServers> <SemKey1>, <SemKey2>, , <SemKeyN>
Otherwise the first level HASH partitioning will be checked to contain the technical key, like:
HASH <NumServers> REQUEST, DATAPAKID, RECORD
Please note: Since there no significant performance impact as well as no functional gap,
missing semantical keys in the HASH partition specification will be tolerated and not marked
to be inconsistent.
The Active Table and the Activation Queue of Write-Optimized DSOs may be RANGE
partitioned at second level via PSA service. If so, for the second level partitioning the same
rules and limitations as described for PSA tables are expected:
RANGE PARTNO <val1>,<val2>, , <valN>.
5.4.3
Fact tables of infocubes with the naming convention /BI*/E* and /BI*/F* are expected to have
a two level partitioning: First level a ROUNDROBIN partitioning is expected:
ROUNDROBIN <NumServers>
with <NumServers> describing the number of indexservers the table is distributed. The
second level RANGE partitioning is built by the Package Dimension as stored in the PDimension-Table /BI*/D*P.
In a Classical Cube the F-Fact-Table the packages for normal values and reference points
are represented in the range partition specification together with a rest partition *
RANGE <PackageDimension> <normal>, <refpoint>, *
The E-Fact-Table additionally expects a range for the historic values:
RANGE <PackageDimension> <normal>, <refpoint>, <historic>, *
In a Flat Cube the E-Table doesnt exists. The Check expects following RANGEPARTITIONING for the F-Table:
RANGE <PackageDimension> <normal>, <refpoint>, <historic>, *
5.4.4
Corresponding tables like Active Table and Activation Queue of DSOs or E- and F-Fact
tables in classical cubes are expected to have the same number of first level partitions. This
restriction is essential for a number of important processes in SAP BW (e.g. Conversion of
Infocubes to Flat Cubes). Therefore an Expert-Option (See section 7.1) Force
NUM_SERVERS check enables an additional check, expecting the HASH- and RANGEPartitioning has the same values of <NumServers> for the corresponding tables on HANA
DB.
Page 13 of 16
5.5 CL_SCEN_STORAGE_TYPE
To Be Done!
5.6 CL_SCEN_COMPRESSION
To Be Done!
ERROR (3) at table <tab>: Number range for package dimension is inconsistent:
The report is unable to read the package dimensions due to an inconsistency within
the InfoCube metadata and subsequently cant determine the RANGE partitioning.
Please refer transaction RSRV for checking the relevant cubes.
Only active ODS objects can be checked for consistent table properties. This
message points to the fact, that the related ODS object was not activated. Use
transaction RSA1 to activate it.
7 Special topics
7.1 The Expert parameters
Due to some unexpected problems with inconsistencies concerning HANA DB, the report
RSDU_TABLE_CONSISTENCY was extended with some additional functions. They are
accessible by typing the word expert in the command line of the initial screen.
Please note: The use of this expert-parameters should not be needed in regular
work. But it will help in situations to detect and correct certain error conditions.
Ignore BW locks is only relevant for repairing issues. This forces the repair process
not to regard locks on BW objects. It can be needed, if BW processes results errors
due to inconsistent HANA tables but doesnt release their lock for some reasons (e.g.
RSMIGRHANADB raised an error like flatten scenario failed
Please be careful! Dont use it for repairing large number of tables, because of
competing write access to the tables can lead to further inconsistencies!
Parallel repair runs the repair actions on multiple HANA servers simultaneously. Its
reasonable, if a large number of tables need to be repaired on a scale-out system.
Force NUM_SERVERS check is a special check for HASH partitions of DSO- and
Fact-Tables. Usually RSDU_TABLE_CONSISTENCY doesnt check the number of
servers in HASH partitions. But in certain cases it needed to check, if the number of
HASH partitions of the active table and the activation queue is the same.
Force table classification allows checking the classification of HANA tables without
regarding if Table Placement is active or not. This might be reasonable in case of
authorization problems with the table _SYS_REPO.SCHEMAVERSION or
_SYS_RT.TABLE_PLACEMENT. Please dont use this parameter without explicit
suggestion by SAP support.
Page 15 of 16
Check all tables (storage type only) enables (in contrast to section 2.1) to check all
SAP tables found on HANA for the correct storage type (row store or column store).
Page 16 of 16