大网数据广告活动
数据库与应用安全

SSIS Checkpoints are not honored for For Loop items

· 52CE 我爱测

This article provides workarounds for the problem where SSIS Checkpoints are not honored for For Loop or Foreach Loop container items.

This article helps you work around the problem where SQL Server Integration Services (SSIS) Checkpoints are not honored for For Loop or Foreach Loop container items.

Original product version:   SQL Server
Original KB number:   2624458

Symptoms

Consider the following scenario:

  • You install Microsoft SQL Server Integration Services on a computer.

  • You create an SSIS package that contains a For Loop Container item that is followed by a Sequence Container.

  • Both the For Loop Container and the Sequence Container items have either of the following:

    • An Execute SQL Task (OR)
    • Two or more Execute SQL Task (s) that run in parallel.
  • You enable the Checkpoint setting for the SSIS package.

  • You run the SSIS package

  • The For Loop Container completes and package execution comes to the Sequence Container.

  • You take one of the actions below:

    • For packages having a single Execute SQL Task, you stop the package execution while the task is still running.
    • For packages running multiple Execute SQL Tasks, you either stop the package execution or you experience a failure in one of those tasks while other Execute SQL task (s) are still running
  • The SSIS package runs again.

In this scenario, Package starts from For Loop Container instead of the Sequence Container.

Note: This issue is not tied to Execute SQL Task. This may occur with other tasks as well.

Cause

This behavior is by design. The checkpoint data is not saved for the For Loop Container and Foreach Loop container items. If a child container in the loop runs successfully, it is not recorded in the checkpoint file. So, when the package is restarted, the tasks in each of these container items are executed again.

Workaround

To work around the issue, wrap the For Loop or the Foreach Loop container inside a Sequence Container.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 09/02/2020
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。