Re: [sqlite] File Locking

2018-04-27 Thread David Raymond
To: SQLite mailing list Subject: [sqlite] File Locking I have read the excellent page: https://www.sqlite.org/lockingv3.html I was hoping someone could clarify/confirm the behavior during the following steps. On a Windows PC, if I have a SQLite DB open (using system.data.sqlite if that is an impo

[sqlite] File Locking

2018-04-27 Thread Denis Burke
I have read the excellent page: https://www.sqlite.org/lockingv3.html I was hoping someone could clarify/confirm the behavior during the following steps. On a Windows PC, if I have a SQLite DB open (using system.data.sqlite if that is an important fact) over a Windows network share, here are the

[sqlite] File Locking Status

2016-03-08 Thread Simon Slavin
On 8 Mar 2016, at 6:50pm, Denis Burke wrote: > Is it possible to tell if SQLite has a database file locked? Not through > OS tools, but from System.Data.SQlite? Can't answer your question but these seem relevant:

[sqlite] File Locking Status

2016-03-08 Thread Doug Currie
> Is it possible to tell if SQLite has a database file locked? Not through > OS tools, but from System.Data.SQlite? If you can execute BEGIN EXCLUSIVE TRANSACTION and get back SQLITE_OK then there were no locks on the database. Of course you will then need to ROLLBACK. Note that this

[sqlite] File Locking Status

2016-03-08 Thread Denis Burke
Thank you Simon - that is helpful. I would still be interested if anyone can provide any further info regarding locking as seen through System.Data.SQlite. -Denis -- On 8 Mar 2016, at 6:50pm, Denis Burke wrote: > Is it possible to tell if SQLite has a database file locked? Not

[sqlite] File Locking Status

2016-03-08 Thread Denis Burke
Is it possible to tell if SQLite has a database file locked? Not through OS tools, but from System.Data.SQlite? I would like my application to be able to understand if its use of SQLite has the file locked at a given moment. (and yes I know other processes/apps could also lock the file).

Re: [sqlite] File locking requirements in Single Process/Multi-Threaded system

2012-02-07 Thread Marc L. Allen
> The methods on the VFS open-file > objectthat do reading and > writing specify both the amount and the offset. There are no seeks. Oh, yeah. :( Sorry. I've even implemented those routines. > The open succeeds. xLock() does not interact with any

Re: [sqlite] File locking requirements in Single Process/Multi-Threaded system

2012-02-07 Thread Richard Hipp
kReservedLock. Locking is purely advisory. > > Marc > > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto: > sqlite-users-boun...@sqlite.org] On Behalf Of Richard Hipp > Sent: Tuesday, February 07, 2012 3:09 PM > To: General Discussion of SQLite Da

Re: [sqlite] File locking requirements in Single Process/Multi-Threaded system

2012-02-07 Thread Marc L. Allen
Hipp Sent: Tuesday, February 07, 2012 3:09 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] File locking requirements in Single Process/Multi-Threaded system On Tue, Feb 7, 2012 at 2:42 PM, Marc L. Allen <mlal...@outsitenetworks.com>wrote: > I'm trying to u

Re: [sqlite] File locking requirements in Single Process/Multi-Threaded system

2012-02-07 Thread Richard Hipp
On Tue, Feb 7, 2012 at 2:42 PM, Marc L. Allen wrote: > I'm trying to use sqlite in an embedded, multi-tasking system with a very > simple file system. Essentially, it doesn't support having a file open > multiple times. That is, only one reader or writer. > > I

[sqlite] File locking requirements in Single Process/Multi-Threaded system

2012-02-07 Thread Marc L. Allen
I'm trying to use sqlite in an embedded, multi-tasking system with a very simple file system. Essentially, it doesn't support having a file open multiple times. That is, only one reader or writer. I have studied the code, but I can't quite tell how sqlite manages the DB files in a single

Re: [sqlite] File Locking And Concurrency In SQLite Version 3

2010-11-12 Thread Prakash Reddy Bande
Database Subject: Re: [sqlite] File Locking And Concurrency In SQLite Version 3 On 12 Nov 2010, at 5:58pm, Prakash Reddy Bande wrote: > My question: Is it possible to verify if the network drive on which the DB is > place can be used? Great question. Unfortunately LockFile() generall

Re: [sqlite] File Locking And Concurrency In SQLite Version 3

