On Fri, 12 Sep 2014 18:33:46 -0400, Mark Halegua
<phanto...@mindspring.com> wrote:

>On Friday, September 12, 2014 09:43:39 PM Simon Slavin wrote:
>> On 12 Sep 2014, at 9:15pm, Mark Halegua <phanto...@mindspring.com> wrote:
>> > On Friday, September 12, 2014 06:57:21 PM Simon Slavin wrote:
>> >> On 12 Sep 2014, at 5:28pm, Mark Halegua <phanto...@mindspring.com> wrote:
>> >>> The db file is stored on a seagate goflex device as my kinda file
>> >>> server.
>> >>> on that device I can open the db to read but not to write to.
>> >> 
>> >> Do you get an error message ?  Or do your changes just disappear ?
>> >> 
>> >> If it's an error message, what step generates it and what does it say ?
>> > 
>> > when I try an insert I get this:
>> > 
>> > Error: database is locked
>> 
>> Put a text file on you goflex device.
>> 
>> Then access your text file with a text editor and try to make a change in
>> it.  Will it let you save the change you make ?
>> 
>> Simon.
>
>Yes.  The only time I have a problem with files is the sqlite db
>
>Mark

The Seagate goflex appears to be a NAS (Network Attached
Storage, you probably access it using CIFS/SMB/SAMBA (the
protocol microsoft uses for file and printer sharing). 
If the NAS doesn't implement the protocol 100% perfect, locking
issues will occur, which can lead to corruption.
See also:

http://sqlite.org/lockingv3.html#how_to_corrupt

"... On Windows it uses the LockFile(), LockFileEx(), and
UnlockFile() system calls. SQLite assumes that these system
calls all work as advertised. If that is not the case, then
database corruption can result. One should note that POSIX
advisory locking is known to be buggy or even unimplemented on
many NFS implementations (including recent versions of Mac OS X)
and that there are reports of locking problems for network
filesystems under Windows. Your best defense is to not use
SQLite for files on a network filesystem. "

It works better on your local filesystem.

-- 
Regards,

Kees Nuyt


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to