# Unable to open Database

**URL:** <https://forums.plex.tv/t/unable-to-open-database/41954>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [September 3, 2013, 6:25pm UTC](https://forums.plex.tv/t/unable-to-open-database/41954 "2013-09-03T18:25:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ti-Ta](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ti-ta/32/1974_2.png) [@Ti-Ta](https://forums.plex.tv/u/Ti-Ta)\
**Post date:** [September 3, 2013, 6:25pm UTC](https://forums.plex.tv/t/unable-to-open-database/41954/1 "2013-09-03T18:25:08Z")

</div>

Hello fellow developers.

&nbsp;

I am running Plex 0.9.8.4 on my Netgear ReadyNAS and wrote a Mac App to export yur movies to a textfile (for friends who ask for a list).

&nbsp;

Today I tried to run it again and it did not return any Data.

&nbsp;

I tried to check the com.plexapp.plugins.library.db in Library\Application Support\Plex Media Server\Plug-in Support\Databases\ with SQLite Database Browser and Mac SQL Studio but both were not able to open the database.

&nbsp;

My Plex Clients work just fine and stream any media I want.

&nbsp;

Has anything been changed in the structure that I can't open the .db?

&nbsp;

Hope you can help me!

&nbsp;

Regards

Ti-Ta

---

<div class="post-metadata">

**Author:** ![Ti-Ta](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ti-ta/32/1974_2.png) [@Ti-Ta](https://forums.plex.tv/u/Ti-Ta)\
**Post date:** [September 6, 2013, 6:18pm UTC](https://forums.plex.tv/t/unable-to-open-database/41954/2 "2013-09-06T18:18:10Z")

</div>

I recently installed PMS 0.9.8.5 and I am still unable to open the database.

---

<div class="post-metadata">

**Author:** ![Flobse](https://avatars.discourse-cdn.com/v4/letter/f/a88e57/32.png) [@Flobse](https://forums.plex.tv/u/Flobse)\
**Post date:** [September 7, 2013, 9:39pm UTC](https://forums.plex.tv/t/unable-to-open-database/41954/3 "2013-09-07T21:39:25Z")

</div>

Same problem here. :/

---

<div class="post-metadata">

**Author:** ![muneer.natha](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/muneer.natha/32/116280_2.png) [@muneer.natha](https://forums.plex.tv/u/muneer.natha)\
**Post date:** [October 6, 2013, 9:18am UTC](https://forums.plex.tv/t/unable-to-open-database/41954/4 "2013-10-06T09:18:29Z")

</div>

Any update on this?   
  
  
Having the same issue on the latest plexpass-only build, using windows 8 64-bit and SQLite manager.

---

<div class="post-metadata">

**Author:** ![sa2000](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/sa2000/32/6922_2.png) [@sa2000](https://forums.plex.tv/u/sa2000)\
**Post date:** [October 6, 2013, 9:55am UTC](https://forums.plex.tv/t/unable-to-open-database/41954/5 "2013-10-06T09:55:17Z")

</div>

> Hello fellow developers.
> 
> I am running Plex 0.9.8.4 on my Netgear ReadyNAS and wrote a Mac App to export yur movies to a textfile (for friends who ask for a list).
> 
> Today I tried to run it again and it did not return any Data.
> 
> I tried to check the com.plexapp.plugins.library.db in Library\Application Support\Plex Media Server\Plug-in Support\Databases\ with SQLite Database Browser and Mac SQL Studio but both were not able to open the database.
> 
> My Plex Clients work just fine and stream any media I want.
> 
> Has anything been changed in the structure that I can't open the .db?
> 
> Hope you can help me!
> 
> Regards
> 
> Ti-Ta

Wouldn;t the problem me because the database is open by Plex Media Server and needs to be closed (PMS exited) before you open it?

**Edit: just noticed this is being raised in the Developers forum. Sorry. So obviously it is not as simple as i thought !!!**

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [October 6, 2013, 11:24am UTC](https://forums.plex.tv/t/unable-to-open-database/41954/6 "2013-10-06T11:24:43Z")

</div>

> Hello fellow developers.
> 
> I am running Plex 0.9.8.4 on my Netgear ReadyNAS and wrote a Mac App to export yur movies to a textfile (for friends who ask for a list).
> 
> Today I tried to run it again and it did not return any Data.
> 
> I tried to check the com.plexapp.plugins.library.db in Library\Application Support\Plex Media Server\Plug-in Support\Databases\ with SQLite Database Browser and Mac SQL Studio but both were not able to open the database.
> 
> My Plex Clients work just fine and stream any media I want.
> 
> Has anything been changed in the structure that I can't open the .db?
> 
> Hope you can help me!
> 
> Regards
> 
> Ti-Ta

Last time I ran into an issue like that, was due to the fact that I was using a wrong version of Python and the SQLite snapin, due to the use of wal

Also, do note that SQLite is not a multi user database, nor a C/S based database, so accessing it over the LAN is not recommended, while Plex is running.

What you could do instead, is using the PMS http interface to grap the needed info

[http://wiki.plexapp.com/index.php/PlexNine\_AdvancedInfo](http://wiki.plexapp.com/index.php/PlexNine_AdvancedInfo)

/Tommy

---

<div class="post-metadata">

**Author:** ![sa2000](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/sa2000/32/6922_2.png) [@sa2000](https://forums.plex.tv/u/sa2000)\
**Post date:** [November 10, 2013, 1:59am UTC](https://forums.plex.tv/t/unable-to-open-database/41954/7 "2013-11-10T01:59:46Z")

</div>

> Last time I ran into an issue like that, was due to the fact that I was using a wrong version of Python and the SQLite snapin, due to the use of wal
> 
> Also, do note that SQLite is not a multi user database, nor a C/S based database, so accessing it over the LAN is not recommended, while Plex is running.
> 
> What you could do instead, is using the PMS http interface to grap the needed info
> 
> [http://wiki.plexapp.com/index.php/PlexNine\_AdvancedInfo](http://wiki.plexapp.com/index.php/PlexNine_AdvancedInfo)
> 
> /Tommy

Hi - found this very useful - accessing the advanced info though the web. I need now to translate the metadata thumbnail Id's into files !

I am investigating a problem with one of my media folder which has no thumbnail but PMS thinks there is one

Just discovered that Pawel Salawa SQLite studio actually opens the Plex database nicely and I can view the data with gui interface. I used this tool when I was playing with Android App Dev and now it appears it can be useful for looking into the PMS database ( a copy of it so I do not impact the operation)

See [http://sqlitestudio.pl](http://sqlitestudio.pl)

**Edit:** It is really good - No command line needed - all GUI. Can even apply filter when viewing the data in the tables

All I need now is work out the relationships and translate url's to database table entities

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [November 10, 2013, 11:09pm UTC](https://forums.plex.tv/t/unable-to-open-database/41954/8 "2013-11-10T23:09:28Z")

</div>

> See [http://sqlitestudio.pl](http://sqlitestudio.pl)

Try this as well....It rocks:

[https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/](https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/)

And it's cross-platform as well

/Tommy

---

<div class="post-metadata">

**Author:** ![dkaras](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@dkaras](https://forums.plex.tv/u/dkaras)\
**Post date:** [February 6, 2014, 10:16pm UTC](https://forums.plex.tv/t/unable-to-open-database/41954/9 "2014-02-06T22:16:54Z")

</div>

Help!

I recieved&nbsp;this message:

"Plex media server was unable to open&nbsp;its media database"

What do I do?

I have uninstalled all Plex&nbsp;programs and reinstaalled them. &nbsp;Still getting the above message. :(

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [February 6, 2014, 10:21pm UTC](https://forums.plex.tv/t/unable-to-open-database/41954/10 "2014-02-06T22:21:48Z")

</div>

> Help!
> 
> I recieved&nbsp;this message:
> 
> "Plex media server was unable to open&nbsp;its media database"
> 
> What do I do?
> 
> I have uninstalled all Plex&nbsp;programs and reinstaalled them. &nbsp;Still getting the above message. :(

Please post your question below the correct server forum, this is a developer forum

Look here:

[https://forums.plex.tv/forum/2-plex-media-server/](https://forums.plex.tv/forum/2-plex-media-server/)

/Tommy

---

<div class="post-metadata">

**Author:** ![Ti-Ta](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ti-ta/32/1974_2.png) [@Ti-Ta](https://forums.plex.tv/u/Ti-Ta)\
**Post date:** [July 10, 2014, 9:15pm UTC](https://forums.plex.tv/t/unable-to-open-database/41954/11 "2014-07-10T21:15:42Z")

</div>

Little update here:

I know what has been the problem in my case:

I was used to copy the com.plexapp.plugins.library.db file onto my desktop. But somewhen Plex was updated to SQLite 3.7.

SQLite 3.7 got a new feature called Write Ahead Logging (or WAL) - basically a backup in case a transaction fails - which is the reason for the .wal and .shm files in the Database folder.

[http://www.sqlite.org/wal.html](http://www.sqlite.org/wal.html)

With WAL it is not possible to access the database alone but only if the .wal and .shm files are in the same location.

Since I only copied the .db file I could not access the database with my programm.

When I copy the .wal and .shm files it all works.

Hope this will help other users.

Regards

Ti-Ta

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 21, 2019, 12:01am UTC](https://forums.plex.tv/t/unable-to-open-database/41954/12 "2019-12-21T00:01:46Z")

</div>

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