- Home
- Why a copied database file won’t open
Why a Copied Database File Won’t Open, and How to Fix It
A copied database file that will not open is usually missing something the original relied on. This page, part of our guide to protecting a database file from being copied, covers the four common causes on Windows.
Check three things in order: the copy was taken while the database was closed, its journal or -wal file came with it, and its password or certificate is available. One of the three explains most failed copies. Fix the pair, then the key.
| Applies to | SQLite, Access and SQL Server files on Windows |
|---|---|
| Time needed | 15 to 30 minutes |
| Difficulty | Moderate |
| Cost | Free |
| Needs admin | Sometimes, for certificates |
| Last verified | November 2026 |
Four Causes of a Copied Database That Will Not Open
Four causes cover nearly every failed database copy: the file was copied while a write was active, its journal or -wal file was left behind, its encryption key is missing, or the target engine is an older version. Each one has a distinct symptom.
| Symptom | Likely cause | Fix |
|---|---|---|
| Error saying the file is not a database | Copy taken mid-write or wrong key | Restore a consistent backup; confirm the key |
| Missing recent changes | The -wal file stayed behind | Copy the database and its -wal file together |
| Prompt for a password or certificate | Source database is encrypted | Supply the key; restore the certificate first on SQL Server |
| File opens read-only or fails on older software | Newer file format | Open with the same or newer engine version |
The Pair-and-Key Rule for Copying a Database Safely
The Pair-and-Key Rule says a database copy is complete only when it carries its pair, meaning the file and any journal or -wal file, and its key, meaning the password or certificate. Miss either half and the copy can fail.
For SQLite, let the engine make the copy. Both commands below produce a consistent file even while other programs read the database.
sqlite3 source.db ".backup 'backup.db'"
sqlite3 source.db "VACUUM INTO 'backup.db';"An export made for a protected drive avoids the issue, since a product such as Copy Protect prepares fresh output each time. Our list of common mistakes on the main guide shows where else copies go wrong.
How to Recover Access to a Database File You Own
Owner recovery follows a fixed order: confirm you own the file, look for a stored key, restore from backup, and only then contact the vendor. We do not describe cracking passwords on files you do not hold, since that path serves only unauthorised access.
- Confirm ownership. Sign in as the account that created the file.
- Look for the key. Check a password manager, saved notes and the BitLocker or certificate export.
- Restore from a backup. Use your latest verified copy.
- Ask the vendor. Use the developer’s support contact page for tools of ours, or the engine vendor’s support for theirs.
Work on a duplicate of the damaged file. A failed repair attempt on the original can end the chance of recovery. Delete stray broken copies afterward with a secure deletion method.
Checklist Before You Copy a Database Next Time
Five checks before every copy prevent most of these failures. Run through them in order, and tick each box to track your progress on a copy that matters.
Failed Copy Questions, Answered
The copy is probably missing its journal or -wal file, was taken mid-write, or came from an encrypted database that needs its key. Check that the companion files sit beside the database, then confirm whether the source uses encryption.
You can, but the copy may be unusable. The SQLite documentation warns that a plain copy during an active write can be corrupt. Close the application or use the engine’s own backup command, which produces a consistent copy.
Search your password manager, saved notes and email for it first. Microsoft cannot recover an Access database password. If you hold an older unencrypted backup, restore from that and set a new password you store safely.
A backup from a Transparent Data Encryption database restores elsewhere only when the certificate and its private key are present on the target. Restore the certificate first, then run the restore.
Not always. Try the engine’s integrity check, then restore your last good backup. If only the journal was missing, putting the original journal back beside the file can let the engine finish its recovery. Never run repairs on your only copy.
Next Reads After a Failed Copy
The main guide covers the whole topic; these guides each own one question.
Prevent the Next Failed Copy
Return to the main guide for the protection methods, or try a bound output on exported media.