Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 776321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:25:38+00:00 2026-05-14T19:25:38+00:00

We have a deadlock issue we’re trying to track down. I have an deadlock

  • 0

We have a deadlock issue we’re trying to track down. I have an deadlock graph (xdl) generated from Profiler. It shows the losing SQL statement as a simple Select statement, not an Update, Delete or Insert statement. The graph shows the losing Select statement as requesting a Shared lock on a resource **but also owning an Update lock on a resource**. This is what is baffling me. Why would a Select statement that is not part of an Insert, Update or Delete ever hold an Update lock on a resource?

I should add that the Update lock it owns is on the table being selected against by the losing Select statement.

EDIT: Please don’t suggest using NoLock. Yes that would solve the problem but introduces a new one – a dirty read issue. This query is hitting a production server. What I really want to know is why would a Select statement issue an Update lock.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T19:25:39+00:00Added an answer on May 14, 2026 at 7:25 pm

    You sure the SELECT owns the U lock?

    As you know, U and X locks (as well as serializable S locks) are held for the duration of the transaction, not the statement. So it is perfectly possible for a transaction that issued a write to own a U lock, from a previously executed statement. Why it would own a U lock, as opposed to an X lock (ie. it owns a U lock that was not upgraded to an X), is a bit of a puzzle in itself, but I can envision couple of ways this can happen.
    So it is perfectly possible to have a SELECT statement to own X/U locks if it is part of a multi-statement transaction. A standalone SELECT with a U lock under its belt, that is a bit unusual I reckon.

    The typical SELECT vs. UPDATE deadlock occurs on index access order scenarios, like the one described in Read/Write deadlock. I trust you did a diligent read of the deadlock graph, but if it’s not too much to ask, can you share it?

    Oh, and btw, have you considered read committed snapshot?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have these two exceptions generated when I try to get data from SQL
I have a deadlock when I invoke the UI thread from a worker thread.
I am debugging a deadlock issue and call stack shows that threads are waiting
We have an issue with some deadlock and I posted this question . With
i'm currently (trying) to program a little game. And i have a small design/deadlock
I have a problem with Observer-Pattern and deadlock using threads. package observerDeadLock; import java.util.Observable;
I have a strange problem, a deadlock problem, where if I pause the program
Having a deadlock in webservice + hibernate... No idea why. I have the following
Have a painfully simple blog Post creator, and I'm trying to check if the
Have an issue with marshall and unmarshall readers and writers. So here it is.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.