Repairing a corrupt database

I’m having a couple of issues with some files not playing (which were previously) and was advised to repair my database.

I’ve followed the instructions for repairing a database (Integrity check found quite a few issues) and all goes according to plan until I use the following command : sqlite3 com.plexapp.plugins.library.db < dump.sql

It then creates an empty (0 bytes) com.plexapp.plugins.library.db - clearly something going wrong, The dump.sql file is 201318419 (and the original com.plexapp.plugins.library.db is 266674176).

Is this going to be a case of manually fixing the plex db?

Do you have the database file and the sqlite3.exe in the same folder?
Are you trying to do that directly in the Plex data folder or did you copy the db file out to another place?
Did you shut down Plex server before doing any of those steps?

@OttoKerner said:
Do you have the database file and the sqlite3.exe in the same folder?
No
Are you trying to do that directly in the Plex data folder or did you copy the db file out to another place?
In the Plex folder
Did you shut down Plex server before doing any of those steps?
Yes

The process all seems to work, creating files with reasonably looking file sizes until I try to restore from the dump.sql file.

I’ve followed the repair database instructions to the letter (tried it several times) and I still get a 0 bytes .db

try in a separate folder with all necessary files in one place.
Is your copy of sqlite3.exe up-to-date?

@OttoKerner said:
try in a separate folder with all necessary files in one place.
Is your copy of sqlite3.exe up-to-date?

I’ve tried in a separate folder and still get the same 0 bytes file when trying to restore from dump.sql.

I’m running the latest version of MacOS so assume this also includes the lates sqlite3

Any other ideas?

If you are willing to send me your db file per PM, I can let an expert take a look at it.

That would be great - thanks - I’ll get that over to you in the next day or so.

I am having the same issue. Could you find a solution? For now i did a rollback just to keep things working.

I am interested in the fix for this too. I tried to repair my database today, and I get the same thing with a 0 byte db file.

What PMS version are you folks using?

Im using PMS 1.16.6.1592. For now i dont think i will undo the rollback and will just keep things as they are from now on. But i would like to help having this issue solved, mainly because it can happen again with me or other users.

Which version of PMS are you seeing the problem with? Are you seeing this issue with 1.16, or was it with a different version?

It was with 1.16. I still have the dump.sql and the com.plexapp.plugins.library.db.original