Deadlocks are hard to trouble shoot..

don't overly use <cftransaction> with select... i.e espcially.. when 
doing Select MAX(ID) instead use..  following in the insert..

   SELECT @@IDENTITY AS whateverFiledName;
   set nocount off

   <cfset newId = insertNewId.whateverFiledName>

also for updates and deletes.. try... WITH(ROWLOCK)

Ryan Duckworth wrote:
> Does anyone have any ideas on how to prevent/handle database deadlock?
> 
> Error Executing Database Query. [Macromedia][SQLServer JDBC
> Driver][SQLServer]Transaction (Process ID 132) was deadlocked on lock
> resources with another process and has been chosen as the deadlock
> victim. Rerun the transaction.
> 
> We get a message similar to the one above about once a week.
> 
> My guess is that the deadlock occurred b/c the same row was attempting
> to be read and written to at the same time.
> 
> 
> Ryan Duckworth 
> Macromedia ColdFusion Certified Professional
> Uhlig Communications 
> 10983 Granada Lane 
> Overland Park, KS 66211
> (913) 754-4272
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF 
community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=34

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182065
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to