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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:53:50+00:00 2026-05-27T13:53:50+00:00

In my SQL Server 2008 Enterprise I have a database that contains several tables:

  • 0

In my SQL Server 2008 Enterprise I have a database that contains several tables:

  1. Departments – few rows
  2. Persons – a 300+- rows
  3. Permissions – thousands of rows

The primary key of Persons is the PersonId combined with the DepartmentId (which is a FK itself).

The Permissions table has a FK with cascade functionality (delete, update) to the PK of the Persons table.

When I execute this statement:

UPDATE Persons SET PersonId = PersonId + 1 WHERE DepartmentId = 789

using SSMS, ADO, ADO.NET I either get a timeout or it takes way too long (more than 10 minutes).

I tried updating the rows one by one with ADO.NET and found out this strange behaviour: when I get to a specific rows the update starts to hang. I tried restarting, drop and create, backup and restore, deleting the rows and reinserting but haven’t solved it yet.

Thanks in advance for any answers.
Hen

  • 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-27T13:53:51+00:00Added an answer on May 27, 2026 at 1:53 pm

    Almost all instances of excessive blocking can be fixed (or at least managed) by using the appropriate indexes.

    In addition, you should ensure that your indexes are rebuilt and your statistics are updated (at a minimum).

    Is your clustered index defined on the composite primary key (PersonId, DepartmentId) ?

    There are several ways to identify which process is blocking. One of which is sp_who2. Look for an entry in the BlkBy column.

    Also see: How To Find The Table Names Which Are Locked (Specific to any transaction)

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

Sidebar

Related Questions

SQL Server 2008 Database Question. I have 2 tables, for arguments sake called Customers
I am using SQL Server 2008 Enterprise. I have tried that if I set
I have a database that I am viewing with SQL Server Management Studio 2008
i have my C# program that work with sql-server 2008 Enterprise Edition i have
I am using SQL Server 2008 Enterprise. I have created a very simple test
I am using SQL Server 2008 Enterprise with Windows Server 2008 Enterprise. I have
I have two SQL Server 2008 Enterprise databases (on two machines), and one of
I have two SQL Server 2008 Enterprise databases (on two machines), and one of
I am using SQL Server 2008 Enterprise. I have a table and one of
I have a table in a database on my development(local workstation) SQL Server 2008

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.