sqlite3数据库修复SQLite-database disk image is malformed


title: sqlite3数据库修复SQLite-database disk image is malformed
date: 2019/10/9 19:52:14
toc: true

sqlite3数据库修复SQLite-database disk image is malformed

  1. 拖动db文件到exe

  2. 导出数据

    .output tmp.sql
    .dump
    .quit
    
  3. 使用notepad查看生成的sql,到最后一行,如果有以下内容则替换

    ROLLBACK 
    ↓---替换为--↓  
    COMMIT
    
  4. 新建一个db,拖到exe中转换新的db

    .read tmp.sql
    .quit
    
  5. 或者尝试以下命令

    .open my.db
    .output my.sql
    .dump
    .open my2.db
    .read my.sql
    
原文地址:https://www.cnblogs.com/zongzi10010/p/11644027.html