Archiving and purging filesystem and database logs

To maintain the operating efficiency of WebSphere Business Integration Connect, the following procedures can be used to archive or purge the file system and database log files.

Purging application log files

Application log files are located in three areas: $INSTALLATION_DIRECTORY/<receiver, console, and router>/was/logs/server1.

  1. Stop the appropriate application first by running the stop script located under $INSTALLATION_DIRECTORY/<receiver, console and router>/was/bin/stopServer.sh server1.
  2. Remove the log files as needed.

Purging non-repudiation directories

Non-repudiation files and directories are located in: $COMMON_DIRECTORY/non_rep/. Start with archiving the oldest files located in directories starting at 0, and increasing in number for newer files.

  1. Stop the router service using the script: $INSTALLATION_DIRECTORY/router/was/bin/stopServer.sh server1.
  2. Compress the files using the UNIX tar command or WinZip.
  3. Move the files to an external media source for offsite storage as needed.

Purging database tables

Certain database tables may be purged when necessary, but other tables must not be modified in order to maintain proper system functionality. Tables starting with BP_ and LG_ may be purged with two exceptions: BP_ tables ending with _QUE and _HIST are continuously maintained by the RosettaNet engine and must not be changed. The BP_ tables ending with _QUE are queue tables, and the BP_ tables ending with _HIST are history tables which are used for archiving. For example, the BP_RNSTATEHDR_QUE table is archived in the BP_RNSTATEHDR_HIST table.

Tables starting with CG_ and PR_ contain configuration or profile data and must also remain unchanged in order to maintain proper system functionality.

Archive and purge functionality for RosettaNet and AS1/AS2 state engines

The criterion for purging table data is based upon the number of days that data must be kept online. Data in tables that end with _HIST are archived and purged on a daily basis. Also, any log information is truncated daily.

The purge criterion contains only one input parameter, p_days, which is the number of days that data should be kept online. Once the DBA sets the input parameter, the procedure works as follows:

Table History table Action

RosettaNet



BP_rnStateHdr

BP_rnStateHdr_Hist

Purge

BP_rnStateDtl

BP_rnStateDtl_Hist

Purge

BP_Sponsor_State

BP_Sponsor_State_Hist

Purge

BP_rnStateHdrAuditLog

none

Truncate

AS1/AS2



BP_State_Hdr

BP_State_Hdr_Hist

Purge

BP_AS_State_Hdr

BP_AS_State_Hdr_Hist

Purge

BP_AS_State_Dtl

BP_AS_State_Dtl_Hist

Purge

Data retention time

The procedure purges data based upon the combination of the record creation date in the header and the p_days input parameter. The Time to perform TPA stored in the header is not considered. It is the responsibility of the DBA to make sure that p_days is larger than the maximum value of (Time to perform/1440). Time to perform is stored in minutes.

It is recommended that data in the BP_ tables be retained online for p_days or ((TimeToPerform/1440) +1 day), whichever is greater. Data in tables BP_DupCheck and BP_RnMsgDigest should be retained for seven days. Data in BP_Process_Log should be retained for two days.

Tables with names starting with DB are metadata tables except DB_ProcAuditLog. If DB_ProcAuditLog is on, it should be purged or truncated daily, or done based on the needs of the user. This log is normally turned off for production since it is primarily used in development and QA environments.

Log and summary tables

Tables with names starting with LG_ are log and summary tables with the exception of: LG_EventCd, LG_Media, and LG_media_Cfg. These are metadata tables and must remain unchanged in order to maintain proper system functionality. Tables starting with LG_Access_ are not used in 4.2.1 and 4.2.2.

The following log tables can be archived and purged based upon Activity ID, and the driving table should be LG_Activity. The createdate or RcvDocTS can be used to determine the number of days that data should be retained online. RcvDocTS may be a better option because it is an indexed column. Data can remain online for seven days or ((TimeToPerform/1440) +1 day), whichever is greater.

Table
Notes

LG_ACTIVITY

LG_ACTIVITY_DTL

LG_ACTIVITY_ENDSTATE

LG_ACTIVITY_RNDTL

LG_ACTIVITY_RNHDR

LG_AS_DTL

LG_AS_HDR

LG_ACTIVITY_EVENT
Links LG_Activity to LG_event

LG_EVENT

LG_EVENT_EVENTSUMMARY
Links LG_Event to LG_EventSummary and LG_EventSummary. DRILLDOWNFLG can be used to indicate that drilldown is not available(Not implemented in 4.2.1 and 4.2.2 procedures).

LG_ACTIVITY_SUMMARY
Links LG_Activity to LG_Summary and LG_Summary. DRILLDOWNFLG can be used to indicate that drilldown is not available(Not implemented in 4.2.1 and 4.2.2 procedures).

The following log tables can be purged based on creation date.

Table
Notes

LG_Delivery_Log
Any record older than 1 day from createdate can be purged.

LG_DM_Doc_Lock
Any record older than 1 day from createdate can be purged.

LG_Msg_Archive
Any record older than 7 days from createdate can be purged.

LG_STACKTRACE
Any record older than 7 days from createdate can be purged.

LG_SYNCH_REQ_RESP
Any record older than seven days from createdate or (TimeToPerform/1440) +1 day), whichever is greater, can be purged.

LG_VALIDATION
Any record older than 7 days from createdate can be purged.

LG_VTP_STATUS
Any record older than 7 days from createdate can be purged.

The following summary tables must remain unchanged in order to maintain proper system functionality.

Table
Notes

Event Summary Tables

LG_EVENTSUMMARY

LG_EVENTSUMMARY_XREF

Process Summary Tables

LG_PROCESSSUMMARY_AS

LG_PROCESSSUMMARY_AS_MI

LG_PROCESSSUMMARY_AS_XREF

LG_PROCESSSUMMARY_RN

LG_PROCESSSUMMARY_RN_MI

LG_PROCESSSUMMARY_XREF

Document Summary Tables

LG_DOCPROCESSING_SUMLG_MSGLENGTH_SUMMARY

LG_SUMMARY

LG_SUMMARY_MI

LG_SUMMARY_PROCESSSUMMARY
Links LG_Sum_Xref_Lnk to LG_ProcessSummary_Xref

LG_SUMMARY_RN

LG_SUMMARY_RN_MI

LG_SUM_XREF_LNK
Links LG_SUM_XREF_PART and LG_SUM_XREF_PRCS to LG_Summary

LG_SUM_XREF_PART

LG_SUM_XREF_PRCS

Message Length Summary

LG_MSGLENGTH_SUMMARY

Copyright IBM Corp. 2003, 2004