2010-11-12 Thread Simon Slavin
On 12 Nov 2010, at 5:58pm, Prakash Reddy Bande wrote: > My question: Is it possible to verify if the network drive on which the DB is > place can be used? Great question. Unfortunately LockFile() generally does /not/ work. If you want to perform a check there are too many combinations of

[sqlite] File Locking And Concurrency In SQLite Version 3

2010-11-12 Thread Prakash Reddy Bande
Hello, I want to use sqlite as a db on a shared network drive (windows) (user would map the network drive to say T:). I read the documentation section "File Locking And Concurrency In SQLite Version 3" (http://www.sqlite.org/lockingv3.html) Where following is clearly mentioned: "SQLite uses

Re: [sqlite] File Locking in WinCE

2010-10-19 Thread Afriza N. Arief
On Thu, Oct 14, 2010 at 2:41 PM, Afriza N. Arief wrote: > ... sometimes my WinCE application has a problem where the changes made in > one instance a of sqlite3 database not reflected in the other instance b of > the same database file even though they exist in the same

[sqlite] File Locking in WinCE

2010-10-14 Thread Afriza N. Arief
Hi, When I browse SQLite amalgamation file sqlite3.c , I found the following comment: /* ** WinCE lacks native support for file locking so we have to fake it ** with some code of our own. */ #if SQLITE_OS_WINCE typedef struct winceLock { int nReaders; /* Number of reader locks

Re: [sqlite] File locking with BEGIN/END

2010-05-25 Thread Nick Shaw
> You need to add your records in smaller batches and sleep just a little between iterations. > > Your batches will have to be small enough to make the user response time reasonable. > > You'll find that your loop of inserting records won't take long. It's when you do the "COMMIT" that it

Re: [sqlite] File locking with BEGIN/END

2010-05-25 Thread Nick Shaw
> Is it possible you have a busy-handler installed? Are you using SQLite directly or via some wrapper API? Yes and no. I set a busy handler of 1 minute, but it takes longer than this and doesn't timeout, plus I tried without the busy timeout; made no difference. Thanks, Nick.

Re: [sqlite] File locking with BEGIN/END

2010-05-25 Thread Dan Kennedy
On May 25, 2010, at 10:24 PM, Nick Shaw wrote: > Hi all, > > > > I've got a database that is accessed by two processes on the same PC. > When I add a large number of records to a table from one process (all > records wrapped in a BEGIN DEFERRED / END so it's committed to disk > all > at once;

Re: [sqlite] File locking with BEGIN/END

2010-05-25 Thread Pavel Ivanov
> According to http://www.sqlite.org/lang_transaction.html, in deferred > mode, sqlite creates a RESERVED lock on the DB when it starts a write > operation, but this should allow other SHARE locks at the same time, > implying other processes should still be able to query the database > during the

Re: [sqlite] File locking with BEGIN/END

2010-05-25 Thread Black, Michael (IS)
From: sqlite-users-boun...@sqlite.org on behalf of Nick Shaw Sent: Tue 5/25/2010 10:24 AM To: sqlite-users@sqlite.org Subject: [sqlite] File locking with BEGIN/END Hi all, I've got a database that is accessed by two processes on the same PC. When I add a large number of records to a tabl

[sqlite] File locking with BEGIN/END

2010-05-25 Thread Nick Shaw
Hi all, I've got a database that is accessed by two processes on the same PC. When I add a large number of records to a table from one process (all records wrapped in a BEGIN DEFERRED / END so it's committed to disk all at once; and we're talking about adding 500,000 recs to a DB containing

Re: [sqlite] File locking to harsh?

2010-02-19 Thread Ian Jackson
Dan Kennedy writes ("Re: [sqlite] File locking to harsh?"): > According to the linux man page, both EAGAIN and EACCES mean the lock > could not be obtained due to locks held by other processes. It may mean > other things too, but it's not clear from the man page ho

Re: [sqlite] File locking to harsh?

2010-02-19 Thread Dan Kennedy
On Feb 18, 2010, at 11:44 PM, Ian Jackson wrote: > Marian Aldenhoevel writes ("[sqlite] File locking to harsh?"): >> ~ # sqlite3 /test "create table A (B integer);" >> Error: database is locked >> >> An strace of that command is attached. The

Re: [sqlite] File locking to harsh?

2010-02-18 Thread Ian Jackson
Marian Aldenhoevel writes ("[sqlite] File locking to harsh?"): > ~ # sqlite3 /test "create table A (B integer);" > Error: database is locked > > An strace of that command is attached. The problem surfaces here, I think: > > open("/test", O_RDWR|

Re: [sqlite] File locking to harsh?

2010-02-16 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marian Aldenhoevel wrote: > fcntl64(3, F_SETLK64, {type=F_RDLCK, whence=SEEK_SET, start=1073741824, > len=1}, 0xbfae5690) = -1 EACCES (Permission denied) > > I have verified that this is not a mundane issue of access privileges. I > can open /test in

[sqlite] File locking to harsh?

2010-02-16 Thread Marian Aldenhoevel
Hi, I am trying to use sqlite (3.6.22) on a linux-system that I have built from scratch. That system currently uses kernel 2.6.32.8 and is ucLibc-based. The problem I am facing is that sqlite3 cannot lock database files. Any statement that needs a lock tells me the database is locked

[sqlite] file locking on Mac OS X

2006-04-03 Thread Will Leshner
Mac OS X 10.4.6 was just released today with this interesting fix: "file access and byte range locking with AFP file sharing". There is some chance this meansn that SQLite locking will now work on shared volumes on OS X.

Re: [sqlite] File locking additions

2006-03-19 Thread drh
"mohsen ahmadian" <[EMAIL PROTECTED]> wrote: > hello All > the sqlite cant lock db for security data base if i have a DB and must be > close from Other program and cant Open this DB ,this DBMS not protect DB by > User name and password > i think a sqlite must be have > Mohsen Ahmadian

Re: [sqlite] File locking additions

2006-03-19 Thread John Stanton
You have discovered sqLITE. For the features you need, go to an sqlHEAVY such as Oracle, DB2 or PostgreSQL. mohsen ahmadian wrote: hello All the sqlite cant lock db for security data base if i have a DB and must be close from Other program and cant Open this DB ,this DBMS not protect DB by

Re: [sqlite] File locking additions

2006-03-19 Thread mohsen ahmadian
hello All the sqlite cant lock db for security data base if i have a DB and must be close from Other program and cant Open this DB ,this DBMS not protect DB by User name and password i think a sqlite must be have Mohsen Ahmadian

RE: [sqlite] File locking additions

2006-03-16 Thread CARTER-HITCHIN, David, FM
Hi, > I definitely like all the things you've proposed. We currently use > SQLite over NFS (to a NetApp) and while it mostly works, we do > occasionally get locking issues that I'd love to be able to > get rid of. Do you run Solaris or Linux? Cheers, David Carter-Hitchin. -- Royal Bank of

Re: [sqlite] File locking additions

2006-03-16 Thread Matt Sergeant
On 7-Mar-06, at 7:06 PM, Adam Swift wrote: In order to provide locking support for database files mounted from remote file systems (NFS, SMB, AFP, etc) as well as provide compatible locking support between database clients both local and remote, I would like to propose some additions to

Re: [sqlite] File locking additions

2006-03-11 Thread Helmut Tschemernjak
[EMAIL PROTECTED] wrote: Helmut Tschemernjak <[EMAIL PROTECTED]> wrote: The current lock offset will not allow to copy open DB files if the database gets larger than 0x4000 bytes. This is because locked regions cannot be copied under Windows, we changed it to: #define PENDING_BYTE

Re: [sqlite] File locking additions

2006-03-10 Thread drh
Christian Smith <[EMAIL PROTECTED]> wrote: > > > >3. Extend the sqlite3_open commands to support URI style path > >references in order to specify the file system locking type (as > >opposed to modifying the arguments list). After a little poking > >around on RFC 3986

Re: [sqlite] File locking additions

2006-03-10 Thread drh
Helmut Tschemernjak <[EMAIL PROTECTED]> wrote: > The current lock offset will not allow to copy open DB files if the > database gets larger than 0x4000 bytes. This is because locked > regions cannot be copied under Windows, we changed it to: > > #define PENDING_BYTE

Re: [sqlite] File locking additions

2006-03-09 Thread Adam Swift
On Mar 8, 2006, at 8:01 AM, Helmut Tschemernjak wrote: Hello Adam, all, Cross platform locking is defiantly very important. The goal should be to use the identical sqlite DB via UNIX, AFP, SMB, NFS and others. My opinion is that it is not needed to have any additional open parameters,

Re: [sqlite] File locking additions

2006-03-09 Thread Adam Swift
On Mar 8, 2006, at 12:27 AM, Manfred Bergmann wrote: Hi. You guys already distribute a SQLite version with locking support for remote databases with Mac OSX. What would be the difference to that mechanism? This would allow for manual configuration of the locking type to be used.

[sqlite] Re: semicolon in string (was Re: [sqlite] File locking additions)

2006-03-09 Thread Nathaniel Smith
On Thu, Mar 09, 2006 at 10:00:50AM +0200, Roger wrote: > Hello guys. > > I have a small problem.I am trying to write some sql queries. Whenever i > put a semicolon, sqlite returns an error immediately.for instance if i > select as follows > > Select Name||" "||Surname||" ; "||Address as "Details

RE: [sqlite] File locking additions

2006-03-09 Thread Chethana, Rao \(IE10\)
: Re: [sqlite] File locking additions Hello guys. I have a small problem.I am trying to write some sql queries. Whenever i put a semicolon, sqlite returns an error immediately.for instance if i select as follows Select Name||" "||Surname||" ; "||Address as "Details >From Person where PersID=1098

Re: [sqlite] File locking additions

2006-03-09 Thread Roger
Hello guys. I have a small problem.I am trying to write some sql queries. Whenever i put a semicolon, sqlite returns an error immediately.for instance if i select as follows Select Name||" "||Surname||" ; "||Address as "Details >From Person where PersID=1098

RE: [sqlite] File locking additions

2006-03-08 Thread Marian Olteanu
. Especially if this would involve custom sync mechanisms designed for each file system. -Original Message- From: Jay Sprenkle [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 08, 2006 8:18 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] File locking additions On 3/7/06, Marian Olteanu

Re: [sqlite] File locking additions

2006-03-08 Thread John Stanton
a server for sqlite is not a very complicated task. It can take as few as a couple hours. -Original Message- From: Adam Swift [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 07, 2006 6:07 PM To: sqlite-users@sqlite.org Subject: [sqlite] File locking additions All, In order to provide

Re: [sqlite] File locking additions

2006-03-08 Thread Christian Smith
On Tue, 7 Mar 2006, Adam Swift wrote: >All, > >In order to provide locking support for database files mounted from >remote file systems (NFS, SMB, AFP, etc) as well as provide >compatible locking support between database clients both local and >remote, I would like to propose some additions to

Re: [sqlite] File locking additions

2006-03-08 Thread Helmut Tschemernjak
Hello Adam, all, Cross platform locking is defiantly very important. The goal should be to use the identical sqlite DB via UNIX, AFP, SMB, NFS and others. My opinion is that it is not needed to have any additional open parameters, just use the locking features which are in common between all

Re: [sqlite] File locking additions

2006-03-08 Thread Jay Sprenkle
On 3/7/06, Marian Olteanu <[EMAIL PROTECTED]> wrote: > I would say that the best way to access a sqlite database mounted from a > remote file server, concurrently with other processes is through a database > server. My opinion is that the overhead of file sync and file locking for a > remote file

Re: [sqlite] File locking additions

2006-03-08 Thread Manfred Bergmann
Hi. You guys already distribute a SQLite version with locking support for remote databases with Mac OSX. What would be the difference to that mechanism? To have this in the original SQLite would be great. Best regards, Manfred Am 08.03.2006 um 11:06 schrieb Adam Swift: All, In order to

Re: [sqlite] File locking additions

2006-03-07 Thread Ritesh Kapoor
In case the designer knows that the DB file will be accessed by a single program-thread throught the run - then there should be some sort of flag indicating that SQLITE should execute minimum locking-related code. We were facing problems with flock over NFS mounted file systems. Since we din't

RE: [sqlite] File locking additions

2006-03-07 Thread Marian Olteanu
, March 07, 2006 6:07 PM To: sqlite-users@sqlite.org Subject: [sqlite] File locking additions All, In order to provide locking support for database files mounted from remote file systems (NFS, SMB, AFP, etc) as well as provide compatible locking support between database clients both local

[sqlite] File locking additions

2006-03-07 Thread Adam Swift
All, In order to provide locking support for database files mounted from remote file systems (NFS, SMB, AFP, etc) as well as provide compatible locking support between database clients both local and remote, I would like to propose some additions to the existing database file locking