Error code 14 for the Journal file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Error code 14 for the Journal file

Tilak Vijayeta
Greetings,
In my application, we are  supposed to save a timestamp every 10 seconds. To achieve this, we read data from a table say GlobalStatistics and the update the same GlobalStatistics with a new set of data.
This operation happens after every 10 seconds apart from the other tasks that the application performs.
I encounter this error, especially when the application remains idle(not necessarily the cause or the reason)

PID:02FB0036 TID:06B60006 SQLite error (14): os_win.c:36317: (31) winOpen(\------\TTDB.db3-journal) - A device attached to the system is not functioning.
PID:02FB0036 TID:06B60006 SQLite error (778): os_win.c:34215: (5) winWrite2(\----\TTDB.db3-journal) - Access is denied.
PID:02FB0036 TID:06B60006 SQLite error (778): statement aborts at 17: [UPDATE GlobalStatistics SET Value = '00:24:10',ResetValues = '00:24:10' WHERE 1 = 1  AND Id = 5]
PID:02FB0036 TID:07FB038E CPU load: 100%   Change in heap memory: 523944 bytes
PID:02FB0036 TID:06B60006 SQLite error (2570): os_win.c:36492: (31) winDelete(\----\TTDB.db3-journal) - A device attached to the system is not functioning.
PID:02FB0036 TID:06330356 CPU load: 100%   Change in heap memory: -674056 bytes
PID:02FB0036 TID:07FB038E CPU load: 100%   Change in heap memory: 534344 bytes
PID:02FB0036 TID:06B60006 SQLite error (14): os_win.c:36317: (31) winOpen(\----\TTDB.db3-journal) - A device attached to the system is not functioning.
PID:02FB0036 TID:06330356 CPU load: 100%   Change in heap memory: -48928 bytes


As of now, this is the fix I have thought of

1.        A Journal file gets created as a backup on every transaction, as in Update or Insert. This file gets deleted after the transaction is committed.

2.       I assumed that the journal file goes 'Read Only' sometimes because of which Delete operation fails.

3.       To fix it, every time I come across a SQL Lite error 14, I change the read only property of the Journal file.

Even after the changes, we still come across the error.
I would appreciate any kind of help.

P.S: This is a single thread doing the Read and update operation.

Regards,
Vijayeta

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Error code 14 for the Journal file

Simon Slavin-3


On 4 Dec 2017, at 9:31am, Tilak Vijayeta <[hidden email]> wrote:

> PID:02FB0036 TID:06B60006 SQLite error (14): os_win.c:36317: (31) winOpen(\------\TTDB.db3-journal) - A device attached to the system is not functioning.

You appear to have a hardware or operating system problem which is causing a SQLite error.  SQLite error 14 is "Unable to open the database file".

Is there some sort of protection on the journal file, or on the directory it’s in, which is preventing your program from accessing it ?

> PID:02FB0036 TID:06B60006 SQLite error (778): os_win.c:34215: (5) winWrite2(\----\TTDB.db3-journal) - Access is denied.

"Access is denied" suggests there is some sort of protection or access problem.

> 1.        A Journal file gets created as a backup on every transaction, as in Update or Insert. This file gets deleted after the transaction is committed.

This is not normal for SQLite.  Can you tell us the result of

        PRAGMA journal_mode

for whatever database file you’re accessing ?

> 2.       I assumed that the journal file goes 'Read Only' sometimes because of which Delete operation fails.

That is not something SQLite does.

> 3.       To fix it, every time I come across a SQL Lite error 14, I change the read only property of the Journal file.

This does not fit the way SQLite works.  If you are in a situation where you have to do this, you have more serious problems which you will have to deal with later.  You have something which is preventing SQLite from working properly.  Are you running any anti-virus program ?  Can you disable it temporarily while you test your program to see if it’s the culprit ?

Simon.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Error code 14 for the Journal file

Chris Locke-3
The 'scary bit' here is the device not functioning.
> A device attached to the system is not functioning.

Is the database/journal on the same/local PC or on a network?


Chris

On Mon, Dec 4, 2017 at 4:27 PM, Simon Slavin <[hidden email]> wrote:

>
>
> On 4 Dec 2017, at 9:31am, Tilak Vijayeta <[hidden email]> wrote:
>
> > PID:02FB0036 TID:06B60006 SQLite error (14): os_win.c:36317: (31)
> winOpen(\------\TTDB.db3-journal) - A device attached to the system is
> not functioning.
>
> You appear to have a hardware or operating system problem which is causing
> a SQLite error.  SQLite error 14 is "Unable to open the database file".
>
> Is there some sort of protection on the journal file, or on the directory
> it’s in, which is preventing your program from accessing it ?
>
> > PID:02FB0036 TID:06B60006 SQLite error (778): os_win.c:34215: (5)
> winWrite2(\----\TTDB.db3-journal) - Access is denied.
>
> "Access is denied" suggests there is some sort of protection or access
> problem.
>
> > 1.        A Journal file gets created as a backup on every transaction,
> as in Update or Insert. This file gets deleted after the transaction is
> committed.
>
> This is not normal for SQLite.  Can you tell us the result of
>
>         PRAGMA journal_mode
>
> for whatever database file you’re accessing ?
>
> > 2.       I assumed that the journal file goes 'Read Only' sometimes
> because of which Delete operation fails.
>
> That is not something SQLite does.
>
> > 3.       To fix it, every time I come across a SQL Lite error 14, I
> change the read only property of the Journal file.
>
> This does not fit the way SQLite works.  If you are in a situation where
> you have to do this, you have more serious problems which you will have to
> deal with later.  You have something which is preventing SQLite from
> working properly.  Are you running any anti-virus program ?  Can you
> disable it temporarily while you test your program to see if it’s the
> culprit ?
>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users