• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple servers start scenario

 
Liviu Carausu
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Have you take precautions measures against multiple starts of the server using the same database file or the same service name ?
Do you think it is necessary to obtain a lock on the database file ?
Thanks,
Liviu
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Posts: 12056
232
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Liviu,

Search your instructions for something like "You may assume that at any moment, at most one program is accessing the database file" - if you have that, then you don't need to worry about multiple starts of the server.

Also - check the APIs for file level locking - you should find a warning against this (at least if you want "write once, run everywhere" functionality).

Regards, Andrew
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!