I had this issue and fixed it as below:
I was using my entire library on an external drive (itunes library database files like the .xml and .itl and itdb files, plus the itunes media folder all on the external drive). I had issues when the external drive was slow to spin up or went to sleep while itunes was loaded, because iTunes didn't find the database and would open the default on the internal drive.
The simple solution for me was to do the following:
(1) copy my most current itunes library databases from the external drive to my internal drive's default folder,
(2) but I left my itunes > itunes media folder on the external drive,
(3) then I option-launched iTunes and choose the duplicate library file that I just put on the internal drive,
(4) then I made sure in itunes > preferences > advanced that itunes is still using the itunes media folder on the external drive.
Now if I launch iTunes it will use the database file on the internal drive to get the music from the external drive, and if the external drive is not there iTunes wont crash or go to another library. THIS DOES NOT COPY OR MOVE ANY EXISITING MEDIA FILES IN THE LIBRARY, AND THEY STAY ON THE EXTERNAL WHERE YOU HAD THEM BEFORE.
The only issue is if you download something before the external drive appears, it will be added to the internal drive, but when the external drive appears iTunes will use both media folders combined.
You can move the new content that went to the internal drive onto the internal drive later, and iTunes should find it again when you try to use it (if you used the same directory path as before like External Drive > iTunes > iTunes Media > Movies > The Incredibles > The Incredibles.m4v)
PS: I keep a backup copy of all the databases on the external drive for safekeeping, and I copy the most current iTunes databases to the external drive once a day. But I never choose the external drive's library database to launch iTunes.