Commit Type and Abort Mode settings

Previous Next

For each Job you can set a Commit Type. For each Task you can set a Commit Type and an Abort Mode.

See also

Task-Level Commit vs. Record-Level Commit

Error Handling and Abort Mode

Abort Mode and Commit Type Combinations

Fatal Errors in Batch Jobs

Commit Type settings

At Job level, Commit Type has one of the following settings. The default is Task.

Setting

Means

Task

The commit behavior depends on the Commit Type setting for each individual task.

Job

Only a single commit is performed. This happens at the end of the job. If the job aborts, it is rolled back.

None

No commit is performed.

 

The Commit Type setting 'Task' is usually appropriate for jobs. 'None' is not normally recommended.

If you choose None, all the tasks in the job will automatically get Commit Type = None. Choose this option only if the job is to be incorporated in a larger structure of embedding jobs that do commit. In this scenario, no commit is issued. If the job was called using runbatch.exe, all manipulations are rolled back at the end of the job. If it was called from within an application using the ActionStartJob() method or "INVOKE BatchRunner", the transaction stays open. A subsequent commit can then be done at some point by the application.

If you want a single commit at the end of the job, do this by setting Commit Type = Job at job level. Do not attempt to achieve this effect by choosing 'None' at Task level for non-final tasks with the idea that you only want the final task to commit. Using 'None' at task level does not cause the job to be properly rolled back if it aborts.

At Task level, Commit Type has one of the following settings. The default is Task.

Setting

Means

Task

The transaction is committed once at the end of this Task.

Record

The transaction is committed after each individual processed record. This option is only available for Import Tasks and SQL Tasks.

None

No commit is performed.

The Commit Type setting 'Task' is usually appropriate for jobs. 'None' is not normally recommended.

Abort Mode settings

At Task level, the Abort Mode setting determines what happens if a non-fatal error occurs during the task. The default is Abort Job on Error.

Setting

Means

Abort Job on Error

The error is reported. The current task and all subsequent tasks are aborted. If Commit Type = Job at job level, the entire job is rolled back.

Abort Task on Error

The error is reported. The current task is aborted. The job continues with subsequent tasks (if any).

None

The error is reported, then the task continues.

The Abort Mode setting 'Abort Job on Error' is usually appropriate for jobs. 'None' is not normally recommended.