FIX: A script task or a script component is executed multiple times in duplicate when you run packages that contain script tasks or script components in parallel in SSIS

Extended support for SQL Server 2005 ended on April 12, 2016

If you are still running SQL Server 2005, you will no longer receive security updates and technical support. We recommend upgrading to SQL Server 2014 and Azure SQL Database to achieve breakthrough performance, maintain security and compliance, and optimize your data platform infrastructure. Learn more about the options for upgrading from SQL Server 2005 to a supported version here.

Bug #: 447320 (SQLBUDT)
Bug #: 411552 (SQLBUDT)
SYMPTOMS
Consider the following scenario:
  • You have a Microsoft SQL Server 2005 Integration Services (SSIS) package that contains a script task in the control flow or a script component in the data flow.
  • You copy and paste the SSIS package (the .dtsx file) to create multiple copies of the same package.
  • You create some Execute Package tasks in a parent SSIS package, and then specify the copied packages in the Execute Package tasks.
  • The Execute Package tasks run in parallel within the parent package.
  • The ExecuteOutOfProcess property of the Execute Package tasks is set to FALSE.
  • You run the parent SSIS package.
In this scenario, you may notice that a script task or a script component is executed multiple times in duplicate. It may even be executed from the wrong Execute Package task.
CAUSE
This problem occurs because of the duplicate project names of the script tasks or the script components in Microsoft Visual Studio for Applications. After you copy and paste the .dtsx file, the script tasks or the script components in these two packages have the same GUID for the ID property. When you execute the parent SSIS package, SSIS may incorrectly execute one of the script tasks or the script components multiple times in duplicate. However, you expect that SSIS executes each script task or script component independently.

Note Visual Studio for Applications is used to design and compile the script tasks or the script components in SSIS.
RESOLUTION

Service pack information

To resolve this problem, obtain the latest service pack for SQL Server 2005. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
913089 How to obtain the latest service pack for SQL Server 2005
WORKAROUND
To work around this problem, follow these steps:
  1. Open the copied SSIS package in SQL Server Business Intelligence Development Studio.
  2. Press CTRL+X to delete the problematic script task or the problematic script component.
  3. In the same package that contains the problematic script task or the problematic script component, press CTRL+V to paste the script task or the script component.
After you follow these steps, a new GUID will be generated automatically for the ID property.

If the PreCompile property for the package that contains the problematic script task or the problematic script component is set to True, the script tasks or the script components are precompiled. In this case, you must recompile the script tasks or the script components. To do this, open the script designer, and then close the script designer. You may have to redefine the precedent constraints for the pasted script task or the pasted script component.

Similarly, to create a unique project name for the script tasks manually, click Design Script in the Script Transformation Editor dialog box, and then manually edit the Project Name property in Visual Studio for Applications.

Note You cannot create a unique project name for script components in the data flow.
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
MORE INFORMATION

Steps to reproduce the problem

  1. Edit the scripts in the copied SSIS package to customize an operation for the package. You can customize a message box or a logged event to reproduce the problem.
  2. Save the changes to the copied package.
  3. Create an SSIS package that uses a script task in the control flow or that uses a script component in the data flow.
  4. Save the package.
  5. Copy and paste the package in Solution Explorer or in the file system.
  6. Create a new parent SSIS package that uses two Execute Package tasks to run the original SSIS package and the copied SSIS package in parallel.
  7. Run the parent package.
Either the script task from the original SSIS package is executed or the script task from the copied package is executed. However, you expect that both SSIS packages in the parent package to be executed.
Properties

Article ID: 928323 - Last Review: 09/17/2011 08:31:00 - Revision: 2.0

Microsoft SQL Server 2005 Standard Edition, Microsoft SQL Server 2005 Developer Edition, Microsoft SQL Server 2005 Enterprise Edition, Microsoft SQL Server 2005 Workgroup Edition, Microsoft SQL Server 2005 Standard X64 Edition, Microsoft SQL Server 2005 Standard Edition for Itanium-based Systems, Microsoft SQL Server 2005 Enterprise X64 Edition, Microsoft SQL Server 2005 Enterprise Edition for Itanium-based Systems

  • kbprb kbtshoot kbexpertiseadvanced kbsql2005ssis kbHotfixServer KB928323
Feedback