Running Stored Procedure for Microsoft SQL Server

Note: It is up to you to execute start_purge_session in parallel, for example multiple sqlplus sessions or similar. The script will not attempt to do this automatically.
To run the stored procedure, enter the following commands:
EXEC amxbpm.create_purge_sessions proc_tpl, end_time, num_sessions, dbg
EXEC amxbpm.start_purge_session session_id, batch_size, cursor_refresh, details, dbg
where:
  • proc_tpl is a comma-separated list of process template IDs. The process template IDs can be found in the ec_proc_template table corresponding to a unique process template name, module name, and module version. This is an optional parameter which defaults to all templates if not specified.
  • end_time is the date before which the process instances should have been completed, cancelled, or failed. Specify the date in the YYYY-MM-DDTHH:mm:ss.SSSTZ format, where:
    • YYYY-MM-DD is the date.
    • HH:mm:ss is the time, specified in the 24-hour format.
    • SSS is the 3-digit milliseconds, and TZ is the timezone. For example, UTC is represented by ’Z’. An example of a valid date is 2010-10-08T13:35:37.977Z
    This is an optional parameter, if not specified all completed, cancelled and failed instances are deleted.
  • num_sessions is the number of purge sessions to be created. This is an optional parameter and if not specified will default to 1.
  • session_id is the id of the session to be started.
    Note: This is zero (0) based, so if 3 sessions were created using create_purge_sessions, the session ids would be 0, 1 and 2.
    This is an optional parameter and if not specified will default to 0.
  • batch_size is the number of process instances that should be deleted before the transaction is committed. This is an optional parameter which defaults to 100 if not specified.
  • cursor_refresh is the time in seconds for the cursor to be refreshed. This is an optional parameter that defaults to 7200 (2 hours) if not specified.
  • details is user information to be identified with the purge session. This can be any user information desired; it is recorded in the audit trail.
  • dbg is the debug flag which gives useful debug information. This is switched off by default. Set the value to:
    • TRUE to switch on debug.
    • FALSE to switch off debug (default).