TntMPD
Powerful software for ministry partner development...

Can two or more users share a database file over a local area network?

Table of Contents

Page Details

Published by:
Troy Wolbrink
on 21 Oct 2008
3 people found this article useful.

100% of people found this useful
Can two or more users share a database file over a local area network?

It is relatively safe for multiple people to simultaneously edit the same TntMPD database over the network. Special care is needed to avoid data corruption. Let me unpack this:

TntMPD uses a file-based database system (MS Jet/Access to be precise). If TntMPD's connection to the database file is interrupted during a write operation, there's a really good chance for failure. Even the most reliable network will never be as reliable as a local hard drive. And as more users simultaneously connect to the file, the chance of a single point (the one file) failure goes up as well. Network failures, power failures, and Windows not flushing the write-behind cache if you don't shut down properly (or eject the USB drive properly) are all possible types of failure.

In practice, however, failures like this happen very rarely. But they do happen enough that I added an auto-backup feature to TntMPD so that every time you close the program a local backup is created (or a backup is created to the place you specify in the options).

So the best ways to avoid data loss:
1. Maintain a reliable file sharing server and network.
2. Maintain regular backups.
3. Encourage users with a shared database open over the network to close TntMPD when they are done using it.

I use the shared database feature every day when I sync to my wife's computer (using TntSync), and I've never had a failure since 1998 when I started using it. :)

--Troy

Recent Comments

By: Charlie Posted on 20 Jan 2009 2:04 PM

Does sharing the database lend itself to combining individual support groups into one database for use by 8 or 10 folks?

By: Troy Wolbrink Posted on 18 Feb 2009 5:54 PM

I'm not sure I follow.  Do you want to combine 10 databases into one big database?  What's your goal?

By: Russ Posted on 29 Jun 2009 6:42 PM

I have two computers on a network using a shared database of TntMPD.

I experimented by making a change to a contact on computer A and then checking to see if the change was visible on computer B.  I didn't wait long, but it seemed the change on computer B wasn't visible until I re-opened the instance on computer B.

After what time period should I see changes from A reflected on B or is re-opening the database required?

By: Troy Wolbrink Posted on 29 Jun 2009 7:51 PM

You can click on: View | Refresh to get the latest data.  Most of the time, when you navigate to a contact it's fresh data.  So if you waiting for the data to change automatically for the contact you're on, it would never happen.  But perhaps by moving to a different contact, then moving back, it would be fresh data.  Let me know if this does the trick!

By: Russ Posted on 2 Jul 2009 5:04 PM

Hi Troy,

Here's the result of my experiment that seems to consistently yield what I described above.

- Using a Shared Database

- Open TntMPD on computer A

- Open TntMPD on computer B

- Make a change to contact X on computer B

- Navigate away to a different contact on computer B

- Navigate back to contact X on computer B and confirm change was made

- Navigate to contact X on computer A

- choose view -> refresh for contact X on computer A

- **change is NOT visible** for contact X on computer A

- close TntMPD on computer B

- choose view-> refresh for contact X on computer A

- **change is NOT visible** for contact X on computer A

- close TntMPD on computer A

- open TntMPD on computer A

- **change IS visible** on computer A

So, if two computers are using a shared TntMPD database simultaneously, it appears that closing the program is necessary to get the latest information of writes made by any other computers sharing the same instance.

By: Troy Wolbrink Posted on 3 Jul 2009 12:30 PM

I just tried the same experiment with a database shared between my computer and my wife's computer.  When I made a change to a contact on my wife's computer, I was able to see the change on my computer after about 3 seconds.  So it wasn't instantly visible to my computer, but I didn't have to close and reopen on my computer either.  Maybe you were to fast in your experiment?  The Jet database engine used by TntMPD has a lazy write and a cached read feature for performance.  Perhaps your test outperformed the built-in delays.

By: Paul Bowers Posted on 14 Oct 2009 11:45 AM

I tried putting the database on our server, but now I get that the file is read only.  I can only open it on the server & not get that error.  Opinions?