May 31, 2011 at 7:15 am
Hi Everybody,
we have a critical job to run everyday. In that job had failured due to deadlock occurred. We were
anaylzed and found so many sp are involved in that job. Some of the sp's are used to truncate the table and insert the records from other source server. And update those records in different conditions.
In that Update statements they are used to begin tran,paglock,xlock..
Which one of the above is good, to lock the table. and why ?
It would be very helpful, if anyone reply this..
Regards
Balaji G
May 31, 2011 at 3:37 pm
If this process is as complex as you describe and you can't narrow it down to a few queries I'd recommend to get a consultant in analyzing your system. A forum is just the wrong place for such a scenario.
The given information cannot be used at all to provide a specific answer. All I can do is to recommend leaving the lock escalation mechanism to SQL Server unless there's a valid (and verified) reason not to. There's no general rule to use a specific hint or statement.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply