Re: [sqlite] sqlite db is locked on network drive

2014-09-12 Thread Mark Halegua
On Saturday, September 13, 2014 01:10:37 AM Kees Nuyt wrote:
> On Sat, 13 Sep 2014 00:55:23 +0200, Kees Nuyt 
> 
> wrote:
> > It works better on your local filesystem.
> 
> Perhaps you can configure (a partition on) the Seagate GoFlex as
> an iSCSI target and configure an iSCSI initiator on the PC ?
> A quick websearch on "seagate goflex iscsi" suggests that's
> possible.
> If so, locking should work.
> (warning: untested)

all things bing equal I will just use the NAS to store this particular db and 
as a backup for my 
development system.  The db works perfectly well on the local system (one is 
ubuntu, the 
others are Linux Mint 17) connecting to the NAS via CIFS (I'd prefer NFS, but 
seagate/govlex doesn't support that).

Thanks for the tips people.

Mark

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


Re: [sqlite] sqlite db is locked on network drive

2014-09-12 Thread Kees Nuyt
On Sat, 13 Sep 2014 00:55:23 +0200, Kees Nuyt 
wrote:

> It works better on your local filesystem.

Perhaps you can configure (a partition on) the Seagate GoFlex as
an iSCSI target and configure an iSCSI initiator on the PC ?
A quick websearch on "seagate goflex iscsi" suggests that's
possible.
If so, locking should work.
(warning: untested)

-- 
Regards,

Kees Nuyt

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


Re: [sqlite] sqlite db is locked on network drive

2014-09-12 Thread Kees Nuyt
On Fri, 12 Sep 2014 18:33:46 -0400, Mark Halegua
 wrote:

>On Friday, September 12, 2014 09:43:39 PM Simon Slavin wrote:
>> On 12 Sep 2014, at 9:15pm, Mark Halegua  wrote:
>> > On Friday, September 12, 2014 06:57:21 PM Simon Slavin wrote:
>> >> On 12 Sep 2014, at 5:28pm, Mark Halegua  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


Re: [sqlite] sqlite db is locked on network drive

2014-09-12 Thread Mark Halegua
On Friday, September 12, 2014 09:43:39 PM Simon Slavin wrote:
> On 12 Sep 2014, at 9:15pm, Mark Halegua  wrote:
> > On Friday, September 12, 2014 06:57:21 PM Simon Slavin wrote:
> >> On 12 Sep 2014, at 5:28pm, Mark Halegua  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


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


Re: [sqlite] sqlite db is locked on network drive

2014-09-12 Thread FarSight Data Systems
when I try an insert I get this:

Error: database is locked

Mark

On Friday, September 12, 2014 06:57:21 PM Simon Slavin wrote:
> On 12 Sep 2014, at 5:28pm, Mark Halegua  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 ?
> 
> Simon.
> 
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

-- 

Mark S. Halegua
718-360-1712
917-686-8794
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite db is locked on network drive

2014-09-12 Thread Simon Slavin

On 12 Sep 2014, at 9:15pm, Mark Halegua  wrote:

> On Friday, September 12, 2014 06:57:21 PM Simon Slavin wrote:
>> On 12 Sep 2014, at 5:28pm, Mark Halegua  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.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite db is locked on network drive

2014-09-12 Thread Keith Medcalf
>when I try an insert I get this:

>Error: database is locked

Is that a "goflex" USB device or the network device?  If the network device 
this likely means that you are attempting to use the device in a manner for 
which it was not designed.





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


Re: [sqlite] sqlite db is locked on network drive

2014-09-12 Thread Mark Halegua
On Friday, September 12, 2014 06:57:21 PM Simon Slavin wrote:
> On 12 Sep 2014, at 5:28pm, Mark Halegua  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 ?
> 
> Simon.

when I try an insert I get this:

Error: database is locked

Mark


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


Re: [sqlite] sqlite db is locked on network drive

2014-09-12 Thread Simon Slavin

On 12 Sep 2014, at 5:28pm, Mark Halegua  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 ?

Simon.

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


[sqlite] sqlite db is locked on network drive

2014-09-12 Thread Mark Halegua
I'm developing an application, for single users, using python and wxpyton with 
pysqlite.  I often go into the database via sqlite3 to modify stuff or add 
records to tables for testing.

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.  I need to 
copy/move the db to the local drive and modify it there, then copy the db back 
to the network drive.

I'd like to be able to open and write to the db without going through all 
that.  There must be some sort of network file locking I don't see.

So, how can I unlock the file for writing to the network file?

Thanks, 

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