Page 1 of 1

About network access to DB

Posted: 04.12.2017, 22:17
by OsquiVilla
Hello:

I want to ask a question maybe absurd about a simple issue of network access to a database.

It is about not accessing a database through a server, but to access a database file through the network, through a shared folder.

The problem is that if you access the same database in the same PC, everything works fine and fast. But when I do it from two different PCs, first I have to open it from the PC that accesses the network, and then by the PC that contains it.

Specifically: one PC has the database and another accesses the same database through the network per shared folder.

Why? :?:

Re: About network access to DB

Posted: 06.12.2017, 09:11
by marsupilami
Hello OsquiVilla,

that could have to do with file locking semantics on Windows. But honestly I don't know. I assume you are using SQLite? You might have more success with asking that question on the sqlite-users mailing list: http://mailinglists.sqlite.org/cgi-bin/ ... lite-users

Generally it seems to be a bad idea to use SQLite on a shared network drive. This is from the SQLite documentation https://www.sqlite.org/whentouse.html:
file locking logic is buggy in many network filesystem implementations (on both Unix and Windows). If file locking does not work correctly, two or more clients might try to modify the same part of the same database at the same time, resulting in corruption.
[...]
Checklist For Choosing The Right Database Engine
1. Is the data separated from the application by a network? → choose client/server
With best regards,

Jan

Re: About network access to DB

Posted: 06.12.2017, 18:25
by OsquiVilla
Thanks