Server Version#: Version 1.22.0.4163
Player Version#: Plex Web Version 4.53.0
My problem may be related to this similar sounding issue:
I’ve seen similar sounding issues on the Linux versions.
Upgrading to any version since 1.22.0 results in messages from the “repair corrupt database” checks as follows:
D:\AppData\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
D:\AppData\Plex Media Server\Plug-in Support\Databases>sqlite3 com.plexapp.plugins.library.db “PRAGMA integrity_check”
Error: no such collation sequence: icu_root
I routinely run these checks and take a backup before any upgrade so I know it was clean before patching. I have tried:
uninstalling, restoring the clean backup, installing 1.22.0 again - all fine
uninstalling, restoring clean original backup, installing 1.22.1 - restart, allow to run through update to library and leave for a few mins. close cleanly. database shows teh aboce errors
uninstall, restore backup, return to 1.22.0 - all fine
upgrade to 1.22.1 (more recent build) - same result as previous upgrade attempt
uninstall, return to 1.22.0, upgrade direct to 1.22.2 - same problem as upgrade to 1.22.1
I’ve also tried uninstalling, cleaning out registry, rebooting then restoring 1.22.0, check all ok, then go to 1.22.1 - database corrupts.
I’ve noticed a couple of times that after upgrade from 1.22.0 the update library process crashes. My database is about 550Mb - not sure if this makes it large or average.
I’m now back with my restored version on 1.22.0 which works but leaves me frozen version wise.
I can see I’m not alone having some kind of corruption issue after upgrade to 1.22.1 or higher but the fixes seem to be the steps I’ve already tried unsuccessfully.
Has anyone found othe fixes which persist?
TIA.
Plex added localization to the DB so you now need to use the embedded Plex Media Server sqlite extension. For Windows it will be one dash instead of two.
Thank you for very much for this, I’ll try it at the weekend and report back. Windows isn’t my home OS and I hadn’t twigged that the Windows version had bundled in SQLlite in this way. Hopefully the support page will be updated in due course.
Good to know that the issue is with SQLlite and not upgrades corrupting the data store!
I suspect I’m missing something in the windows command set but if I try to invoke sqlite from within PMS the service starts up but seems to do nothing. So after upgrading to the latest version if I run commands to check the DB from the Repair Corrupt Database page eg:
D:\AppData\Plex Media Server\Plug-in Support\Databases>“C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe” --sqlite com.plexapp.plugins.library.db “DROP index ‘index_title_sort_naturalsort’”
Plex starts up but nothing else seems to happen. There is no output and --help or -help produces no output either. I’ve tried tweaking the commands around sqlite and help but nothing appears in the plex log files in response to commands.
I was looking for a support page for windows command line similar to the *nix page and haven’t found one so this may just be my lack of windows CLI knowledge but I’d expected to see something in the logs if only error messages!
Hi Tiebierius, same as my database which is also corrupted since the last update.
I’m using OpenMediaVault and I have Plex in a Docker instance.
I tried to follow the instructions to fix a corrupted Plex database but it didn’t work. Now i’m not able to resume my movies or TV episodes and even update the metadata.
Same thread as above just further down was an example for docker users. It would be easier for me to see what needs correcting if you would share what you have tried so far.
#!/bin/bash
# if script name is plexsql.sh then
# usage is - ./plexsql.sh "select something from some_table where something = something_else"
#
mkdir -p /opt/plexsql
sqlplex="/opt/plexsql/Plex\ Media\ Server --sqlite"
docker stop plex
docker cp plex:/usr/lib/plexmediaserver/ /opt/plexsql
cd "/opt/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases"
cp com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original
"$sqlplex" com.plexapp.plugins.library.db "$1"
#and if you want to do something other than select statements use this instead
#cp com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original
#"$sqplex" com.plexapp.plugins.library.db "DROP index 'index_title_sort_naturalsort'"
#"$sqplex" com.plexapp.plugins.library.db "DELETE from schema_migrations where version='20180501000000'"
#"$sqplex" com.plexapp.plugins.library.db "$1"
Hi Tiebierius, I was able to fix this by deleting the Plex config folder and restarting my Plex server by retrieving all the metadata for all my movies and TV shows.
But on a positive note, Plex is very quick at starting movies and show now compared to before.
I know, I would’ve preferred not to do this but there was no choice.