About network access to DB

Discusions not-related to our Components

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
OsquiVilla
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 16.11.2017, 13:25

About network access to DB

Post 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? :?:
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: About network access to DB

Post 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
OsquiVilla
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 16.11.2017, 13:25

Re: About network access to DB

Post by OsquiVilla »

Thanks
Post Reply