Create checkpoints, sequence and loop containers, and variables in SSIS

In a database environment, you have a transaction, which is a logical unit of work that has to be completed in full (all the steps) to be deemed successful. In case there is a failure in any one of those steps, the whole transaction is deemed unsuccessful and any of the completed steps have to be undone (rolled back). This is done to maintain the integrity of the data.

Within SSIS, you can set the scope of the transactions at the entire package level, or for any individual control flow container, or task level. SSIS transactions require Windows Distributed Transaction Coordinator (DTC) service to be running on the machine for this feature to work.

To enable transactions within a package, set the TransactionOption property to Required
for the container or task. This property can be set at any scope of the package:
  • Package Level
  • Container Level
  • Control Task Level

Any tasks inside of the container will also be a part of the transaction as long as each individual task has the TransactionOption property set to Supported, which is the default.

If there are some tasks that you do not want to rollback within a container, in case of failure, set the TransactionOption to NotSupported. This can be useful where you have tasks that handle audits or record error statuses to review after the failure.

Checkpoint
If a package fails at a certain point, it can be configured to restart from the point of failure, or from an earlier step at the next attempt to run the package. This configuration process is called checkpoints. Checkpoints and transactions work together to enable package restartability.

The following are the setting for Checkpoints at the Control Flow tab:
  • CheckpointFileName Enter the path and filename where SSIS saves the checkpoint run status information.
  • CheckpointUsage By setting to IfExists, the checkpoint file is created if one does not already exist, otherwise it updates the existing file.
  • SaveCheckpoints Set this to True to enable checkpoints.
Once the checkpoint has been enabled for the package, the last step is to update each container or task that you want to checkpoint by setting its FailParentOnFailure property to True. This activates checkpointing for each individual object you want to track.

Containers 
When you have multiple tasks that need to be run as a group, either sequentially or in parallel, SSIS provides three types of containers and each of these have their own unique benefit.
  • Sequence Container Grouping and organizing tasks
  • For Loop Container Iterating tasks multiple times
  • Foreach Loop Container Iterating through each object or file

Comments

Popular Posts

Non-blocking, semi-blocking, and blocking transforms in SSIS

Implement additive, semi-additive, and non-additive measures

Design an appropriate storage solution, including hardware, disk, and file layout