Re: Corrupted Database, update

K9MA
 

Larry,

I do have many backups of that database, so only the last contest was affected.

To review, while trying to back up the database to a thumb drive during the contest, I did it backwards, copying the previous backup file into the database folder while the logger was running. I got an error message, but apparently that corrupted the database. However, the logger seemed to be working normally for the rest of the contest. When I tried to quit the logger (foolishly before exporting any files), it crashed and froze. I had to kill it with the task manager. A crash occurred every time I tried to open that log, even on another computer. I found that I could open other logs in the database successfully.  In retrospect, I should have exported an adif and the cabrillo file before quitting the program.

For others who might someday pull off a similarly boneheaded maneuver, here's what I did:

1. Renamed the corrupted database, so the program wouldn't try to start up with the corrupted log and crash.

2. Restored the contest log to a new database from the transaction log.

3. Exported that log to an adif file.

4. Deleted the affected log in the corrupted database.

5. Import the adif file to the (formerly) corrupted database.

The only hitch is that when I imported from the adif file into a new log with the same start date and time, the program insisted that there were already 1,631 contacts in it, though none showed up in the log window. After "allowing" dupes from the adif file, everything seemed to return to normal. The transaction log saved my bacon. I didn't have that backed up, but at least I didn't corrupt it, too.

Sorry for the bother, but thanks for the help.

73,
Scott K9MA


On 2/17/2020 13:44, Larry K8UT wrote:
Scott,

The SQLite Expert Pro "Repair" routine did not fix this, and it took a little more effort than usual. Your repaired database has been shipped back to you in a direct email.

As you suspected, the DXLog table (the table in the database holding the contacts) was corrupted by whatever-it-was that you did to the live file. I was able to restore all of your other logs and 1471 Qs from the ARRL CW contest. (not sure how many beyond 1471 were lost)

Your database contains 56289 contacts from the past two years. If you had completely trashed the database, you might have been very sad. I hope that you are using an appropriate backup program on your computer.

-larry (K8UT)

------ Original Message ------
From: "K9MA" <K9ma@...>
Sent: 2020-02-17 10:53:14
Subject: Re: [N1MM+] Corrupted Database, update

On 2/17/2020 05:26, Larry K8UT wrote:
Scott,

You used the right method for recovering a contest log: create a new database; >FIle >New Log the same contest type; and restore that contest into that new database from the transaction .TRN files. Well done.

RE: Your old database with one broken log - The Dev Team uses a tool called SQLite Expert Pro to repair databases. There is a free version... but it does not include the Repair feature. If you'd like, I'll attempt the repair on your broken file - send me any files in your /databases folder with that  filename and the suffixes .S3DB, .,S3DB-WAL, or .S3DB-SHM. (the s3db file will be there. the wal and shm temporary files may not exist... don't worry if they are missing)

-larry (K8UT)

------ Original Message ------
From: "K9MA" <K9ma@...>
Sent: 2020-02-17 03:40:19
Subject: Re: [N1MM+] Corrupted Database, update

Further update:

Apparently, only the log for the last contest was corrupted in the database. I was able to recover it from the transaction file to a new database. The old database is OK unless I try to open up that log. It was about time to start a new database, anyway. I'm not sure whether I can delete that log, but it doesn't really matter.

73,
Scott K9MA




On 2/17/2020 01:05, K9MA wrote:

I've just discovered that the database seems to be OK, UNLESS I try to open the contest which was open when it got corrupted. So the question reduces to how can I recover that one contest?

73,

Scott K9MA

-- 
Scott  K9MA

k9ma@...




-- 
Scott  K9MA

k9ma@...

Join N1MMLoggerPlus@groups.io to automatically receive all group messages.