Database Tools

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Re: Database Tools

Postby nynaevelan » Tue Nov 30, 2010 6:30 pm

After you ran the Audit script did you use the Clean DB Errors script?? That one should fix all the errors.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
nynaevelan
 
Posts: 5540
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA

Re: Database Tools

Postby Onweerwolf » Tue Nov 30, 2010 6:57 pm

Yes, of course.
Image
Onweerwolf
 
Posts: 542
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Database Tools

Postby nynaevelan » Tue Nov 30, 2010 8:51 pm

Sorry I don't have any other suggestions other than sending Bex a PM, he's a sql genius maybe he will have some thoughts on how to fix it. I would suggest Owyn also but I have not seen any posts from him on the board lately.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
nynaevelan
 
Posts: 5540
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA

Re: Database Tools

Postby Bex » Mon Dec 20, 2010 2:43 pm

What do you get if you run this query in SQL-Viewer?
Code: Select all
SELECT *
    FROM PlaylistSongs
    WHERE IDPlayList<>-1
    AND IDPlayList NOT IN (SELECT IDPlaylist
    FROM Playlists)
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Bex
 
Posts: 6268
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Re: Database Tools

Postby Onweerwolf » Mon Dec 20, 2010 3:15 pm

# IDPLAYLISTSONG IDPLAYLIST IDSONG SONGORDER
01 25421 Genesis 6873 Trespass
Image
Onweerwolf
 
Posts: 542
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Database Tools

Postby Bex » Tue Dec 28, 2010 9:13 am

It should go away id you run this SQL in SQL-Viewer:
Code: Select all
DELETE FROM PlaylistSongs WHERE IDPlaylist NOT IN (SELECT IDPlaylist FROM Playlists)
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Bex
 
Posts: 6268
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Re: Database Tools

Postby Onweerwolf » Sun Jan 16, 2011 6:28 pm

Bex wrote:It should go away id you run this SQL in SQL-Viewer:
Code: Select all
DELETE FROM PlaylistSongs WHERE IDPlaylist NOT IN (SELECT IDPlaylist FROM Playlists)


I've tried this but it still gives the same result when I run this one:

Bex wrote:What do you get if you run this query in SQL-Viewer?
Code: Select all
SELECT *
    FROM PlaylistSongs
    WHERE IDPlayList<>-1
    AND IDPlayList NOT IN (SELECT IDPlaylist
    FROM Playlists)


:(
Image
Onweerwolf
 
Posts: 542
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Database Tools

Postby Bex » Tue Jan 18, 2011 7:13 am

Onweerwolf wrote:# IDPLAYLISTSONG IDPLAYLIST IDSONG SONGORDER
01 25421 Genesis 6873 Trespass

The offending playlist seems to have an id=Genesis, which shouldn't be possible. But SQLite actually accepts strings in numeric fields and vice versa.
Try this one:
DELETE FROM PlaylistSongs WHERE IDPlaylist='Genesis'
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Bex
 
Posts: 6268
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Re: Database Tools

Postby Onweerwolf » Tue Jan 18, 2011 7:39 am

Bex wrote:
Onweerwolf wrote:# IDPLAYLISTSONG IDPLAYLIST IDSONG SONGORDER
01 25421 Genesis 6873 Trespass

The offending playlist seems to have an id=Genesis, which shouldn't be possible. But SQLite actually accepts strings in numeric fields and vice versa.
Try this one:
DELETE FROM PlaylistSongs WHERE IDPlaylist='Genesis'


That did not change anything as far as I can see. It still gives

# IDPLAYLISTSONG IDPLAYLIST IDSONG SONGORDER
01 25421 Genesis 6873 Trespass

after that.
Image
Onweerwolf
 
Posts: 542
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Database Tools

Postby Bex » Wed Jan 19, 2011 9:03 am

Then try this:

Code: Select all
DELETE FROM PlaylistSongs WHERE IDPLAYLISTSONG=25421
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Bex
 
Posts: 6268
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Re: Database Tools

Postby Onweerwolf » Wed Jan 19, 2011 9:09 am

Same result still, unfortunately.

(I do appreciate the help though, thank you! :D )
Image
Onweerwolf
 
Posts: 542
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Database Tools

Postby Bex » Wed Jan 19, 2011 9:13 am

Can you zip and uplaod your db to e.g. mediafire and then PM me the link so I can see what's going on with your DB?
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Bex
 
Posts: 6268
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Re: Database Tools

Postby Onweerwolf » Wed Jan 19, 2011 9:18 am

Bex wrote:Can you zip and uplaod your db to e.g. mediafire and then PM me the link so I can see what's going on with your DB?


Yep, I'm rarring a recent DB back-up as we speak and will send you a pm after i've uploaded it.
Image
Onweerwolf
 
Posts: 542
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

Re: Database Tools

Postby Bex » Sat Jan 22, 2011 5:17 pm

The bad thing is that your db seems to be corrupted, but the good thing is that I managed to fix it. The key seems to first delete the offending record and then do a "Optimize Database (Complete)". At first it didn't work but after three times or so it actually did work.

So run this statement:
Code: Select all
DELETE FROM PlaylistSongs WHERE IDPLAYLISTSONG=25421

and do a "Optimize Database (Complete)". Repeat until it works.

If nothing works I can send you your db!
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Bex
 
Posts: 6268
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Re: Database Tools

Postby Onweerwolf » Mon Apr 11, 2011 1:22 pm

Hi Bex!

Sorry it took me such a long time to get back to you. I've done what you said in your last post and indeed the error is now fixed and the optimized database function finally makes it to the end as well. Wohoo! Thanks for helping me out! I appreciate it.

Now in the Audit Report there is 1 error left, which is this one:

Code: Select all
ArtistsAlbums(Album) Check LIKE Values        **ERROR**
---------------------Details-----------------------------
SELECT *
    FROM (SELECT Artists.ID AS IDArtist, Artists.Artist AS Name, Albums.ID As IDAlbum, Albums.Artist AS AlbumArtist
    FROM Artists, ArtistsAlbums, Albums
    WHERE ArtistsAlbums.IDArtist=Artists.ID
    AND ArtistsAlbums.IDAlbum=Albums.ID)
    WHERE AlbumArtist NOT LIKE '%'||REPLACE(REPLACE(Name,'@','@@'),';',';;')||'%'
[IDARTIST] [NAME] [IDALBUM] [ALBUMARTIST]
[6253] [Æthenor] [8222] [Aethenor]
---------------- 1 OF 1 Errors Listed------------


Now i'm assuming the Æ character is responsible here, correct?

Is there a way to fix this or is this just a a MM bug/limitation/etc.?

I'm pretty sure this is not causing any problems in how MM functions but i'd still be nice to have my DB fully error free of course.
Image
Onweerwolf
 
Posts: 542
Joined: Tue Dec 12, 2006 5:32 pm
Location: The Netherlands

PreviousNext

Return to Need Help with Addons?

Who is online

Users browsing this forum: No registered users and 11 guests