A tool for repairing sqlite database
Windows 7(Production Env)
Python 3.6(Development Env)
Directory Structure
├─RepairTool
│ dump.sql
│ read.sql
│ repairTool.exe
│ sqlite3.exe
Copy the corrupt sqlite database file to this directory.
Needed Files
├─RepairTool
│ dump.sql
│ read.sql
│ repairTool.exe
│ sqlite3.exe
│ CorruptDB
Open the command line in the current directory or use the cd
command to this directory.
Then
D:\Tools\RepairTool>repairTool.exe CorruptDB NewDB
Param1
: filename of the corrupt database file
Param2
: filename of the new database file you want to export to
Example
D:\Tools\RepairTool>repair.exe CorruptDB NewDB
INFO: Starting reparing, please wait for a while.
INFO: DumpSql is successful.
INFO: Modify last line is successful.
INFO: ReadSql is successful.
INFO: Delete TempFile is successful.
INFO: Reparing is successful!
Now the files should be like this:
├─RepairTool
│ dump.sql
│ read.sql
│ repairTool.exe
│ sqlite3.exe
│ CorruptDB
| NewDB
cd to the code directory
cd <your directory>/code
Copy the corrupt sqlite database file to this directory.
Needed Files
├─code
│ dump.sql
│ read.sql
│ repairTool.py
│ sqlite3.exe
│ CorruptDB
use this command
python repairTool.py CorruptDB NewDB