Creating and configuring SWBATCH to a dedicated MBOX set and QUEUE for performance purposes.

Creating and configuring SWBATCH to a dedicated MBOX set and QUEUE for performance purposes.

book

Article ID: KB0094548

calendar_today

Updated On:

Products Versions
TIBCO iProcess Engine (Oracle) -
Not Applicable -

Description

Description:
When purging cases using the SWBATCH utility, the PURGE instructions will be processed by the default background (BG) processes. This can cause performance issues with normal BG processing. It is possible to create a separate MBOX set and QUEUE into which the SWBATCH instructions can be sent. Dedicated BG processes can then be configured to read from the new MBOX set effectively splitting the normal processing from SWBATCH processing.

Issue/Introduction

Creating and configuring SWBATCH to a dedicated MBOX set and QUEUE for performance purposes.

Resolution

1). Create the MBOX table (swbatmboxtable1) and the AQ (swbatmboxqueue1). Note that the iPE schema owner is CH114SWPRO. The table swbatmboxtable1 and Queue swbatmboxqueue1 can be your own naming convention. Run the following commands as the system Oracle user.

GRANT AQ_ADMINISTRATOR_ROLE TO CH114SWPRO;
GRANT EXECUTE ON  SYS.DBMS_AQ TO CH114SWPRO;
GRANT EXECUTE ON  SYS.DBMS_AQADM TO CH114SWPRO;

declare
begin
dbms_aqadm.create_queue_table (queue_table => 'CH114SWPRO.swbatmboxtable1', sort_list => 'priority,enq_time', queue_payload_type => 'CH114SWPRO.swlocalmsg', storage_clause => 'tablespace  
STAFFWAR', comment => 'default swbatch mbox',compatible => '8.1');
dbms_aqadm.create_queue (queue_name=> 'CH114SWPRO.swbatmboxqueue1', queue_table=> 'CH114SWPRO.swbatmboxtable1', retry_delay=> 300, max_retries=> 12);
dbms_aqadm.start_queue (queue_name => 'CH114SWPRO.swbatmboxqueue1',ENQUEUE => TRUE,DEQUEUE => TRUE);

end;
/

Run the Grant separately as the iPE schema owner (CH114SWPRO):

exec dbms_aqadm.grant_queue_privilege (privilege => 'all', queue_name => 'CH114SWPRO.swbatmboxqueue1', grantee => 'CH114SWUSER', grant_option => false );

2). Add a new message queue. In this example called SWBATCHQ1.

swadm add_queue SWBATCHQ1 Local 0001::sswbatmboxtable1:swbatmboxqueue1

3). Add a new Mbox set. In this example called SWBATCHMB.

swadm add_mboxset SWBATCHMB Local

4). Identify the new Queues ID (example output may be different on your system).

$SWDIR/util/swadm show_queues
--------------------------------------------------------------------------------
Queue ID   Queue Name              Queue Type Queue Desc
--------------------------------------------------------------------------------
1          BGMBOX1                         Local      0001::bgmboxtable1:bgmboxqueue1
2          BGMBOX2                         Local      0001::bgmboxtable2:bgmboxqueue2
3          WISMBOX1                        Local      0001::wismboxtable1:wismboxqueue1
4          WISMBOX2                        Local      0001::wismboxtable2:wismboxqueue2
5          PREDICTMBOX1                    Local      0001::predictmboxtable1:predictmboxqueue1
6          PREDICTMBOX2                    Local      0001::predictmboxtable2:predictmboxqueue2
7          SWBATCHQ1                       Local      0001::sswbatmboxtable1:swbatmboxqueue1

# The new Queue's ID is 7

5). Identify the new Mboxset's ID (example output may be different on your system).

$SWDIR/util/swadm show_mboxsets
--------------------------------------------------------------------------------
Mboxset ID   Mboxset Name                    Queue Type
--------------------------------------------------------------------------------
1            BGMBSET                         Local
2            WMDMBSET                        Local
3            WISBGMBSET1                     Local
4            WISBGMBSET2                     Local
5            PREDICTMBSET                    Local
6            SWBATCHMB                       Local

# The new Mboxset's ID is 6

6). Add the SWBATCHQ1 message queue to the SWBATCHMB Mbox set (6 is the Mboxset ID of the SWBATCHMB Mbox set and the SWBATCHQ1 Queue's ID is 7).

$SWDIR/util/swadm add_queue_to_mboxset 6 7

7). Set MBSET_WRITE_BG so that calls from the SWBATCH utility use the SWBATCHMB Mbox set to write messages to the BG processes.

$SWDIR/util/swadm set_attribute 1 SWBATCH 0 MBSET_WRITE_BG 6

# Add new BG process. In this exampe using a default system so will be instance 5.

$SWDIR/util/swadm add_process 1 BG Y

# Set new background processes (instance 5) to read from the queue

$SWDIR/util/swadm set_attribute 1 BG 5 MBSET_READ_BG 6

Additional Information

TIBCO iProcess® Engine Administrator’s Guide Software Release 11.4.1 April 2014