# Database Corruption - Plex SQLite Tool Missing

**URL:** <https://forums.plex.tv/t/database-corruption-plex-sqlite-tool-missing/757333>\
**Category:** Plex Media Server\
**Tags:** server-unraid\
**Created:** [November 12, 2021, 10:23pm UTC](https://forums.plex.tv/t/database-corruption-plex-sqlite-tool-missing/757333 "2021-11-12T22:23:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MovieFreak4702](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@MovieFreak4702](https://forums.plex.tv/u/MovieFreak4702)\
**Post date:** [November 12, 2021, 10:23pm UTC](https://forums.plex.tv/t/database-corruption-plex-sqlite-tool-missing/757333/1 "2021-11-12T22:23:26Z")

</div>

Server Version#: 1.24.5.5173  
Player Version#: Irrelevant

I’ve been dealing with an issue related to content not playing consistently across devices, specifically in my movies library. My troubleshooting has led me to believe that I have a corrupt Plex DB. I am running Plex in an Unraid docker. I have tried to follow Spaceinvader One’s video on fixing a corrupt Plex DB but an experiencing something odd. When I attempt to dump and then re-add a new DB with my old DB’s settings, I can see the file start filling up with data via Krusader, but right before the new DB finishes compiling the file goes from 1.4gb down to 0, and I don’t receive any error indicating what’s going on. I do successfully run a PRAGMA integrity\_check, and I’m getting an “Error: database disk image is malformed”, but the restoration commands seem to be failing.

Because I’ve been having this trouble, I decided to do a fresh install of Plex on my Mac and my PC to attempt copying the DB there and doing the recovery commands. However, on both my Mac and PC, when I install PMS I don’t have a Plex SQLite tool in the installation directory. I attempted to copy this EXE from a friend’s PMS installation, but it is unsuccessful. In fact, every time I attempt to run the PLex SQLite PRAGMA integrity\_check, rather than doing the DB check it launches PMS on my PC. I’ve hit a rock wall and need some help from someone who may be able to dump/create a new db from my old one. I have been trying to get this to work for weeks with no progress whatsoever. I need someone to help me try and recover this DB.

---

<div class="post-metadata">

**Author:** ![MovieFreak4702](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@MovieFreak4702](https://forums.plex.tv/u/MovieFreak4702)\
**Post date:** [November 13, 2021, 12:15am UTC](https://forums.plex.tv/t/database-corruption-plex-sqlite-tool-missing/757333/2 "2021-11-13T00:15:13Z")

</div>

Through a friend, I was able to attempt a fix of the database using the manual steps found here:

> **[Repair a Corrupted Database | Plex Support](https://support.plex.tv/articles/repair-a-corrupted-database/)**
>
> Note: This article is for Plex Media Server version 1.23.2 and newer. If using an earlier version, see . Though...

Unfortunately the repaired database file acted the same on PC as it did on Unraid, the file was created but with 0kb, while the original DB file was around 1.5gb. I am at a complete loss and hope a dev has some insight as to what I can do here.

---

<div class="post-metadata">

**Author:** ![BigWheel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bigwheel/32/78783_2.png) [@BigWheel](https://forums.plex.tv/u/BigWheel)\
**Post date:** [November 13, 2021, 12:17am UTC](https://forums.plex.tv/t/database-corruption-plex-sqlite-tool-missing/757333/3 "2021-11-13T00:17:32Z")

</div>

How long ago did it first happen? Have you tried to [restore a database backup](https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/)?

---

<div class="post-metadata">

**Author:** ![MovieFreak4702](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@MovieFreak4702](https://forums.plex.tv/u/MovieFreak4702)\
**Post date:** [November 13, 2021, 12:57am UTC](https://forums.plex.tv/t/database-corruption-plex-sqlite-tool-missing/757333/4 "2021-11-13T00:57:58Z")

</div>

The problem began a few months back and I honestly never thought this was a database issue until Spaceinvader’s video a few weeks ago. I began by exploring video codecs, library differences, transcoding vs direct play, indirect play, file sizes, etc and the database being the issue never crossed my mind because I never got an error log stating that was a potential source of the problem. Certain movies would play for one user but not another, then I’d attempt to have someone try a file on multiple platforms (Xbox, Roku, Apple TV) and the results were always wildly random/inconclusive, so database issues didn’t occur to me.

At the point the Spaceinvader video came out, I was able to run the PRAGMA integrity\_check which revealed the "Database disk image is malformed error. The only backups present are from the past few days, I don’t have anything going back far enough to try.

---

<div class="post-metadata">

**Author:** ![MovieFreak4702](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@MovieFreak4702](https://forums.plex.tv/u/MovieFreak4702)\
**Post date:** [November 13, 2021, 1:01am UTC](https://forums.plex.tv/t/database-corruption-plex-sqlite-tool-missing/757333/5 "2021-11-13T01:01:30Z")

</div>

![Screen Shot 2021-11-12 at 8.00.56 PM](https://global.discourse-cdn.com/plex/original/4X/1/3/2/13236768a60620fec54b92dc5a9fa917ce1ebc72.jpeg)

This is the specific error I receive when running integrity\_check

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [February 11, 2022, 1:02am UTC](https://forums.plex.tv/t/database-corruption-plex-sqlite-tool-missing/757333/6 "2022-02-11T01:02:02Z")

</div>

Closed on February 11, 2022, 1:02am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
