You probably use the Table Switch Procedure in your PI system.  However, you may not be familiar with how it actually works.

The Table Switch Procedure is used to delete messages in your system.  All the messages in your system can be divided into three types:

Type 1 – messages are not in retention period and with final status so that they can be deleted.
Type 2 – messages are not in retention period but do not have final status so that they cannot be deleted.
Type 3 – messages are in retention period so that they cannot be deleted.

When the switch procedure starts, there are three steps to deal with these messages:
Step 1 – Messages of Type 1 are deleted logically. The table entries are not physically deleted from the database tables. Instead, the flag “Deleted” is set in the master entry.
Step 2 – Messages of Type 2 and 3 which do not have the delete flags set will be copied to new tables.
Step 3 – The original tables in the database are dropped and then recreated again immediately. Messages of Type 1 which have the delete flags set are physically deleted in their tables.

Sometimes you might face a critical situation when the table switch procedure is in use. This most likely is because of the following reasons:

• During the execution of the switch, additional table space is required to copy the valid messages to the new master table. Only after the copy job finishes can the original tables be dropped. The disc space consumption increases considerably after you activate this switch procedure.

• The copy process takes long time

• While a switch is pending, no other reorganization job is allowed to start; in particular, neither deletion jobs nor archiving jobs can run and therefore the space issue becomes even more critical.

However, Table Switch Control (report RSXMB_TABLE_SWITCH_CONTROL) is available as of SAP Note 2106462. It allows you to get out of situations like these on your own and complete the pending switch.

Upon start the report provides detailed information on the current status of a pending switch. By pressing the push buttons with recycling bin icon, you can perform a physical deletion of inactive messages (either logically deleted messages or messages that already have been copied).

11.PNG

Additionally, this report provides the option to revert the direction of the switch. Reverting the direction is a critical operation and multiple pre-conditions must be fulfilled. All of these conditions are checked automatically and changing the direction is enabled if and only if all conditions are fulfilled:

12.PNG

Just by clicking the execution button you can revert the direction of the switch:

13.PNG

Pre-requisites:

The harmonized persistence layer is an indispensable prerequisite for the Table Switch Control report. Harmonization is delivered by SAP Notes 2038403 & 2095113.

Related Notes:

SAP Note 872388 – Troubleshooting archiving and deletion in PI
SAP Note 2038403 – Harmonization of PI persistence layer
SAP Note 2095113 – Harmonization of PI persistence layer II
SAP Note 2039256 – PI: How to calculate the remaining messages to be copied during the Switch Procedure
SAP Note 2041299 – PI: How to calculate the time remaining before the Switch procedure completes
SAP Note 2106462 – Kontrolle des Switchverfahrens

Related Docs:

Troubleshooting for Archive and Delete on Integration Engine

Overview of the Switch Deletion Procedure

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

    1. Tina You Post author

      Hi Prasad,

      Thanks for your kind remind. I have updated the images again and it will be OK now.

      Could you please check again?

      Best Regards,

      Tina

      (0) 

Leave a Reply