Help on this error..
Error: 0xC001405B at Send Mail when process fails: A deadlock was detected while trying to lock variable "System::ErrorDescription, System: ourceName, User::ErrorMessage" for read access. A lock could not be acquired after 16 attempts and timed out.
Error: 0xC0017003 at Send Mail when process fails: The expression ""Customer Details SCI to CV process failed at " +SUBSTRING((DT_WSTR, 50) GETDATE(),1,19)+"\n \nERROR : "+ @[System::ErrorDescription] + @[User::ErrorMessage] +"\n Task
in Error : "+ @[System: ourceName]" on property "MessageSource" cannot be evaluated. Modify the expression to be valid.
Warning: 0x80019002 at Send Mail when process fails: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (4) reached the maximum allowed (1); resulting in failure. This occurs when the
number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Task failed: Send Mail when process fails
Warning: 0x80019002 at OnError: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (4) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches
the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Error: 0x4 at Script Task Cust Import Data: The Script returned a failure result.
Task failed: Script Task Cust Import Data
SSIS package "SCICustDetailsCompositToOracle.dtsx" finished: Failure.
I got this error when i written a expression in Send mail task.
Thanks in Advance..
May 4th, 2011 9:43pm
seems that you are writing in the variable in a Script task or script component, and while this cause error, you are going to handle this error and a deadlock happened there.
for detailed help we need to know what is your ssis schema? what did you do in control flow, data flow and event handlers exactly.http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
May 5th, 2011 12:22am
In the control flow i have a script task which has code
Try
---------
--------
Catch e as Exception
Dts.Variables("ErrorMessage").Value = e.Message
End Try
In the On Error Event Handler
I have a Send Mail Task and has Expression for Message Source
"Customer Details SCI to CV process failed at " +SUBSTRING((DT_WSTR, 50) GETDATE(),1,19)+"\n \nERROR : "+ @[System::ErrorDescription]
+ @[User::ErrorMessage] +"\n Task in Error : "+ @[System:SourceName]"
Here I am getting error as
User::ErrorMessage" for read access. A lock could not be acquired after 16 attempts and timed out.
But still it send an email
I even tried by using this code
Dim vars As Variables
Dts.VariableDispenser.LockOneForWrite("ErrorMessage", vars)
Dts.Variables("User::ErrorMessage").Value = e.Message
vars .Value = e.Message
vars.Unlock()
but still get the same error.
Thanks in Advance
May 5th, 2011 1:55am
did you get your FIRST Error in the Script task or Send mail task?
also : We need to know what is in TRY section of script task.http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
May 5th, 2011 2:02am
If i comment these lines below in Script task
Dim vars As Variables
'Dts.VariableDispenser.LockOneForWrite("ErrorMessage", vars)--------------Comment
Dts.Variables("User::ErrorMessage").Value = e.Message
''vars .Value = e.Message---------comment
''vars.Unlock()------comment
then the Script task is running fine and the send mail task is failing with error
Send Mail when process fails: A deadlock was detected while trying to lock variable "System::ErrorDescription, System: ourceName, User::ErrorMessage" for read access. A lock could not be acquired after 16 attempts and timed out.
Error: 0xC0017003 at Send Mail when process fails: The expression ""Customer Details SCI to CV process failed at " +SUBSTRING((DT_WSTR, 50) GETDATE(),1,19)+"\n \nERROR : "+ @[System::ErrorDescription] + @[User::ErrorMessage] +"\n Task in
Error : "+ @[System: ourceName]" on property "MessageSource" cannot be evaluated. Modify the expression to be valid.
Warning: 0x80019002 at Send Mail when process fails: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (4) reached the maximum allowed (1); resulting in failure. This occurs when the number
of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Task failed: Send Mail when process fails
If i uncomment the above lines in Script task The Script task is running fine and error is logged to the variable in Script task and its failing in SEND MAIL TASK with Same ERROR message.
May 5th, 2011 2:12am
I would suggest you to start SQL Profile / SQL Trace on database to find out the cause of Deadlocks and find the way to get rid of dead locks.
Please make your transactions small as possible to avoid these dead locks, might be adding couple of missisng indexes would solve the problem
http://uk.linkedin.com/in/ramjaddu
Free Windows Admin Tool Kit Click here and download it now
May 5th, 2011 5:42am