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 4114810
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:30:08+00:00 2026-05-20T22:30:08+00:00

I am experiencing an unclear sql server 2008 deadlock. I have two tables: T1:

  • 0

I am experiencing an unclear sql server 2008 deadlock.

I have two tables:

T1: ID – bigint (PK), JOBID – bigint, X- bigint
T2: ID – bigint (PK), JOBID – bigint, X- bigint

The sql server error log describes the following:

Spid 233 is running this query: 
    SELECT TOP(500) FROM T1.X INNER JOIN T2 ON T1.X = T2.X WHERE T2.ID>-1 AND T2.ID<=10000
Spid 234 is running this query: 
    DELETE FROM T2 WHERE (X=1) OR (X=7) OR ( X=1233) OR X(=7878) OR (X=33) OR (X=776) OR (X=112)
Spid 233 is waiting for a Shared KEY lock on index t2.PK_T2.  (Spid 234 holds a conflicting X lock.)
Spid 234 is waiting for an eXclusive KEY lock on index t2.PK_T2.  (Spid 233 holds a conflicting S lock.)

PK_X is a Clustered ascending index on the identity column (ID which is auto increment column).
T2 also has another index which is a non clustered index on JOBID and X.

How come both processes are owners of a lock on the same object (T2.PK_T2)?

Please help,
Doron

  • 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-20T22:30:09+00:00Added an answer on May 20, 2026 at 10:30 pm

    How come both processes are owners of a lock on the same object (T2.PK_T2)?

    The locks are not on the whole index. They are key locks and will be on different keys (rows) within the index.

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

Sidebar

Related Questions

I'm experiencing something really strange! I have a div that I'm hiding with JS
Im experiencing an issue with a production server. I can connect to the server
I am experiencing a weird behavior by Scala handling of superclass constructors. I have
After experiencing numerous problems with a certain media player, it got me thinking is
I'm experiencing an issue on a test machine running Red Hat Linux (kernel version
I'm experiencing what I believe is a circular dependency issue with my PHP application.
I'm experiencing an issue with ActiveMQ and would like to trace/view all ActiveMQ activity.
Our team has been experiencing a recurring problem with velocity templates. Upon rendering, some
I'm experiencing a strange issue where my Visual Studio 2005 C++ program crashes the
I've been experiencing the good and the bad sides of messaging systems in real

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.