I would like to start fresh with my DVR. However, when I delete the dvr and re-add the tuners, all of the channels remain in each of the tuners. How do I delete them? One of my tuners is showing a lot more channels than the other and both are picking up channels the other isn’t. It’s a 4 tuner card so they should all be getting the same channels.
Are you comfortable with SQL queries?
If you are,
Shut down your server,
make a safety backup up the main plex database file
then perform this query on the database
DELETE FROM media_provider_resources
(make sure to copy it in full, or there might be unwanted consequences, up to a complete data loss)
If you don’t know how to perform a SQL query, use either a SQLite database editor
or use the sqlite which comes with Plex server. Repair a Corrupted Database | Plex Support
I am comfortable running sql queries.
Do I need to tell the SQLite which database file to run this on? I’ve opened the Plex SQLite and ran this delete statement. However, it doesn’t appear to do anything. It just moves the cursor down to the next line with …> before the cursor.
I think so.
(It is better not to open an interactive SQL shell.)
Do it like this
"C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe" com.plexapp.plugins.library.db "DELETE FROM media_provider_resources"
This gives me a syntax error:
Error: near “-”: syntax error
I assume it has to do with improper quoting.
Try
"C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe" com.plexapp.plugins.library.db "DELETE FROM 'media_provider_resources'"
Okay now it’s giving me a no such table error:
Error: no such table: media-provider-resources
There must be something else wrong. This table definitely exists.
I am unfortunately out of ideas for now.
If you have a Windows computer, try opening the db file in https://sqlitebrowser.org/ and run the query in there.
Thanks for your quick responses. I’ll let you know how it goes with SQLite Browser.
Okay the table name has underscores, not dashes. Still couldn’t get it to work in the command prompt, but running this in DB Browser for SQLite worked:
DELETE FROM ‘media_provider_resources’
Then when it asks if you want to save you have to say yes or else the rows in that table remain haha. I don’t get that luxury in sql server.
Thanks!
 I should have noticed that.
 I should have noticed that.
Glad it worked out for you!
I’ve edited my above posts for the benefit of the next user with the same issue.
Thankyou so much for this!
My process (linux docker) was to navigate to / run sqlite3 config/Library/Application Support/Plex Media Server/Plug-in Support/Databases then do an optimise database / clean bundles. It didn’t work without that last step.
Finally after many months with a random DVR that’s not available / visible / deletable / configurable (but oddly still recording in the background), I have it back! Yusss!
Thanks again!
Marshalleq.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.