tag:blogger.com,1999:blog-8563771670213207018.post9049325402279424896..comments2023-10-30T08:11:44.626-07:00Comments on The Techie's world....: SSIS - deadlock was detected while trying to lock variablesMohit Nayyarhttp://www.blogger.com/profile/18400035423017397788noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-8563771670213207018.post-6752310679144711642014-03-07T06:41:29.855-08:002014-03-07T06:41:29.855-08:00I know this was a long time ago now, but do you re...I know this was a long time ago now, but do you recall if your server was running a 64-bit version of SQL? I've recently run into this problem on Win2008R2 Enterprise SP 1 with SQL 2005 64-bit SP4, but it doesn't seem to be reproducible on most variations of SQL. Thank you for the workaround example.Ben Raubenolthttps://www.blogger.com/profile/11969624545135781020noreply@blogger.comtag:blogger.com,1999:blog-8563771670213207018.post-7688132935353086952009-05-11T12:27:00.000-07:002009-05-11T12:27:00.000-07:00I found this looking for the answer to the same pr...I found this looking for the answer to the same problem. My major problem is that the locking error happened in my Package.OnProgress event, and I had a script (actually several scripts) in the package that did this<br /><br /><br />Something = Dts.Variables("myVar").Value.ToString() + Whatever<br />Dts.Events.FireProgress.....<br /><br />Adding a Dts.Variables.Unlock() statement right before the FireProgress statement helped quite a bitColumbia Kingshttps://www.blogger.com/profile/05030963203363910902noreply@blogger.comtag:blogger.com,1999:blog-8563771670213207018.post-10123140883055918362008-06-04T20:31:00.000-07:002008-06-04T20:31:00.000-07:00This comment has been removed by the author.Mohit Nayyarhttps://www.blogger.com/profile/18400035423017397788noreply@blogger.comtag:blogger.com,1999:blog-8563771670213207018.post-38313598092777693542008-06-04T14:57:00.000-07:002008-06-04T14:57:00.000-07:00Thanks very helpful for a beginner SSIS user!Thanks very helpful for a beginner SSIS user!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8563771670213207018.post-70500531939064246982008-04-12T22:45:00.000-07:002008-04-12T22:45:00.000-07:00Hmm...ok, check one thing, if the GUID is same for...Hmm...ok, check one thing, if the GUID is same for both of the script task in each package (copy-paste by any chance). If that's the case then there could be script caching issue while running in-proc. So just re-create your script task from scratch and confirm that GUIDs are different for script tasks.Mohit Nayyarhttps://www.blogger.com/profile/18400035423017397788noreply@blogger.comtag:blogger.com,1999:blog-8563771670213207018.post-71327155836593007052008-04-12T09:21:00.000-07:002008-04-12T09:21:00.000-07:00Mohit,i am not using any master package variable i...Mohit,i am not using any master package variable in child package.<BR/>I calling webservice in evry child script. So delaration of varibale of webservice is local to each script.Anonymoushttps://www.blogger.com/profile/11064227543027019954noreply@blogger.comtag:blogger.com,1999:blog-8563771670213207018.post-22044251229589045112008-04-12T09:12:00.000-07:002008-04-12T09:12:00.000-07:00Hi Ranjay, If your child packages are making use o...Hi Ranjay, If your child packages are making use of Master package's variables then you should execute them serially. If this is not the case then there could be some script cache issue and the way you lock and release the variables.Mohit Nayyarhttps://www.blogger.com/profile/18400035423017397788noreply@blogger.comtag:blogger.com,1999:blog-8563771670213207018.post-88735269915127569222008-04-11T18:38:00.000-07:002008-04-11T18:38:00.000-07:00Hi Mohit, I am facing a similar kind of issue in S...Hi Mohit, I am facing a similar kind of issue in SSIS. My SSIS script make a call to webservice.<BR/> e.g i am calling two package from a master package. If pakage are in series they work fine. as soon as i put em in parallel then it failed while calling the web service from script. if i put em in out of process it works fine. I want them in process . Do you have any idea on that.Anonymoushttps://www.blogger.com/profile/11064227543027019954noreply@blogger.comtag:blogger.com,1999:blog-8563771670213207018.post-70364690213028573572007-11-01T12:40:00.000-07:002007-11-01T12:40:00.000-07:00ThanksI fixed that long back....but the point here...Thanks<BR/><BR/>I fixed that long back....but the point here is that the code was working fine before the hotfixes.Mohit Nayyarhttps://www.blogger.com/profile/18400035423017397788noreply@blogger.comtag:blogger.com,1999:blog-8563771670213207018.post-22208394556187113252007-11-01T11:23:00.000-07:002007-11-01T11:23:00.000-07:00If you put something in the ReadWriteVariables fie...If you put something in the ReadWriteVariables field, that variable is implicitly locked. So, by the time you call LockForWrite, it's already locked. Hence the deadlock.<BR/><BR/>So, either declare it in the ReadWriteVariables field OR call LockForWrite but not both.Anonymousnoreply@blogger.com