Re: [sqlite] Multiuser on LAN, how good/bad is it ?

2006-09-18 Thread Nikki Locke
Martin Alfredsson wrote:
> Reading the documentation is a bit contradicting: 
>  
> >A good rule of thumb is that you should avoid using SQLite in 
> situations where 
> >the same database will be accessed simultaneously from many computers 
> over a network filesystem. 
>  
> >Most SQL database engines are client/server based. Of those that are 
> serverless, SQLite is the only 
> >one that this author knows of that allows multiple applications to 
> access the same database at the same time. 
>  
> Though I can interpret the the second statement as "on a single machine" 
> I'd like to hear about what 
> your experience is with using it as multiuser on a lan. 
>  
> Does it crash due to network problem, does it work better with WinXP 
> than Win9x/2k/linux  etc. 

All SQLite write operations obtain an exclusive lock on the whole database. 
This 
is fine, but obviously a bit limiting if you have thousands of tasks.

The exclusive lock is a file system lock, which is fine except where the 
database file is on certain NFS mounted file systems - there are known bugs in 
some implementations of NFS which means locking does not work as expected (two 
people can end up holding the same exclusive lock at the same time!). If you 
hold a SQLite database on such an NFS filesystem, and try to use it multi-user, 
it may well beak and corrupt the database. I repeat that this is not a bug in 
SQLite, but in some implementations of NFS.

Hope this explanation is clear and correct (I'm just an SQLite user who gets 
most of his knowledge from reading this list).

-- 
Nikki Locke, Trumphurst Ltd.  PC & Unix consultancy & programming
http://www.trumphurst.com/



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Multiuser on LAN, how good/bad is it ?

2006-09-18 Thread Jay Sprenkle

On 9/17/06, Martin Alfredsson <[EMAIL PROTECTED]> wrote:

Reading the documentation is a bit contradicting:

 >A good rule of thumb is that you should avoid using SQLite in
situations where
 >the same database will be accessed simultaneously from many computers
over a network filesystem.


The problem is usually that locking does not work correctly.
The database gets corrupted.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Multiuser on LAN, how good/bad is it ?

2006-09-17 Thread thomas . l
Hi Martin

Martin Alfredsson wrote:
> Though I can interpret the the second statement as "on a single machine"
> I'd like to hear about what  your experience is with using it as multiuser
> on a lan.
> Does it crash due to network problem, does it work better with WinXP
> than Win9x/2k/linux  etc.

I have performed some tests some time ago. At first I start 4 jobs
competitively, each job insert 200 Records with a Single-Insert-
Sql-Statement. Thats a little time-consuming. I got no problems.
I could not forecast who becomes the topical one job, with the rights to
write, but all Jobs finishd without errors. It changed even during
running.

At second I started 4 concurrency Transactions, each Job inserts 1
Records. Same Result! No Problems! Any Job finished without errors.

Now I think, there is no Problems to use SQLIte as a Multiuser-DB, if it
is a Dialog-Processing-Application.

Note: From SQLite's viewpoint it is imho the same, if you store the DB on
your local PC or on a public Fileserver. It stay as a Flatfile.

Best Regards
Thomas

-- 
www.thlu.de


-
To unsubscribe, send email to [EMAIL PROTECTED]
-