Re: [sqlite] Unlocking locked database and preventing locking to start with

2013-02-08 Thread Stephen Chrzanowski
"Smells" like database corruption, but I can't say for certain as there could be a couple things holding back. - If a rogue thread that isn't killed has its finger on it, it could prevent further access, but that'd depend on whether you're doing a full file lock with that thread. - As mentioned,

Re: [sqlite] Unlocking locked database and preventing locking to start with

2013-02-08 Thread Simon Slavin
On 8 Feb 2013, at 8:57am, Paul Sanderson wrote: > Is there a faster method for clearing a lock? SQLite does not use a persistent locking mechanism. It doesn't write something to the file saying "this file is locked" and refuse to open a file with that status.

[sqlite] Unlocking locked database and preventing locking to start with

2013-02-08 Thread Paul Sanderson
I have a user who has a locked database. I don't know why the db is locked but suspect either he killed the program when it was adding an index or my program crashed (he was using a beta version). Irrespective of wghich he has a db that is locked and I'd like to unlock it. My database would

Re: [sqlite] Unlocking the database

2011-05-29 Thread Christoph P.U. Kukulies
Am 28.05.2011 18:39, schrieb john darnell: > I was/am using Windows XP SP3. Sorry, but the company is extremely > conservative in upgrade policies. > > Hmmm > You may want to use PROCMON (formerly FILEMON from sysinternals.com) ( http://technet.microsoft.com/en-us/sysinternals/bb896645) to

Re: [sqlite] Unlocking the database

2011-05-28 Thread Jean-Christophe Deschamps
>I understand the need for integrity when locking a database, but in >this case I knew that the problem was caused by a (in all honesty, my) >bug. I tried rebooting the machine and it did not unlock the table. Yeah, sometimes Windows will keep a lock on a file beyond reboot, which is

Re: [sqlite] Unlocking the database

2011-05-28 Thread john darnell
/28/11, Simon Slavin <slav...@bigfraud.org> wrote: > > > From: Simon Slavin <slav...@bigfraud.org> > > Subject: Re: [sqlite] Unlocking the database > > To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> > > Date: Saturday, May 28

Re: [sqlite] Unlocking the database

2011-05-28 Thread Roger Andersson
On 05/28/11 07:00 PM, Simon Slavin wrote: > SQLite locking is a function of your OS. It's not static things > something like "Byte 4 of the file is set to 'L'", it's transient > things handled with file handles or low level FS stuff. > So reboot. Or possibly find everything that might have

Re: [sqlite] Unlocking the database

2011-05-28 Thread Danny
vin <slav...@bigfraud.org> > Subject: Re: [sqlite] Unlocking the database > To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> > Date: Saturday, May 28, 2011, 1:02 PM > > On 28 May 2011, at 5:39pm, john darnell wrote: > > > After t

Re: [sqlite] Unlocking the database

2011-05-28 Thread Simon Slavin
On 28 May 2011, at 5:39pm, john darnell wrote: > After the reboot, I tried opening the database in my program as well as > SQLite Manager (the Firefox plugin). Neither worked, I got the SQLITE_BUSY > return code from the SQLite call (I believe it was sqlite3_prepare_v2), and a > long and

Re: [sqlite] Unlocking the database

2011-05-28 Thread Simon Slavin
On 28 May 2011, at 5:02pm, john darnell wrote: > This time I have (I hope) a much simpler question. While debugging my code, > I managed to lock the database for all time. The only way I was able to > unlock the database was by retrieving a copy of the database I had tucked > away for just

Re: [sqlite] Unlocking the database

2011-05-28 Thread john darnell
011 11:29 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Unlocking the database > > On Sat, May 28, 2011 at 12:25 PM, john darnell > <john.darn...@walsworth.com>wrote: > > > I tried rebooting the machine and it did not unlock the table. > > &

Re: [sqlite] Unlocking the database

2011-05-28 Thread Richard Hipp
On Sat, May 28, 2011 at 12:25 PM, john darnell wrote: > I tried rebooting the machine and it did not unlock the table. > That sounds unlikely. What OS are you using? Are you using a non-standard VFS such as "unix-dotfile"? Or are you using a network filesystem of

Re: [sqlite] Unlocking the database

2011-05-28 Thread john darnell
ginal Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] > On Behalf Of Roger Binns > Sent: Saturday, May 28, 2011 11:21 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Unlocking the database > > -BEGIN PGP SIGNED MESSAGE-

Re: [sqlite] Unlocking the database

2011-05-28 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/28/2011 09:02 AM, john darnell wrote: > Is there a function, method or process whereby I can unlock the database when > it gets locked? It is locked by another connection or process and you can't ask them to give up locks using the SQLite API.

[sqlite] Unlocking the database

2011-05-28 Thread john darnell
Hello folks. This time I have (I hope) a much simpler question. While debugging my code, I managed to lock the database for all time. The only way I was able to unlock the database was by retrieving a copy of the database I had tucked away for just such contingencies. I looked in Jay