Introduction
OSS notes related to housekeeping
Preventing Basis tables from increasing considerably.
2388483 - How-To: Data Management for Technical Tables
2388483 - How-To: Data Management for Technical Tables
Old oss note related to Housekeeping : 706478
| Table of Contents | ||
|---|---|---|
|
Why do we need a house cleaning procedure ?
This procedure explains how to delete data from the BW servers which are no longer useful. There are several reasons for doing that :
- It increases the overall performances of the system (Reading in a table with 1M lines if faster than on a table with 10M lines)
- It reduces the cost of the BW server hosting : the price of the hosting depends on the number of go of storage used.
- It makes maintenance and overall usage of BW easier/clearer for everyone as you no longer have to filter out obsolete objects.
- It shortens the time taken to copy servers (ex : prod to quality) and therefore save time for technical team but also reduces the downtime of the servers for those operations.
For reference, the cost of 1 Go (depends on the SLA level & decreases with time - Empty storage about 20% is not invoiced) :
Storage Cost €/Go | 2015 | 2016 |
|---|---|---|
L1 - WBP | 1.78 | 1.68 |
L2 - PQ1 / PQ2 / WBD | 0.99 | 0.94 |
L3 - WB1 / WBQ / SQ1 / SQ2 / DQ1 / DQ2 | 0.5 | 0.47 |
Overall logic of the house cleaning procedure
In this clean 4 main types of data :
1 - Business Data : The data used by the reports and users. It's all the data found in the info-providers and related objects.
2 - Statistics Data : All the logs and historical saved data that results of the usage and maintenance of BW.
3 - Meta Data : Basically the content created by the users. Queries, workbooks, bookmarks...
4 - Database Platform : All data generated by oracle and SAP internally (Usually not much we can do).
When to run this procedure
The full procedure should only be conducted once a year on each server and mainly on the production servers.
- Keep in mind that some processes take a long time to run and take processes. Better run when server is under light workload.
- It's best to do it just before the production server is copied to quality/simulation in order to shorten the copy process.
- Each step can be run individually on different schedules.
Deletion of Log Files - PC Instances
1 - Go to SE38
2 - Run program RSPC_INSTANCE_CLEANUP
3 - In Older than : current date - 365
| Main parameter | Value |
|---|---|
Older Than | Current Date - 365 |
| Delete Logs | Checked |
| Main tables cleaned |
|---|
RSPCINSTANCE RSPCINSTANCET |
Deletion of Log FILES - Process Chain Log
1 - Go to SE38
2 - Run program RSPC_LOG_DELETE
3 - In the "Up to and including date" enter current date - 365
| Main parameter | Value |
|---|---|
Up to and including date | Current Date - 365 |
RSPCLOGCHAIN
Deletion of Log Files - Job Status
| Info | ||
|---|---|---|
| ||
This is already scheduled automatically (at least on WBP) |
1 - Go to SE38
2 - Run program RSBTCDEL2
3 - Run with default values and "Test Run" unchecked
TBTCO
Delete Idocs
1 - Go to SE38
2 - Run program RSETESTD
| Info | ||
|---|---|---|
| ||
The BW team doesn't have the access to run this report - It is necessary to request it from the SAP Technical Team |
| Main tables cleaned |
|---|
EDI40 EDIDC EDIDS |
Business Data
Delete empty, un-used partitions for cubes
For each of the largest partitioned cubes, this can be run to delete useless partitions. This is particularly important after data was deleted from the cubes.
1 - Go to SE38 transaction
2 - Run program SAP_DROP_EMPTY_FPARTITIONS
3 - Input in CUBENAME the name of the cube you want to clean
4 - Execute once with the "Show Option"
5 - Check the result of the analysis
6 - Depending on the result, re-execute the program with "DO_DROP" checked and either "DEL_CNT" or "DEL_DIM"
Deletion of unused dimension entries
How to
As this program run's individually for each infocube, it cannot be launched for all. You need to identify the info-providers with the largest table dimensions and then apply the program to those cubes.
1 - Go to DB02
2 - Double click on "BW Analysis" on the left menu :
3 - Double click on the "Cubes & related objects - Dimension" line
4 - Sort the results by "Size". This provides the largest dimensions in BW. You can then run the program on those infocubes.
5 - Go to transaction RSRV
6 - Select the test "Unused entries in InfoCube dimension" and double click to add it to the tests to run
7 - Double click on the right side "Unused entries in InfoCube dimension" and enter the name of the infocube you want to clean
8 - Click on Execute
| Info | ||
|---|---|---|
| ||
Note that function module RSDDCVER_DIM_UNUSED can also be used for this. But it will not provide any logs. |
9 - Once the check is finished, go back, select the test line (on the right) and then "Correct Error" - Then select YES for Carry out Repairs.
Business Data
Delete empty, un-used partitions for cubes
For each of the largest partitioned cubes, this can be run to delete useless partitions. This is particularly important after data was deleted from the cubes.
1 - Go to SE38 transaction
2 - Run program SAP_DROP_EMPTY_FPARTITIONS
3 - Input in CUBENAME the name of the cube you want to clean
4 - Execute once with the "Show Option"
5 - Check the result of the analysis
6 - Depending on the result, re-execute the program with "DO_DROP" checked and either "DEL_CNT" or "DEL_DIM"
Deletion of Aggregates
1 - Go to RSA1 transaction
2 - In the left menu, click on Administration --> Monitors --> Aggregates
3 - Analyse each aggregate to see if it is useful
To know if the aggregate can be deleted :
- If the cube is already in BI Acceletor --> Delete the aggregate as BI Accelerator is used first.
- If the valuation of the aggregate is not positive (Ex : |+++ ) then it means it doesn't improve the execution time --> Delete the aggregate
- If the number of "Usage" is very low considering the time since the aggregate creation --> Delete the aggregate since it's not used much
4 - To delete the aggregate, for each cube selected, go to RSA1
5 - Select the cube and right click --> Manage
6 - Go to the Rollup tab and click on "Aggregates"
7 - Select the aggregate, right click and delete
Delete un-used & obsolete infoproviders & info-objects
Info-providers and info-objects that are no longer useful should be deleted.
In this case, it is necessary to request approval from the object owner :
- Reporting CC Manager if technical object
- Reporting coordinator of the relevant process for other objects
One way of identifying the obsolete objects is to check the date of last loading.
Database re-organisations
In many cases, removing data from a table will not decrease the table size, nor the tablespace size, nor the total database size.
It's necessary to request a re-organisation from IBM in order to really reflect the size change.
Several types of re-organisations can be requested :
- Table re-org : The table will be re-organized to take less space. This won't affect the tablespace of database size. It will simply review the size taken by the table and it's index to free some space.
- Note that even if the table is empty, there is a minimum size defined for each table in the system. A table with 0 lines will therefore have the minimum size after re-org.
- Tablespace re-org : The full tablespace is re-organised. In this case it will move out and copy back all tables and reduce the size of the tablespace, It will effectively decrease the size of the database accordingly (reducing the "free" space).
- Full database re-org : This does a full re-org on all the tablespaces.
Symptom : Size of RSBKDATA or RSBKDATAINFO is huge.
Oss note : 2407784 - How to clean up RSBKDATA and related tables
Resolution
1. NEVER delete data from RSBKDATA/RSBKDATAINFO directly
2. Make sure all corrections for reports RSBKCHECKBUFFER and RSBKCLEANUPBUFFER are implemented
3. Apply the note: 2692909 P21; DTP; RSBKDATA: Deletion of temporary data also for TSN requests
4. To clean up RSBKDATA and RSBKDATAINFO as much as possible, you can use the program RSBKCLEANUPBUFFER
1759601 - P30:DTP:Request temporary storage is deleted too soon
•
1911677 - P32:DTP:Error handler no longer deleted
•
RSBKCHECKBUFFER - Cleaning Up the Temporary Storage of the Data Transfer Process
RSBKCLEANUPBUFFER - Deletion of orphand Entries in Errorstack/Log
5. SAP Recommends to run RSBKCHECKBUFFER DAILY in background: Cleaning Up the Temporary Storage of the Data Transfer Process
6. For ADSOs, please refer to SAP Note 2228793 - ADSO DTP Request and Temporary Storage
Currently, it is not to reduce the size of the table RSBKDATAPAKID.
RSBM_ERRORLOG_DELETE JOB → Only on WBD
max 60 days.
DTP error logs to avoid to have big table
RSBERRORLOG and RSBERRORCHANGED
General topics on the recurrent taks done or could be done on BW environnements :
| Embedded Google Drive File | ||
|---|---|---|
|
Deletion of Aggregates
1 - Go to RSA1 transaction
2 - In the left menu, click on Administration --> Monitors --> Aggregates
3 - Analyse each aggregate to see if it is useful
To know if the aggregate can be deleted :
- If the cube is already in BI Acceletor --> Delete the aggregate as BI Accelerator is used first.
- If the valuation of the aggregate is not positive (Ex : |+++ ) then it means it doesn't improve the execution time --> Delete the aggregate
- If the number of "Usage" is very low considering the time since the aggregate creation --> Delete the aggregate since it's not used much
4 - To delete the aggregate, for each cube selected, go to RSA1
5 - Select the cube and right click --> Manage
6 - Go to the Rollup tab and click on "Aggregates"
7 - Select the aggregate, right click and delete
Deletion of PSA
How to check the biggest table of PSA
- Go to Tcode DB02
- Select Space --> Additional Function --> BW Analysis. The overall size of PSA will be display like picture below.
- Double click on PSA line to display detail of each datasource. Sort the size in order to see the biggest table.
- To find the name of datasource. Go to SE16 - RSTSODS and enter BW Object from DB02 into Technical ODS Name. Execute it, the name of datasource will be display
- Then, go to check on the flow in process chain. In order to delete the PSA, it has to be deleted by process chain.
How to Delete PSA
- Add object 'Deletion of Requests from PSA
- Enter parameter for each data source
The time should be:
- Delta loading is 7 days
- Full load is 1 day
Note:- The best practice is modified process chain in development system
- Deletion of PSA should be at the end of process chain.
- Check the big PSA once a year and if missing process is found, modify the process chain



















































