"Database seems not valid"

V2 error reports
Post Reply
User avatar
EI4HQ
Advanced Class
Posts: 38
Joined: 02 Nov 2013, 19:39
Location: Cobh IO51uu
Contact:

"Database seems not valid"

Post by EI4HQ »

Hi,

Long timer Log4OM user. Just began using Log4OM2 the other day. Shut it down for the first time this morning (to facilitate a Windows 10 update) and when I restarted it, up pops the Configuration Window at the Database settings. The database (SQLite) I'd set up is greyed out and when I attempt to open it, I get a "Database seems not valid" error. Also, there is no backup of the database despite the fact that I set up backups... Fortunately I've only two new QSOs in the new database (I'd imported my Log4OM v1 database with circa 15k contacts in it). The log file size is 20.4mB which seems very large (the Log4OM one is less than 10mB)

Any advice? I can set up the database again but I'd like to understand what's gone on here. Given the importance of database integrity, this is obviously worrying...

Many thanks.
BR
Cormac, EI4HQ
[Cobh IO51uu / UTC] NNNN++++
User avatar
G4POP
Log4OM Alpha Team
Posts: 10803
Joined: 21 Jan 2013, 14:55
Location: Burnham on Crouch, Essex UK

Re: "Database seems not valid"

Post by G4POP »

Where is the database saved to?

There will be a backup look in C:\Users\USER NAME\AppData\Roaming\Log4OM2\backup at very lease there will be a 'Historic' folder containing the monthly backup ADIF
73 Terry G4POP
User avatar
EI4HQ
Advanced Class
Posts: 38
Joined: 02 Nov 2013, 19:39
Location: Cobh IO51uu
Contact:

Re: "Database seems not valid"

Post by EI4HQ »

Morning Terry,

Log file is saved to C:\Users\USER NAME\Documents\Radio\EI4HQ\LOGS.

Backup is set to C:\Users\USER NAME\Documents\OneDrive\Log4OM2-Backups. There is no backup there. I've been backing up my Log4OM databases to C:\Users\USER NAME\Documents\OneDrive\Log4OM-Backups for along time without any issues.

There is no backup either in C:\Users\USER NAME\AppData\Roaming\Log4OM2\backup. There is no historic folder at that location. I only began using Log4OM2 in the last 48 hours.

Here's what the log file contains from when I restarted Log4OM2 just a while ago (after the Windows 10 update & reboot):

2020-03-17 08:16:01.7550 ERROR: [DbSqlite][Connect] : [EXCEPTION] attempt to write a readonly database
attempt to write a readonly database code = ReadOnly (8), message = System.Data.SQLite.SQLiteException (0x800017FF): attempt to write a readonly database
attempt to write a readonly database
at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)
at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
at System.Data.SQLite.SQLiteTransaction.Begin(Boolean deferredLock)
at System.Data.SQLite.SQLiteTransactionBase..ctor(SQLiteConnection connection, Boolean deferredLock)
at System.Data.SQLite.SQLiteTransaction..ctor(SQLiteConnection connection, Boolean deferredLock)
at System.Data.SQLite.SQLiteConnection.BeginDbTransaction(IsolationLevel isolationLevel)
at System.Data.SQLite.SQLiteConnection.BeginTransaction()
at L4ONG.DAL.SQLITE.DbSqlite.Connect(Boolean #=zRQgeaa8=)
2020-03-17 08:16:01.9213 WARN: [DatabaseManagement][#=zf$hy8fzP1gTN] : Connection not valid
2020-03-17 08:16:01.9378 ERROR: [DatabaseManagement][Connect] : [EXCEPTION] Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object.


I've checked and permissions for the log file at C:\Users\USER NAME\Documents\Radio\EI4HQ\LOGS look OK to me.
BR
Cormac, EI4HQ
[Cobh IO51uu / UTC] NNNN++++
User avatar
G4POP
Log4OM Alpha Team
Posts: 10803
Joined: 21 Jan 2013, 14:55
Location: Burnham on Crouch, Essex UK

Re: "Database seems not valid"

Post by G4POP »

Try installing Log4OM to run as an administrator, seems that the Windows update has changed folder/file permissions I have heard of this before.
73 Terry G4POP
User avatar
EI4HQ
Advanced Class
Posts: 38
Joined: 02 Nov 2013, 19:39
Location: Cobh IO51uu
Contact:

Re: "Database seems not valid"

Post by EI4HQ »

Hi Terry,

Got it in one; Windows 10 updates mucking with permissions. Running Log4OM2 as admin sorts it.

I've also manually run backups just now and all is well.

Many thanks!
BR
Cormac, EI4HQ
[Cobh IO51uu / UTC] NNNN++++
User avatar
G4POP
Log4OM Alpha Team
Posts: 10803
Joined: 21 Jan 2013, 14:55
Location: Burnham on Crouch, Essex UK

Re: "Database seems not valid"

Post by G4POP »

Another happy satisfied customer :D :D :D :D
73 Terry G4POP
Post Reply