Monday, March 19, 2012

deadlock in agent job

I have a job with a single t-sql step. The tsql executes a stored proc that
occasionally deadlocks.
I know i can't trap the deadlock in the stored proc, but I'd like to trap
the deadlock in the agent job, and retry the stored proc.
What is the best way to handle this?
-Rand yThis is normal behavior. A trigger is executed for each statement that cause
s
the trigger to fire and not for each row affected by the statement. See
"Multirow Considerations" in BOL.
AMB
"Randy" wrote:

> I have a job with a single t-sql step. The tsql executes a stored proc th
at
> occasionally deadlocks.
> I know i can't trap the deadlock in the stored proc, but I'd like to trap
> the deadlock in the agent job, and retry the stored proc.
> What is the best way to handle this?
> -Rand y
>
>|||Sorry, wrong place.
AMB
"Alejandro Mesa" wrote:
> This is normal behavior. A trigger is executed for each statement that cau
ses
> the trigger to fire and not for each row affected by the statement. See
> "Multirow Considerations" in BOL.
>
> AMB
> "Randy" wrote:
>|||What about increasing "Retry attempts" in the advanced tab when creating or
modifing the job step.
AMB
"Randy" wrote:

> I have a job with a single t-sql step. The tsql executes a stored proc th
at
> occasionally deadlocks.
> I know i can't trap the deadlock in the stored proc, but I'd like to trap
> the deadlock in the agent job, and retry the stored proc.
> What is the best way to handle this?
> -Rand y
>
>

No comments:

Post a Comment