Page tree

Search


    Recently Updated



    Latest Releases

 MediaPortal 1 1.15.0
            Releasenews | Download
 MediaPortal 2.1 Pre2 
            Releasenews | Download

Table of Contents

Overview

How to check and repair corrupted SQLite database.

Symptoms

If you find database errors in your log files, or repeated "closing database" entries, your SQLite database may be corrupted. 

Resolution

The following instructions apply to the MediaPortal video database, but could be applied to any MediaPortal SQLite database.

  1. Download
    sqlite3.exe
    from http://www.sqlite.org/2013/sqlite-sh...86-3080100.zip
  2. Copy
    VideoDatabaseV5.db3 
    as
    bad.db
    to some folder (ie.
    C:\SQLRepair
    )
  3. Copy sqlite3.exe from downloaded ZIP file to
    C:\SQLRepair
    1. open cmd (Command prompt) and go to
      C:\SQLRepair
    2. type following in command prompt (or copy-paste these commands into cmd):
      • sqlite3 bad.db
      • pragma integrity_check
    3. If you see an error message then:
      1. exit sqlite3.exe with CTRL+C
      2. type following in command prompt (or copy-paste these commands into cmd) :
        • *echo .dump | sqlite3.exe
          bad.db 
          >
          good.sql
          *
        • *sqlite3.exe -init good.sql
          VideoDatabaseV5.db3
          *
  4. Backup your corrupted video database to somewhere and copy the repaired one (from
    C:\SQLRepair
    ) over your corrupted db.

You can also check this forum post for similar type of solution, but more appropriate for automating.

Related

Changelog

Change

Date

Release

Database Check

2014/09/02

1.10.0

 

 

   

 

This page has no comments.