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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:08:56+00:00 2026-05-11T01:08:56+00:00

Application 1 – Opens a SqlConnection and a SqlTransaction against a SQLServer 2005 database

  • 0

Application 1 –

  • Opens a SqlConnection and a SqlTransaction against a SQLServer 2005 database
  • Inserts a record into Table1
  • Does not commit or roll-back the SqlTransaction – intentially keeping this alive to demonstrate / describe the problem

Application 2 –

  • Opens SqlConnection and a SqlTransaction against a SqlServer 2005 database
  • Tries to run this query – ‘SELECT COUNT(Id) FROM Table1’

Table1 – Id is an Identity field. Name is a varchar field. No other fields in the table

Application 2 is unable to run the ‘SELECT …’ query. It seems that Table1 is locked or blocked by the insert done in Application 1.

Though the scenario mentioned above is fictional – it demonstrates the problem that we are facing adequately. We want to be able to open a long running SqlTransaction (maybe hours) and do many inserts/updates via that SqlTransaction.

We are developing a data conversion application which has to do a lot of processing on a lot of data before it could be inserted/updated into the database. The data conversion is to happen while we have our main WebForms based application running against the same SQLServer 2005 database in which we want to perform the long running transaction.

All the tables in our application are segmented by a ClientID field from a ClientMaster table. For example if we have a CollegeMaster table, then it would have a ClientID field as a part of the primary key and a ID field for its own identification. The data conversion starts by creating a new ClientID and that new ClientID field is used in all other tables.

Ideally all queries like the one mentioned in Application 2 should not be affected by the long running transaction. Those queries should only read / use data that is already commited and continue to work rather than get blocked due to the long running transaction. What can Application 1 do to ensure that this is achieved?

  • 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. 2026-05-11T01:08:57+00:00Added an answer on May 11, 2026 at 1:08 am

    You may want to look into this Sql 2005 feature. Sounds like it may help you. Its a newer locking mechanism you have to enable in the DB, but apparently has much less blocking.

    http://msdn.microsoft.com/en-us/library/ms177404(SQL.90).aspx

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

Sidebar

Ask A Question

Stats

  • Questions 63k
  • Answers 63k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Looks like you're grabbing the url of the parent. Try… May 11, 2026 at 10:21 am
  • added an answer I often use this idiom of Awk: awk '{sum[$2]+= $1;}END{for… May 11, 2026 at 10:21 am
  • added an answer Also, if you return XML either as a String or… May 11, 2026 at 10:21 am

Related Questions

Application 1 - Opens a SqlConnection and a SqlTransaction against a SQLServer 2005 database
I need to add functionality to my J2EE-based wep application: 1) Take some page,
In a Java application (JRE 1.5.0_12) on Windows XP, I call a native method:
I have a ASP.NET 1.1 application, and I'm trying to find out why when
I'm maintaining a .NET 1.1 application and one of the things I've been tasked
I'm stuck with .Net 1.1 application (i.e. I can not use the generics goodies
We run a .NET 1.1 application on W2k3 server. The app pool is configured
In order for my application (.Net 1.1) to use the system configured proxy server
We're developing a windows mobile 6.1 application and would like to make the user
I am currently working on an iPhone 2.1 application. I am new to Objective

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.