Can't open Database anymore

Started by TiRohn, January 17, 2022, 07:49:35 AM

Previous topic - Next topic

TiRohn

Hi there

I wanted to start iMatch the first time this year, and I constantly get an error message, that my Database is already in use and cannot be opened.
(see my first attached image)

Also, after a while I get an error, that my database has errors (second attachment). I tried to correct, doesn't work. I also tried to restore my last backup, still the same...

Can someone please help?

Thanks
TiRohn

Mario

You did not attach the IMatch log file (see log file) but judging by the panic message sent by the database system, the database file on disk has been destroyed.

Did you encounter a power failure? Hard Windows reboot?
Is the database on an external USB drive or on a NAS box?
Power failures or hardware defects are the about only known problems that may cause a database file to become damaged.
Such damage is really, really rare. But when it happened, there is not much the database system can do. Data corrupted or lost cannot be recovered.
Many of my databases I use daily were initially created with IMatch 3, more than 10 years ago.

Restore your last daily database backup and start from there.
Check the Windows Event Log for hardware-related error messages or warnings.
Let Windows check the disk for problems.

If the database is on an external USB disk, check the cable.
If the database is on a NAS, check the network.
Even a very short cable or network issue at just the right time (when Windows was writing data to the database file) can damage it.
Often such damage stays unnoticed until you ran a database diagnosis or the database system needs to access the damaged section in the database file.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

TiRohn

Hi Mario

Thank you for the answer. What I don't understand is, that I restored to the last working DB with your Pack & Go Tool, and still get the same message... And actually I did have a power outage, so this might be the cause for the current file, but not the backup imho?

My DB is on the second internal HDD, so basically more or less local in my understanding. I attached the log file now, sorry for having forgotten this the first time.

KR
Martin

TiRohn

So, just to be on the safe side, I restored an old DB Files from my data backup from last year when I'm 100% sure it worked, I also switched the WebService Port and I still get the same message at the beginning, but now, it doesn't complain about hte DB curruption anymore...

Next step, I'll try to repair the application installation...

TiRohn


Mario

IMatch reports:

"disk I/O error"
"I/O error while reading or writing data"
"Could not enable WAL Journaling mode"

The last one is very strange. I'm not sure I have this one seen ever in the wild.

Also, most important:

Database 'D:\Pictures\iMatch Datenbank\IMatch Datenbank ... Photography.imd5' for thread 7B48 (31560) shared cache 0  Database file read-only/on read-only media. Read-only requested.

1. Start IMatch without opening a database (see Advanced Startup Options (Recovery))
2. Go to the Database menu and make sure the option Open Databases read-only is not enabled.
3. Make sure your user account has read/write/modify privileges to the folder containing the database and all files within.
If you have copied the database from another system, the privileges may be wrong.
If you don't know how to check file system permissions, use the Windows help.

The problem is that the database system must modify the database, but cannot, because your user account has no write privileges to the folder.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

TiRohn

Quote from: Mario on January 17, 2022, 01:58:44 PM
IMatch reports:

"disk I/O error"
"I/O error while reading or writing data"
"Could not enable WAL Journaling mode"

The last one is very strange. I'm not sure I have this one seen ever in the wild.

Also, most important:

Database 'D:\Pictures\iMatch Datenbank\IMatch Datenbank ... Photography.imd5' for thread 7B48 (31560) shared cache 0  Database file read-only/on read-only media. Read-only requested.

1. Start IMatch without opening a database (see Advanced Startup Options (Recovery))
2. Go to the Database menu and make sure the option Open Databases read-only is not enabled.
3. Make sure your user account has read/write/modify privileges to the folder containing the database and all files within.
If you have copied the database from another system, the privileges may be wrong.
If you don't know how to check file system permissions, use the Windows help.

The problem is that the database system must modify the database, but cannot, because your user account has no write privileges to the folder.

This is very strange for me as well, I am a happy user since about 3 years...

Now, I double checked all the settings you mentioned above_

  • Option Open Databases read-only is disabled
  • My account has full rights on the folder as well as on the database file
  • I switched on the debug mode for the logfile and tried again, see attached file

I really hope this gives a bit more insight...

KR
Martin

Mario

The log seems to be clear:

Cannot open databaase D:\Pictures\iMatch Datenbank\IMatch ... Photography.imd5.
Database is on a read-only media or the current user has no write privileges to the folder containing the database file.


So, either your file system privileges are wrong (most likely), the database file has the read-only attribute set or something (virus checker) is actively preventing IMatch from opening the database file in writable mode.

Try to create a new folder and copy the database in that folder. Then use the Database menu > Open... command to open the database from the new folder.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

TiRohn

Quote from: Mario on January 17, 2022, 04:00:54 PM
The log seems to be clear:

Cannot open databaase D:\Pictures\iMatch Datenbank\IMatch ... Photography.imd5.
Database is on a read-only media or the current user has no write privileges to the folder containing the database file.


So, either your file system privileges are wrong (most likely), the database file has the read-only attribute set or something (virus checker) is actively preventing IMatch from opening the database file in writable mode.

Try to create a new folder and copy the database in that folder. Then use the Database menu > Open... command to open the database from the new folder.

Got it! That was a beast! There's a setting in Windows 11 which denies access to the Picture folder, where I wasn't able to add iMatch as application, so this was the reason. I had to move the database file to another location on the same drive, and everything is fine now.

Thanks for your patience and your help!
Martin

Mario

"My Pictures" is really not meant to contain databases.

IMatch by default stores databases in the official folder designated by Windows (depends on version and language), usually "My Documents" or similar.
The documentation recommends using a dedicated sub folder for IMatch databases, see Database Configuration for details.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

TiRohn

Quote from: Mario on January 17, 2022, 06:16:52 PM
"My Pictures" is really not meant to contain databases.

IMatch by default stores databases in the official folder designated by Windows (depends on version and language), usually "My Documents" or similar.
The documentation recommends using a dedicated sub folder for IMatch databases, see Database Configuration for details.

Well, there's a setting in the application, where I can choose the location where the database and also the previewcache folder can be stored, and since diskspace on my start disk is rather limited, I place all my picture content in the "My Pictures" folder, where I feel it belongs to (which is on another disk with quite more disk space). This only happened to get stuck after a recent Windows update, so far this was not an issue (and should not be imho). But I'll keep that in mind for further usage...

Mario

The problem with these special folders is that they actually owned by Windows and Windows controls what goes there. Or, in an update, introduces some new features for your protection.

If you keep your database instead in, says, c:\data\IMatch Database, you are in control. And the disk space used is of course the same.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook