Clear the system

Running a benchmark has the potential to affect several areas of the product that may require clearing afterwards.

Clear the relationship tables

The cross-referencing tables for any identity relationships that are used by benchmarked interfaces contain data after a benchmark, and should be cleared. The two ways you can clear the cross-referencing tables for relationships are covered in the following sections.

Using Relationship Manager

Relationship Manager is a graphical tool that provides a database vendor-independent way to manage relationship data.

To implement this approach, reference the section "Deleting a Relationship Instance in Chapter 6, Using Maps and Relationships" in the System Implementation Guide. Note that you can highlight one relationship instance in the Relationship Manager, hold down the Shift key, and highlight another relationship instance to select all the relationship instances between them, making it easier to delete multiple instances at once.

The advantages of this approach are:

The disadvantages of this approach are:

Using SQL queries

You can use SQL queries to truncate the relationship tables and thereby clear them of data.

To implement this approach, do the following:

  1. Determine the table names for each participant in each identity relationship that is used in each interface affected by the benchmark. Reference the section titled "Advanced Settings for Participant Definitions" in Chapter 7, Creating Relationship Definitions in the Map Development Guide to determine how to find out the table names for participants by looking up their advanced settings.
  2. Execute the following statement in the appropriate database query tool for every participant as necessary, replacing the text ParticipantTableName with the name of the participant table:
    truncate table ParticipantTableName ;
    
  3. Execute the queries to truncate the participant tables.

The advantages of this approach are:

The disadvantages of this approach are:

Shut down InterChange Server

In order to perform the task Clear the MQSeries queues that is described in the following section, you must make sure that WebSphere InterChange Server and any of its connector clients that communicate with MQSeries are shut down. Follow the instructions in the section titled "Shutting Down InterChange Server" in Chapter 3 Operational Tasks in the System Administration Guide to shut down WebSphere InterChange Server.

Clear the persistent stores

The IBM WebSphere InterChange Server system stores event data persistently by using MQSeries to record images of initiating events as files on hard disk, and by keeping pointers to those files in work-in-progress tables in a database. Even during a benchmark simulation these messages and database entries are created in order to reproduce production-environment conditions as accurately as possible.

After a benchmark finishes executing there may still be some residual event data in the tables and queues (if some events were to fail, for instance). The data is not important in the way that production data is, and it can present problems if left in place (for instance, if the interfaces that those events referenced are deleted, then the events entries are left dangling). It is therefore recommended that you clear the system after performing a benchmark. The following sections describe how to do so.

Important:
The following sections describe actions that eliminate event data from the IBM WebSphere InterChange Server system. As mentioned before, the benchmarking activities described in this document should never be performed in a production environment, but only in a development or test environment. The cleanup techniques described below should likewise only be performed in a development or test environment after a benchmarking simulation, and never in a production environment. Furthermore, it is important that these actions only be taken when the server is in a quiescent state; if the tables or queues are cleared while events are still being processed then WebSphere InterChange Server tries to access information it needs but which no longer exists, and crashes as a result.

Clear the MQSeries queues

If MQSeries is configured as the delivery transport for the source connector in the interface being benchmarked, then event data is stored in MQSeries queues. You must clear the queues as part of the task of clearing the events from the system.

The steps below provide instructions on how to clear the queues on a Windows system:

  1. Click Start --> Programs --> IBM MQSeries --> MQSeries Explorer.
  2. Double-click the name of the proper queue manager.
  3. Double-click the Queues folder to explore it.
  4. Right-click the proper input queue and click All Tasks --> Clear Messages.
  5. When presented with a confirmation prompt, click Yes.
    Note:
    At this point you may be presented with a prompt that reads "Object is open. An attempt was made to delete or change an object that was in use. Wait until the object is not in use and retry. (AMQ4070)". If you are, click OK and then terminate any processes that might be using the queue, such as WebSphere InterChange Server or any connectors.
  6. When presented with an information prompt that the queue has been cleared of messages, click OK.
  7. The Current Depth column indicates the number of messages in each queue; repeat the steps above for all queues that have benchmark event messages in them.

Clear the work-in-progress tables

The IBM WebSphere InterChange Server system keeps references to in-progress and failed events in several database tables. To clear the events tables of all entries use a database query tool such as SQL Plus, TOAD, or SQL Server Query Analyzer to truncate the tables. Execute the following commands in the query tool:

truncate table cxwipobjects ;
 
truncate table cxwipblobs ;
 
truncate table cxpbusobjstate ;
 
truncate table cxpbusobjmessage ;
 
truncate table cxfailedeventkeys ; 

If any of the interfaces being benchmarked use the transactional services provided by the IBM WebSphere InterChange Server system, then there may also be data in the transaction tables. To clear the transaction tables execute the following commands in the query tool:

truncate table cxastatebusobjs ;
 
truncate table cxcompbusobjs ;
 
truncate table cxcstatebusobjs ;
 
truncate table cxtransblobs ;

Copyright IBM Corp. 1997, 2004