Gnucash thinks data file is read-only, how to open it for writing?
Fred Bone
Fred.Bone at dial.pipex.com
Thu Jul 18 13:18:28 EDT 2013
On 18 July 2013 at 11:13, Ben Finney said:
> John Ralls <jralls at ceridwen.us> writes:
>
> > You can use the sqlite3 command-line tool to remove the lock:
> > sqlite> DELETE FROM gnclock;
> > sqlite> ^D
>
> That table has no entries:
>
> $ sqlite3 foo.gnucash
> […]
> sqlite> SELECT COUNT(PID) FROM gnclock;
> 0
>
> I've run the command you suggest, above, and the behaviour doesn't
> change. Gnucash still treats the file as read-only.
>
>
> Shutting down the program (e.g. by turning off the machine) while the lock
> is still held is surely not uncommon. This manual intervention is not an
> optimal way for handling this for the user.
>
> Can I request someone who has an account in the bug tracking system to
> please submit this as requests for improvement:
>
> * Mention the file-locking behaviour in the FAQ, so it can be found when
> this problem occurs.
>
> * Improve the file opening process to break a stale lock (maybe with a
> prompt to the user), so this manual SQL-level intervention is not
> required.
>
> Thanks for your help and (in advance) with getting this improvement
> requested.
>
>
> But apart from that, the lock still seems to be held on this file
> despite the suggested work-around. Any more information I can dig out of
> it to diagnose and fix?
Dunno about diagnosis, but surely one way to fix it is to save the file
in xml format, then open that. You could then re-save as a new sqlite
file if you want to continue using sqlite.
More information about the gnucash-user
mailing list