Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
netedk
Starting Member
11 Posts |
Posted - 2004-04-20 : 10:16:42
|
| Hi!I have a partitioned view as follows:View: recp_grouppartition_id (partitioning field, contstraint on this field)group_idrecipient_idI am tryig to delete some rows from the view based on group_id. Since I cannot join the partitioned view with itself in a delete operation, I am doing this in 2 steps:SELECT recipient_id INTO #recipients_to_deleteFROM recp_group t WITH (NOLOCK)WHERE partition_id = @partition_idAND group_id = @groupidDELETEFROM recp_groupWHERE partition_id = @partition_idAND recipient_id IN (SELECT recipient_id FROM #recipients_to_delete)This almost always gives a deadlock error on the DELETE statement. I enabled trace 1204 and this is what I get:Requested By:ResType:LockOwner Stype:'OR' Mode: IX SPID:62 ECID:0 Ec:(0x3c97d4d8) Value:0x5db9af60 Cost:(0/3C)Victim:ResType:LockOwner Stype:'OR' Mode: IX SPID:62 ECID:0 Ec:(0x3c97d4d8) Value:0x5db9af60 Cost:(0/3C)From this I can make out that the process is getting into a deadlock with itself (same spid) - but I cannot understand why this is happening? Can someone explain what else I can understand from this?Any help is greatly appreciated.ThanksDK |
|
|
|
|
|