“Failed to lock variable” SSIS error

前端 未结 8 1074
[愿得一人]
[愿得一人] 2021-01-18 12:58

I am getting an error randomly for a scheduled SSIS package which runs hourly. The funniest thing is that if I delete the checkpoint file and run the package again it works

相关标签:
8条回答
  • 2021-01-18 12:59

    Had the same error while debugging. Minimizing the visual studio, I saw pop-up with error message behind it. Clicking OK button rendered correct error in my visual studio. It was about missing column mapping. Worked after fixing it.

    0 讨论(0)
  • 2021-01-18 13:06

    I had the same problem. Fix which worked for me:

    Root Cause: I had created the variable and used it inside "Data Flow" to hold value of "Row Count". After this, I was trying to use this variable in "control Flow" > "Script Task". It did not work and gave me same error as posted.

    Fix: I created the variables and used in "Script Task". After it got used in script task, I assigned the value of Row Count in Data Flow > Row Count.

    It looks strange to me, but it worked :)

    0 讨论(0)
  • 2021-01-18 13:10

    If the running version and build version is different also you may get this error. Ex I built the package on 2012 server and i ran it in 2016 and got this error.

    0 讨论(0)
  • 2021-01-18 13:10

    I was also facing the same issue ,but now resolved this issue . I have used 2 foreachloop and 2 file system task in my package ,In First loop i'm assigning the values of excel fully qualified to a variable and same variable I was using in Second loop that is why this issue was coming. I have created another variable for second loop and assign that variable value into 2nd file system taks. Initially i was using only one variable as a source in both file system task,Now created 2 variable and issue is resolved. Please refer the sanpshot to see the details in snapshot.

    0 讨论(0)
  • 2021-01-18 13:12

    I'd suspect that this is related to the same variable being written to in multiple components that execute in parallel. Essentially this would be a race condition on that variable.

    For example if Component A and Component B can execute in parallel and both write to a given variable then it is possible that Component A will be writing to it (rendering it unavailable) when Component B tries to execute. As the start time of the two jobs will vary between runs you can get cases where the package appears to fail randomly.

    To resolve the issue you would need to either add an additional variable so that they are not shared or alternatively force one component to complete before the other begins (through a dependency).

    Hope this helps.

    0 讨论(0)
  • 2021-01-18 13:12

    It seems there is a variable is missing to the sequence container in the package may it needs to get from either other jobs or parent package. I think its the problem of either scope of the variable or the generation of variable values at run time.

    thanks prav

    0 讨论(0)
提交回复
热议问题