RE: Understanding how my code is causing deadlocks!
From: AnthonyThomas (AnthonyThomas_at_discussions.microsoft.com)
Date: 11/04/04
- Next message: Test: "sql data file"
- Previous message: AnthonyThomas: "RE: HP Openview SQL-SPI"
- In reply to: Kevin Kraus: "Understanding how my code is causing deadlocks!"
- Next in thread: Wayne Snyder: "Re: Understanding how my code is causing deadlocks!"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 3 Nov 2004 21:37:02 -0800
Enable trace 1204 and 3605. This will give you more info on the processes
and write that information to the Application Event log.
Sincerely,
Anthony Thomas
"Kevin Kraus" wrote:
> Hello everyone,
>
> I have a windows service that has a job of periodically pulling data from
> SQL Server and sending it to a web service. The way the service pulls the
> data is as follows:
>
> - Update statement to update batch of records (1 table) to be "pulled"
> - Select statement to pull records marked in batch (1 join to other table
> for extra data)
> - Send to Web Service
> - Update statement to update batch of records (1 table) with status of
> "pulled" (Periodic deadlocks produced here)
>
> Background on the service code and process:
> - Component instanciated by windows service to do the sql calls is a .NET
> ServicedComponent with TransactionOption.NotSupported.
> - All SQL is embedded in code.
> - First update statement and select statement are sent to SQL server in one
> call.
> - Second Update statement is made in separate sql server call
> - The host application that owns this database is out of my control and I
> don't know how it makes it's SQL calls to the resources I am trying to update.
>
> My understanding of deadlocks is that my process thread needs to have a lock
> on a resource (r1) and try to acquire another lock on a different resource
> (r2) while a different process thread has r2 locked and is trying to access
> r1 that I have locked. I don't see how I have any locks based off of my
> simple update, select, update statements.
>
> I need enlightenment on what possible locking scenarios might be causing
> these deadlocks.
>
> Thanks for your help
>
> Kevin
- Next message: Test: "sql data file"
- Previous message: AnthonyThomas: "RE: HP Openview SQL-SPI"
- In reply to: Kevin Kraus: "Understanding how my code is causing deadlocks!"
- Next in thread: Wayne Snyder: "Re: Understanding how my code is causing deadlocks!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|