gpt4 book ai didi

sql-server - "Failed to lock variable"SSIS错误

转载 作者:行者123 更新时间:2023-12-02 19:16:24 28 4
gpt4 key购买 nike

对于每小时运行的预定 SSIS 包,我随机收到错误。最有趣的是,如果我删除检查点文件并再次运行该包,它工作正常,但错误可能会在将来的运行中出现。我不知道为什么会发生这种情况。这是完整的错误消息。

Executed as user: UserNameChanged. Microsoft (R) SQL Server Execute Package Utility Version 10.0.2531.0 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
Started: 09:21:40 Error: 2010-06-24 09:21:45.83 Code: 0xC0014054
Source: Save MaxLSN & Extract Date
Description: Failed to lock variable "User::UpdateProcessControlQuery" for read access with error 0xC0010001 "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.". End Error Error: 2010-06-24 09:21:45.84 Code: 0xC0024107 Source: Save MaxLSN & Extract Date Description: There were errors during task validation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 09:21:40 Finished: 09:21:45 Elapsed: 4.875 seconds. The package execution failed. The step failed.

除此之外,我还运行了 100 多个此类软件包,每组 20 个软件包,一小时内运行 5 组。这种“变量锁定”错误在每个周期中至少会弹出一次。所以我需要找出根本原因。谁能帮忙...

最佳答案

我怀疑这与在并行执行的多个组件中写入同一变量有关。本质上,这将是该变量的竞争条件。

例如,如果组件 A 和组件 B 可以并行执行并且都写入给定变量,那么当组件 B 尝试执行时,组件 A 可能会写入该变量(使其不可用)。由于两个作业的启动时间在运行之间会有所不同,因此您可能会遇到包随机失败的情况。

要解决此问题,您需要添加一个附加变量,以便它们不被共享,或者强制一个组件在另一个组件开始之前完成(通过依赖项)。

希望这有帮助。

关于sql-server - "Failed to lock variable"SSIS错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3107766/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com