SAP Note Number 872388 - Troubleshooting Archiving and Deletion in XI 3.0 Note Language: English Version: 9 Validity: Valid from 13.02.2007 Summary Symptom Your database of your XI 3.0 or XI 7.0 system is growing and you would like to know how to remove messages from the database. You have scheduled the required deletion and archiving jobs, but some or all messages are neither deleted nor archived. More Terms Archiving, Deletion, SXMSPMAST, SXMSPMAST2, SXMSCLUR, SXMSCLUR2, SXMSCLUP, SMXSLUP2, XI_AF_MSG, workitem, ccBPM Cause and Prerequisites Solution If you need detailed information about deletion and archiving please consult http://help.sap.com. For directly accessing the respective chapters, please use: 1) For messages in the Integration Server http://help.sap.com/saphelp_nw 04/helpdata/en/0e/80553b4d53273de10000000a114084/content.htm 2) For messages in the Adapter Framework: note 816022, question 8 (deletion) and http://help.sap.com/saphelp_nw04/helpdata/en/cf/b2fc3f48ecc742e10000000a 1550b0/content.htm (archiving) 3) for workitems in the Integration Server: note 836092 4) for history entries in the Integration Server: Introduction: Compared to XI 2.0, the archiving and deletion of runtime items in XI 3.0 has become more complex. In addition to XML messages in the ABAP Integration Server and history entries, the administrator has to care about XML message in the JAVA Adapter Framework (AFW) as well as workitems from Business Processes (ccBPM). In general, there are for all three components two ways to remove the relevant objects from the database of the Exchange Infrastructure system: 1) Deletion 2) Archiving. The excpetion are the history entries which can only be deleted. If nothing has been defined, the XML messages as well as the workitems will get deleted by the deletion procedure (see links above). For the archiving, different actions need to be taken, depending on the type of object you would like to archive: - To archive interfaces in the Integration Server, the interfaces have to be defined for archiving via transaction SXMB_ADM -> "Define Interfaces for Archiving and Retention Periods". These messages will only be removed from the database via the archiving procedure. Deletion procedures will not affect them. - To archive workitems, it is sufficient to plan archiving jobs as described in the link above. If a deletion job is running as well, it will delete workitems, i. e., there is no flag for workitems as for XML messages in the Integration Server. - To archive interfaces in the Adapter Framework (AFW), the XML DAS (Data Archiving Store) has to be set up. If no archiving has been set up XML 14.05.2007 Page 1 of 5 SAP Note Number 872388 - Troubleshooting Archiving and Deletion in XI 3.0 message will be deleted from the AFW by the standard deletion job after a default time of 30 days. You can define which interfaces should be archived via archiving rules. Troubleshooting Archiving / Deletion of XML messages and history entries in the Integration Server 1) Check if the deletion and archiving jobs have been carried out. Enter transaction SM37 and search for - SAP_BC_XMB_DELETE_ (Deletion job for XML messages) - SAP_BC_XMB_HIST_DELETE_ (Deletion job for history entries) - ARV_BC_XMB_WRP (archiving, step 1) - ARV_BC_XMB_DEL (archiving, step 2) Alternatively, for deletion of XML messages and history entries, you can enter transaction sxmb_adm -> Schedule Deletion Jobs and use the button "Jobs". For archiving jobs, you can alternatively use transaction sxmb_adm -> Schedule archiving job and use the button "Job Overview". Please note that you will select the prejobs only, i. e. the jobs that plan the final job. You will not find the final archiving jobs. 2) Check the Job Log of each of the jobs listed in step 1) for errors (use transaction SM37). 3) Only for archiving: Use the overview of your archiving sessions to check if all archiving sessions are completed. To do so, start transaction SXMB_ADM -> Schedule Archiving Job. In there use button "Archive Management" and select the Object Name "BC_XMB" (it is selected by default). Then select the button "Management". 4) Only for archiving: to get an overview over the situation for your archiving run transaction SXMB_ADM -> Schedule Archiving Job -> Archive Management -> Management. 5) Only for archiving: check if the flag "Start Automatically" in transaction SXMB_ADM -> Schedule Archiving Job -> Archive Management -> Customizing -> Technical Settings has been set for the section "Delete Job". If that is not the case, you will find archiving sessions in check 4) that have not been finished, i. e. the archived messages were not deleted from the database. 6) To get an overview over the situation in your persistence layer, run report RSXMB_SHOW_REORG_STATUS. Chooose the option "Checking all messages" and execute the report. For details about this report, consult note 696738. 7) In the first paragraph (Overview) of the results of report RSXMB_SHOW_REORG_STATUS, check if the "Number of messages in db" differs from the "Number of messages in client". If this is the case, then there are messages in additional clients. Please note that deletion and archiving jobs are client specific, thus you might have to schedule the jobs in the other clients as well if not done already. 8) Keep in mind that you have set retention times for messages (different values for synchronous and asynchronous messages). As long as the end of the defined retention time is not reached, the messages are neither deleted nor archived. To check the set values carry out transaction SXMB_ADM -> Define Interfaces for Archiving and Retention 14.05.2007 Page 2 of 5 SAP Note Number 872388 - Troubleshooting Archiving and Deletion in XI 3.0 periods -> Retention Periods (button in the menu bar). The following parameters are set for asynchronous messages: XML Messages Without Errors Awaiting Deletion (default = 1 day) XML Messages Without Errors Awaiting Archiving (default = 1 day) The following parameters are set for synchronous messages: XML Messages with Errors Awaiting Deletion (default = 1 days) XML Messages Without Errors Awaiting Deletion (default = 0 days) 9) Keep in mind that you may have activated the table switch procedure. You can check this via transaction sxmb_adm -> Configure delete procedure. The information button on that screen explains the switch procedure in detail. If the switch procedure is chosen, then the XML messages will only be removed (via table drop) if A) the retention time is expired and B) a specific fill grade of the table is reached. The default value is 90, that is the deletion will occur when 90% of the table is filled. You can set this parameter via transaction sxmb_adm -> Configure Integration Engine -> Specific Configuration. Create an entry of category DELETION, parameter DROP_MAX_TABLE_LOAD, no subparameter. If you choose to use the switch procedure, we recommend setting the parameter in a way that not too many messages are being copied. The recommendation is to set DROP_MAX_TABLE_LOAD in a way that at the point in time when the value of DROP_MAX_TABLE_LOAD is reached, the ratio between messages to be copied and the total number of messages is about 20%. The best way to determine the correct parameter value is to multiply the rough number of messages per day with the number of days that these messages are being retained in the system (retention time, see section 6). The result of this is the number of messages that need to be copied at the point in time when the value of DROP_MAX_TABLE_LOAD is reached, and the value corresponds to 20% of the messages. The total number of messages at this point in time is thus the calculated value for 'messages to be copied' times 5 (20% x 5 = 100%). The total number of messages divided by the maximum possible number of messages in the database, is the value that should be set for DROP_MAX_TABLE_LOAD. As a guideline you can assume that the max fillgrade for oracle is around 900.000 (900k) messages. Example: Daily # of messages: 25.000 Retention time: 5 days Messages to be copied during switch: 25.000 x 5 = 125.000 Total number of messages forthe 20% ratio = 125.000 x 5 = 625.000 DROP_MAX_TABLE_LOAD = 625.000 / 900.000 = 70 [%] (for Oracle) 10) Check if there are message with missing qRFC entries. This happens if a user deletes queue entries using transaction SMQ2 instead of (correctly) cancelling messages via transaction SXMB_MONI. Messages wihtout queue entries can neither be restarted, nor deleted or archived. SAP has delivered a report to help you cleaning up this type of messagestatus. Please use the report that is described in detail in note 688147. Also, keep in mind that deletion of qRFC entries creates inconsistencies between the tables TRFCQIN and TRFCQSTATE / TRFCQDATA. Use note 779664 to check for those inconsistencies. 11) Check if there are messages with a adapter status that does not allow for deletion or archiving. This is only valid if you use the outbound IDoc Adapter or ccBPM. The check can be done via transaction SE16 and selection of table SXMSPMAST (or SXMSPMAST2 if table switch is activated). Use the F4 help for the field ADAPT_STAT and enter subsequently the stati 001, 007, 14.05.2007 Page 3 of 5 SAP Note Number 872388 - Troubleshooting Archiving and Deletion in XI 3.0 008. Then hit the button "Number of entries". Should you detect that there are errors, call transaction SM58 and check for them. Should you find stati 001 and 008, schedule report SXMS_REFRESH_ADAPTER_STATUS. This job is recommended to be run regularly (see housekeeping jobs for XI in the online documentation). 12) Check if there are asynchronous messages in error status. Asynchronous messages in error status are neither deleted nor archived. This behaviour is different to erroneous synchronous messages which get deleted after their retention period (see step 8) has expired). Asynchronous erronous messages, however, must be cancelled and then be archived. You can either use transaction SXMB_MONI, search for erronous messages and manually cancel them. Or you can use the report provided by SAP: RSXMB_CANCEL_MESSAGES. Should you decide (for non-productive systems only) that you would like to delete these manually cancelled messages, please use note 820149. 13) Check if there are message with a digital signature. These messages are archived by default. If you have defined no interfaces for archiving and have only set up the deletion procedure then these messages with a digital signature will not be removed from the database. Schedule archiving jobs to remove signed messages from the database. If you do not know if a digital signature is used for your messages, use transaction SE16 -> table SXMSPMAST (or SXMSPMAST2 if table switch is activated) and check for entries with value "1" in the field "SECURITY". 14) Check if there are messages with a white flag in transaction SXMB_MONI or with message state ("MSGSTATE") 001 in table SXMSPMAST (or SXMSPMAST2 if table switch is activated). If thats the case, please use report RSXMB_CANCEL_NO_COMMIT_MSG as described in note 712628. 15) If the above checks do not help you to decrease your database size, please open an OSS messages, provide the details of your checks and attach the information that you gathered from the report RSXMB_SHOW_REORG_STATUS. Troubleshooting Archiving / Deletion of workitems in the Integration Server 1) Check if the deletion and archiving jobs have been carried out. Enter transaction SM37 and search for jobs: - that use the ABAP program RSWWWIDE (deletion) - with the name ARV_WORKITEM_WRI (archiving, step 1) - with the name ARV_WORKITEM_DEL (archiving, step 2) - with the name RSWF_XI_INSTANCES_DELETE (see note 874708) 2) Check if any errors occurred by clicking on the button "Job Log" in transaction SM37 for the jobs in step 1) 3) Only for archiving: Use the overview of your archiving sessions to check if all archiving sessions are completed. To do so, start transaction SXMB_ADM -> Schedule Archiving Job. In there use button "Archive Management" and select the Object Name "WORKITEM". Then select the button "Management". Troubleshooting Archiving / Deletion in the Adapter Framework 1) If you decided to archive, check that the archiving jobs have been 14.05.2007 Page 4 of 5 SAP Note Number 872388 - Troubleshooting Archiving and Deletion in XI 3.0 carried out successfully. Enter the RWB, navigate to "Component Monitoring" and click "Display". Choose the Adapter Engine of your Integration Server host and hit the button "Message Archiving". The status light at the end of your job shows if there were problems (red light) during the execution. 2) Keep in mind that the default persist time for messages in the Adapter Framework is 30 days. This means that messages will be kept in the database for 30 days until the deletion job removes them. If you would like to specify a shorter period, please refer to note 790226. 3) Please note that since SPS14 you can explicitly maintain delete jobs and that the property "messaging.persistMessageRemover.checkInterval" is not used any more. See note 816022, question 20, for details. If you run on SPS14 or higher, check the successful status of the deletion job as described in check 1). Header Data Release Status: Released on: Priority: Category: Main Component Released for Customer 13.02.2007 11:58:34 Recommendations/additional info Consulting BC-XI Exchange Infrastructure Valid Releases Software Component SAP_ABA SAP_ABA Release 640 700 From Release 640 700 To Release 640 700 and Later Related Notes Number 836092 774858 Short Text Archiving/deleting work items in the XI XI 3.0: Check and correct cluster tables 14.05.2007 Page 5 of 5