If you're using an external drive or NAS to store your catalogs or sessions, you may run into the error message "Database connection failed." This typically happens when the database or its temporary files are interrupted during use, which can lead to corruption.
This article explains what causes this error, how to verify if your database or session is affected, and what steps to take to recover.
Contents
- Compatibility
- Why this error happens
- How to check if the database is corrupted
- What to do if the .journal file is the issue
- What to do if the database is corrupted
- Troubleshooting
Compatibility
This article applies to users storing catalog databases or session files on external drives or network-attached storage (NAS), and who encounter the error "Database connection failed."
Why this error happens
SQLite uses a temporary file named .journal whenever it writes data to a catalog or session database. If your external or NAS drive has a weak connection, or if you quit Capture One unexpectedly, this .journal file may get stuck or corrupted. That can prevent both the catalog and session files from loading properly, resulting in a database connection error.
How to check if the database is corrupted
You can check your .cocatalogdb or .cosessiondb file using the following SQLite command in the Terminal:
sqlite3 "file:nameOfCatalog.cocatalogdb?mode=ro" "PRAGMA integrity_check;"
Here's how to run a command in the Terminal on Mac.
Before you run it, make sure to replace the nameOfCatalog.cocatalogdb with the entire path to the document, e.g. /Users/<you>/Pictures/MyCatalog.cocatalog/Catalog.cocatalogdb
If the result is ok, the issue is likely with the .journal file — not the database or session file itself.
Note: For Windows, you may need to install SQLite3 from here.
The path would look something like this:
C:\Users\<you>\Pictures\MyCatalog.cocatalog\Catalog.cocatalogdb
What to do if the .journal file is the issue
If a .journal file exists next to your .cocatalogdb or .cosessiondb file and the integrity check passes:
- Quit the app completely.
- Locate the .journal file (it has the same name as the database or session file, with .journal at the end).
- Delete the .journal file or rename the main file to disconnect it from the .journal.
- Restart the app.
Note: This may result in the loss of your most recent changes, including unsaved edits or session progress.
What to do if the database is corrupted
If the integrity check does not return ok, the catalog or session file itself is corrupted. Unfortunately, the app can't recover from this. If you have backups, restore from one of those following this guide: How can I recover a corrupt Catalog? or this one: How can I replace a corrupted/broken Session?
Preventing database issues
- Avoid working directly from NAS or unstable external drives. See a more detailed guide here: Sessions vs Catalogs in Capture One: how they work and where to store them
- Create sessions or catalogs on an internal drive and store the images externally.
- Always close the app properly before disconnecting drives.
- Safely disconnect external drives.
- Backup your catalog and sessions regularly. This guide explains how backups work in Capture One.