Concurrency question

  • I have a Windows service that I want to install on two separate machines. There is a loop in it that checks a table every 30 seconds. If I install the service on two machines (the two service will be connecting to the same db) then wil there be a problem?

    I am talking about locks, concurrency etc.

    Thanks for any replies.

  • leesider (7/23/2012)


    I have a Windows service that I want to install on two separate machines. There is a loop in it that checks a table every 30 seconds. If I install the service on two machines (the two service will be connecting to the same db) then wil there be a problem?

    I am talking about locks, concurrency etc.

    Database will see them as two client connections - trust me, SQL Server can handle two clients selecting from the same table once every 30 seconds 🙂

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • That's what I thought thanks 🙂

  • Very good question in-deep. Great reply by Paul.

    Thanks for posting 🙂

    - Lokesh

    ~ Lokesh Vij


    Guidelines for quicker answers on T-SQL question[/url]
    Guidelines for answers on Performance questions

    Link to my Blog Post --> www.SQLPathy.com[/url]

    Follow me @Twitter

  • the only concurrency issue you're likely to get is if someone is updating the table at the time you request the reads

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply