PDA

View Full Version : Small corrections of the database? DS-106



tommypeters
2006-10-16, 13:46
I'm running SS 6.3.1 on a Synology DS-106. I don't know why, but a clear/full rescan stops before it's completed. Sometimes with a "lost connection" error message (some timeout?), sometimes without any error message.

I thought that maybe there was something wrong with some of my files, making the rescan to loop or crash, so I put just some of the files in my music directory and did a rescan. It worked. I then added a few CD's at a time and "scanned new music".

When I had added all CD's that were previously in my music dir, and it still worked, my theory of "bad files" seemed wrong. Now everything works, with some small flaws. Flaws that are usually remedied with a "Clear and full rescan"... Could that be fixed with some manual labour & SQL skills instead?

For instance, if I forgot to place a folder.jpg in some CD folders, I get an empty frame instead. Adding the folder and "scan new" doesn't get it shown. Getting the files re-timestamped by rewriting the tags doesn't get the album art shown - but sometimes add a second identical copy of the same CD in the album browsing.

So, I want to get the newly added album art shown, and I want to remove duplicates of albums. Is there any way to get to an SQL command prompt on the DS-106 and make small corrections? Is there a way to backup the entire database?

tommypeters
2006-10-17, 23:03
Anyone? s it posible to "get to" the SQLite database (since I'm running 6.3.1) with a command prompt (or even a "crappy tool") and make some corrections?

radish
2006-10-18, 06:33
In general, yes, there are a number of command line and other tools for mySQL. I have no idea about the specifics of it running on the DS-106.

flipflip
2006-10-18, 07:45
Of course, the command is sqlite3 and it is even included with SSODS.

/volume1/SSODS/bin/sqlite3 /volume1/SSODS/var/cache/.slimserversql.db

should open a console to the databse (i may be wrong with the path to the database file above, i don't remember it..).

Then you can issue all usual SQL commands. See www.sqlite.org -> Documentation for a complete reference of SQL commands understood by sqlite3.

You can also transfer the database file to another computer and use it there. There are even ODBC and JDBC drivers for Sqlite! And there exist some GUI tools, at least for windows. See sqlite.org.

flip


Edit: This single file _is_ the whole database. So just backup this file (e.g. using the "Export_Database" routine under "Tools" in SSODS). Or if you prefer ASCII files, dump the database to a file, e.g. with:

echo ".dump" | sqlite3 databasefilename > databasedump.sql

With some modifications (mainly quoting) this file can then be imported into any other SQL database (postgresql, mysql etc.).

tommypeters
2006-10-18, 08:23
Many thanks! :D

tommypeters
2006-10-19, 11:06
SQLite Explorer from Arkesystems seems like a decent program to use.