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

  • Home
  • SEARCH
  • 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 6477369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:56:25+00:00 2026-05-25T06:56:25+00:00

I am using a process that inserts data in 2 tables with rowlock, continuously.

  • 0

I am using a process that inserts data in 2 tables with rowlock, continuously. In the same time I want to use some queries on these tables. As I said the inserts are done with (rowlock) and I use for the queries the isolation level read uncomitted and nolock.

When I use the queries on a single table they work perfectly, but when I try to join the 2 tables I get this error:

Transaction (Process ID 88) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Meanwhile, if I use the sp_lock procedure I found that the Key lock becomes a tab lock when I perform my queries.

Does anyone know if there is a special relation between (nolock) and join? And if there is how can I avoid it.

UPDATE:

Insert into tbl1 with (rowlock)
(
 col1,
 col2,
 col3
)
select * from #tbl_temp

( this is in an infinite loop and the data from #tbl_temp is always changed. Actualy this is a more complex process but this is the idea.)

Insert into tbl2 with (rowlock)
(
 col3,
 col4,
 col5
)

select * from #tbl_temp2 

In the same time I perform

set transaction isolation level read uncomitted

select col1,col2,col3 
from tbl1 with (nolock)  -- works fine


select col1,col2,a.col3 

from tbl1 with (nolock) join tbl2 with (nolock) on (tbl1.col3 = tbl2.col3)

— deadlock

  • 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-25T06:56:25+00:00Added an answer on May 25, 2026 at 6:56 am

    You might want to try turning on READ_COMMITTED_SHAPSHOT isolation level for your database.

    (But be aware that this will put increased pressure on tempDB)

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

Sidebar

Related Questions

I have some data generated in MATLAB that I want to process using Perl.
I have a process that imports a lot of data (950k rows) using inserts
I'm using VB.NET for a web-application that starts some process using CreateObject, like this:
We have an application that takes real time data and inserts it into database.
I have two processes that work with data in the same table. One process
I have a Java process that opens a file using a FileReader. How can
I have a need to create a transactional process using an external API that
In .Net, suppose I instantiate an object that starts an asynchronous process (using Delegate.BeginInvoke
It's common knowledge that using System.Diagnostics.Process.Start is the way to launch a url from
I've heard from someone that they´re using a business process automation tool (like Weblogic

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.