@maccrory said:
same problem here https://forums.plex.tv/discussion/comment/1677862#Comment_1677862 . this is obviously something with the latest PMS release. I restored a previous db and it worked for a day and this morning same error (There was an unexpected error loading this library). We need a hotfix on this ASAP.The plex db should be BULLETPROOF! Rebuilding a db from scratch when you have a lot of content is a PAINFUL experience that takes forever. I’m a huge plex supporter but honestly issues like this could put a blemish on the product.
There isn’t a bug that causes corruption that would stop the library loading.
However, there is an issue that stops the normal dB integrity check from working. The following steps are needed.
If the server logs show that there is a dB corruption, save a copy of the database and then run
sqlite3 com.plexapp.plugins.library.db "DROP index 'index_title_sort_naturalsort'"
sqlite3 com.plexapp.plugins.library.db "DELETE from schema_migrations where version='20180501000000'"
Now run the integrity checks
sqlite3 com.plexapp.plugins.library.db "PRAGMA integrity_check"
And then attempt repair
sqlite3 com.plexapp.plugins.library.db .dump > dump.sql
sqlite3 com.plexapp.plugins.library.db < dump.sql
run another check to confirm repair ok
sqlite3 com.plexapp.plugins.library.db "PRAGMA integrity_check"
And launch PMS with the repaired dB