Page tree


Search


 Recently Updated



 Latest Releases

 MediaPortal 1.18 Final
            Releasenews | Download
 MediaPortal 2.1.1 Final 
            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/2017/sqlite-dll-win32-x86-3200100.zip

  2. Extract the sqlite3.exe  into a working folder, e.g. C:\SQLRepair

  3. Make a copy of the corrupted Database into the working folder "C:\SQLRepair" and name it, e.g. to bad.db

  4. open cmd (Command prompt) and go to

    cd /d C:\SQLRepair
  5. type following in command prompt to check DB integrity (copy-paste these commands into cmd):

    echo pragma integrity_check; | sqlite3.exe bad.db
  6. If you see any error message(s), then type following in command prompt to extract data into an SQL File and recreate a new Database with the extracted Data (copy-paste these commands into cmd) :

    echo .dump | sqlite3.exe bad.db > good.sql
    sqlite3.exe VideoDatabaseV5.db3  -init good.sql

Backup your corrupted video database to somewhere. Copy the repaired one from C:\SQLRepair and overwrite 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.