Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make sqlite robust over a Windows shared drive
    primarykey
    data
    text
    <p>I know it is not recommend to use Sqlite over a network drive, for two reasons: performance, and data corruption due to bad implementation of network file systems.</p> <p>Still, I'd like to explore the possibility of using Sqlite to support a multi-user application with a central database. We already support Sqlite on a single-user machine and several database servers (Oracle, PostgreSQL) for multi-user setups. Using Sqlite for multi-user setup would be convenient to allow lightweight installations on existing IT infrastructures with Windows shared drives (SMB).</p> <p>We don't care too much about performance, so we are ready to pay the price needed to avoid corruption. Quoting <a href="http://www.sqlite.org/atomiccommit.html">http://www.sqlite.org/atomiccommit.html</a>, section 9.1:</p> <blockquote> <p>But if you must use a network filesystem to store SQLite database files, consider using a secondary locking mechanism to prevent simultaneous writes to the same database even if the native filesystem locking mechanism malfunctions.</p> </blockquote> <p>I'm looking on hints and advices to implement such a mechanism, or, more generally, on tips to avoid problems with Sqlite over a Windows shared drive.</p> <p>For instance, I'm considering the following brain-dead approach to locking: before any (non read-only) SQLite query, try to create an empty file on the same shared folder and keep it open until the end of the query; normally, any other Windows process trying to create a file with the same name while it's still open would block or fail. Would that work? Anything better?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload