iTunes database is corrupt

I am using iTunes on Windows 7. 'My Music' is located on an external drive. The iTunes database is thoroughly corrupted. How can I re-build the iTunes database from scratch while preserving my current existing playlists.

Dell Inspiron 1720 laptop-OTHER, Windows 7, 32 bit, SP1

Posted on Jan 1, 2013 8:12 PM

Reply
7 replies

Jan 16, 2013 10:02 AM in response to richierein

I am trying a procedure involving moving the xml & itx (? sp) files, that

constitute the database, elsewhere, so forcing a rebuild. I found this in

an email from a while back.


The process will probably not work as the new version ITunes goes out into the cloud,
where I do not want it to go, and rebuilds the database based whatever I
bought from the IStore. I've tried reintroducing the original files and this ran

overnight before causing the WIN7 box to die.


If all you have is duplicates & missing artwork, take a look at TuneUp,

it may help you. Althought it is not free, I found that it did a reasonable job.


If I could procure a better version of ITunes, the music librarian, one

that actually performed reasonably I would be a happier human.

Jan 16, 2013 10:10 AM in response to richierein

Empty/corrupt library after upgrade/crash

Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping. In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.


User uploaded file


See iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.


When you get it all working make a backup!


Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device.


As for the duplicates, the Shift > View > Show Exact Duplicates feature lists all duplicate copies. You need to manually select all but one of each group to remove. Or use my DeDuper script if you don't want to do it by hand. Please take note of the warning to backup your library before deduping. See this thread for background.


tt2

Jan 16, 2013 10:32 AM in response to turingtest2

I have all of my music files stored in the 'My Music' folder on an external drive. Within that folder are many sub-folders including 'iTunes' and many more, Within iTunes I have 'iTunes Music' and 'iTunes Media' both of which contain music files. My objective is to start with a totally empty database and selectively add the folders containing music. Afterwards I can add the artwork. I have no problem uninstalling iTunes then re-installing it if necessary.

Jan 16, 2013 10:47 AM in response to richierein

That's fine if you don't have any artwork that would be difficult to refetch, ratings, playlists or playcounts to worry about, wav files with no tags, and you don't have a device synced to the current library that might lose data if you switched to using a new one. Press and hold down shift as you start iTunes, keep holding until asked to choose or create a library. Click create, browse to the root of your prefered drive and let iTunes create a library there. Move all your existing content into \iTunes\iTunes Media\Automatically Add to iTunes and let iTunes get on with it. When it has finished absorbing everything, anything that it could not manage will be left inside a Not Added folder and can probably be discarded. You might also need to reclassify some video files. You may still need to dedupe with the DeDuper script or some other approach.


If you want to clean up the structure of the existing library and preserve ratings, playlists, playcounts, date added etc. then I have some scripts that can help move things around, but the first step would be to identify the active library database and relocate it into an iTunes folder at the root of a drive. Just ask and I can go into detail.


Uninstalling and reinstalling iTunes has no effect on the library database.


tt2

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

iTunes database is corrupt

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.