FIX: SSIS Checkpoint restores an incorrect variable value for an Execute SQL Task item of a For Loop Container item in SSIS 2008 or in SSIS 2008 R2 if an SSIS package executes again after it fails or stops

Article translations Article translations
Article ID: 2583994 - View products that this article applies to.
Expand all | Collapse all

On This Page

Microsoft distributes Microsoft SQL Server 2008 Service Pack 1 (SP1) or Microsoft SQL Server 2008 R2 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security updates that were included with the previous SQL Server 2008 SP1 or SQL Server 2008 R2 update release.

SYMPTOMS

Consider the following scenario:
  • You install Microsoft SQL Server 2008 Integration Services (SSIS 2008) or Microsoft SQL Server 2008 R2 Integration Services (SSIS 2008 R2) on a computer.
  • You create an SSIS package that contains two For Loop Container items.
  • You create two For Loop Container scope variables for the two For Loop Container items. The variables have the same name.
  • You use the variables in the InitExpression, EvalExpression, and AssignExpression properties for the two For Loop Container items.
  • The two For Loop Container items contain multiple Execute SQL Task items that run in parallel.
  • You enable the Checkpoint setting for the SSIS package.
  • You run the SSIS package.
  • One of the Execute SQL Task items fails or stops while the SSIS package runs.
  • The SSIS package runs again.

In this scenario, the variable value for one of the Execute SQL Task items that did not fail or stop is incorrect.

Note
This Execute SQL Task item is in the For Loop Container item that did not fail or stop.

For example, consider the following specific scenario:
  • You create an SSIS package that has two For Loop Container items. The items are named FLC01 and FLC02.
  • You create a BatchNo variable for FLC01 and a BatchNo variable for FLC02.
  • You set the InitExpression property to @[User::BatchNo] = 0.
  • You set the EvalExpression property to @[User::BatchNo] < 10.
  • You set the AssignExpression property to @[User::BatchNo]=@[User::BatchNo]+1.
  • The two For Loop Container items contain multiple Execute SQL Task items that use a parallel execution plan.
  • You enable the Checkpoint setting for the SSIS package.
  • You run the SSIS package.
  • One Execute SQL Task item in FLC01 fails or stops.
  • The SSIS package runs again.

In this scenario, the BatchNo value for one of the Execute SQL Task items in FLC02 is incorrect.

Note This issue also occurs in Microsoft SQL Server 2008 R2 Integration Services (SSIS 2008 R2).

CAUSE

This issue occurs because of a defect in the restoring logic of the Checkpoint variable.

The Checkpoint variables are restored to the wrong tasks. Therefore, an incorrect variable value is restored.

RESOLUTION

Cumulative update information

SQL Server 2008 R2

The fix for this issue was first released in Cumulative Update 11. For more information about how to obtain this cumulative update package for SQL Server 2008 R2, click the following article number to view the article in the Microsoft Knowledge Base:
2633145 Cumulative Update package 11 for SQL Server 2008 R2
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
981356 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 was released

SQL Server 2008 R2 Service Pack 1

The fix for this issue was first released in Cumulative Update 4 for SQL Server 2008 R2 Service Pack 1. For more information about how to obtain this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2633146 Cumulative Update package 4 for SQL Server 2008 R2 Service Pack 1
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2567616 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 Service Pack 1 was released

SQL Server 2008 Service Pack 2

The fix for this issue was first released in Cumulative Update 7 for SQL Server 2008 Service Pack 2. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2617148 Cumulative update package 7 for SQL Server 2008 Service Pack 2
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. Microsoft recommends that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2402659 The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 2 was released
Microsoft SQL Server 2008 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2008 Service Pack 2 hotfix to an installation of SQL Server 2008 Service Pack 2. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.

Cumulative update package 16 for SQL Server 2008 SP1

The fix for this issue was first released in cumulative update package 16 for SQL Server 2008 SP1. For more information about how to obtain this cumulative update package for SQL Server 2008 SP1, click the following article number to view the article in the Microsoft Knowledge Base:
2582282 Cumulative update package 16 for SQL Server 2008 Service Pack 1
Note Because the builds are cumulative, each new update release contains all the hotfixes and all the security updates that were included with the previous SQL Server 2008 SP1 update release. We recommend that you consider applying the most recent update release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
970365 The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 1 was released


WORKAROUND

To work around this issue, use a different variable name for each For Loop Container item.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Properties

Article ID: 2583994 - Last Review: December 19, 2011 - Revision: 4.0
APPLIES TO
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2008 R2 Datacenter
  • Microsoft SQL Server 2008 R2 Enterprise
Keywords: 
kbqfe kbfix kbexpertiseadvanced kbsurveynew KB2583994

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com