Cannot repair corrupt database file

I’ve been trying to repair a corrupt plex database all night. I had no backups in the folder so going back wasn’t an option. Trying to follow the instructions to repair the database, i get the following error when I try the first DROP command. I don’t really understand this database repair stuff and never had to do it before.

Prior to this plex was constantly giving errors when trying to play files, and had to be restarted. I tried going thru the check and repair instructions myself, but it wasn’t working and I think I may have made it worse. Plex no longer launches at all, saying it can’t launch the database.

c:\Users******\AppData\Local\Plex\Plex Media Server\Plug-in Support\Databases>sqlite3 com.plexapp.plugins.library.db “DROP index ‘index_title_sort_naturalsort’”
Error: no such index: index_title_sort_naturalsort

I’ve included the file here in hopes that someone can tell me if it’s gone for good or if maybe it’s salvagable. https://drive.google.com/open?id=1KAT1cWiW51QUC3YDnRNKZB9g9nYknuxT

Server Version#: latest
Player Version#:latest

Fixed it!

The problem was that I changed where my Plex metadata is stored, and the database files get stored in that location instead of the default %localappdata% location. (For whatever reason, I have db files there too. But they aren’t used)

Once I found the correct location for the databases in the registry editor at HKEY_CURRENT_USER\Software\Plex, Inc.\Plex Media Server I saw there were indeed backups from just days ago.

My databases got corrupted because that metadata folder was on a drive that filled up, so the full drive caused all kinds of issues with files not playing and eventually corrupted it entirely.

1 Like

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