Purge Parameters and Behavior

This section describes the purge parameters, and shows you how to change the default parameters and behavior.

Purge Parameters

By default, the following parameters are supplied each time you run the utility manually or automatically:

  • -a deletes data from version 2008 R2 databases.
  • -batchMode deletes the data in batches, instead of one large transaction. For the first batch, the tool displays the approximate time required to finish the purge process. The data is purged in segments of an appropriate number of orchestration workflow instances. This number is automatically calculated.
    Note: It is recommended that you always run the purge utility with this parameter. It is especially important if you are running the utility for the first time or have not run it for a long time, because the size of your database needs to be reduced substantially in those circumstances.
    Tip: You can press CTRL + C to terminate the purge process after the current batch is completely purged.
  • -maxDuration 1 specifies that one day must elapse before processes are considered finished so unexpired data can be purged. (Unexpired data could be from processes that did not finish normally, for example, when a user closes the SBM User Workspace in the middle of a transaction. It is stale data from unfinished orchestration workflows.) This value must be a positive integer.
  • -verbose specifies that more details about the purge operation will be returned.
  • priorTo 0 specifies that all expired orchestration workflow data should be purged, regardless of how old the data is. If you specify another number, then if possible, all data prior to that number of days ago will be purged. If you specify too small a number, the potential number of rows to be deleted can be very large and can exceed the allowed maximum limit. In this case, the tool prompts you to either enter a larger number or to terminate the process and use batch mode.

This means that when you type only purge.bat, the -a -batchMode -maxDuration 1 -verbose -priorTo 0 parameters are automatically supplied and do not need to be passed in the command line.

The following parameters are not supplied by default:

  • -q specifies that you want an automatic purge to be silent (that is, to suppress prompts for user input). This option must be specified if the purge operation is scheduled.
    Important: If you use the -q parameter and authentication data is not specified or found, the tool will fail to run.
  • -dbUsername and -dbPassword provide authentication data for database access on the local system. If you do not provide this data, and if you do not use the -q parameter, the tool prompts you to provide the username and password. For manual purges, the tool prompts for this information by default.

Changing Default Parameters and Behavior

To change the parameters or behavior:

  1. Navigate to the installationDirectory\Serena\SBM\Common\jboss405\bin directory.
  2. Open the purge.bat file in a text editor.
  3. To change the parameters, edit the first set PARAMETERS line.
  4. To have all parameters passed in the command line to override all default parameters, type :: at the beginning of the first set PARAMETERS line to comment it, and then uncomment the :: set PARAMETERS=%* line by removing the ::.