SQL/Database ErrorsFatal
SQLITE_CORRUPT (11)SQLITE_CORRUPT (11) — Database Disk Image Is Malformed
The database file is corrupted.
sqlite
What causes this error
Corrupted by a crash during write, hardware failure, non-SQLite editing, or copying during write.
How to fix it
Run PRAGMA integrity_check. Recover with .dump. Restore from backup. Use WAL mode to reduce corruption risk.
Example
-- Check integrity
PRAGMA integrity_check;
-- Recover: dump and recreate
sqlite3 corrupt.db .dump | sqlite3 new.dbRelated Error Codes
SQL/Database ErrorsError
5500055000 — Object Not in Prerequisite State
The database object is not in the required state.
postgresql
View details SQL/Database ErrorsError
25P0225P02 — In Failed SQL Transaction
A command was issued in a transaction that has already failed.
postgresql
View details SQL/Database ErrorsError
0800108001 — Client Unable to Establish Connection
The client could not establish a connection to the database server.
postgresql
View details SQL/Database ErrorsError
28P0128P01 — Invalid Password
The password provided for authentication is incorrect.
postgresql
View details SQL/Database ErrorsError
22P0222P02 — Invalid Text Representation
A value could not be converted to the required data type.
postgresql
View details SQL/Database ErrorsError
SQLITE_MISUSE (21)SQLITE_MISUSE (21) — Library Used Incorrectly
The SQLite API was used incorrectly.
sqlite
View details