7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

SVN「database disk image is malformed」エラーの対処法

Last updated at Posted at 2018-04-10

svn update したときに

svn: E200030: sqlite[S11]: database disk image is malformed
svn: E200042: Additional errors:
svn: E200030: sqlite[S11]: database disk image is malformed

というエラーが出たとき。
wc.dbというデータベースファイルが破損しているので、修復する。

$ cd .svn
$ file wc.db

wc.db: SQLite 3.x database, user version 31

user versionをメモしておく。

$ cp wc.db wc.db.org
$ sqlite3 wc.db .dump | sqlite3 wc_new.db
$ sqlite3 wc_new.db

sqlite> PRAGMA user_version = 31;
sqlite> PRAGMA user_version;
31
sqlite> .exit

$ mv wc_new.db wc.db

これで修復される。
user_versionをセットしないとsvn upで今度は「assertion failed (format >= 1)」というエラーが出るようになるので注意。

7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?