Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Database contention

Database contention

Scheduled Pinned Locked Moved Database
csharpdatabasequestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Darkness84
    wrote on last edited by
    #1

    I have a service (which I have written in C#) that I want to run on 2 different computers however they will both be accessing the same database. Is there a way to tell when one computer is writing to the database so I can stop the other from writing to it at the same time to avoid contention issues?

    D 1 Reply Last reply
    0
    • D Darkness84

      I have a service (which I have written in C#) that I want to run on 2 different computers however they will both be accessing the same database. Is there a way to tell when one computer is writing to the database so I can stop the other from writing to it at the same time to avoid contention issues?

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      It would help to know what kind of database... Access, SQL Server, ...

      Dave Kreskowiak Microsoft MVP - Visual Basic

      D 1 Reply Last reply
      0
      • D Dave Kreskowiak

        It would help to know what kind of database... Access, SQL Server, ...

        Dave Kreskowiak Microsoft MVP - Visual Basic

        D Offline
        D Offline
        Darkness84
        wrote on last edited by
        #3

        SQL Server 2005

        D 1 Reply Last reply
        0
        • D Darkness84

          SQL Server 2005

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          In that case, no, you don't have to worry about it. SQL Server maintains order on its own. Just keep in mind that the "last write" will win.

          Dave Kreskowiak Microsoft MVP - Visual Basic

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups