Moving the MyMovies Database.

Posted by Jon | HTPC,Tips, Tricks & Guides | Thursday 20 November 2008 10:54 am

OK, here it is…the guide many of you have been waiting for.  This guide will show you how to move the MyMovies database to another location.  However, before I begin, I want to make a few things very clear:

  1. Brian Binnerup of MyMovies does not and will not support anything that happens as a result of moving your database.  If you screw things up, you’ll get no help.
  2. I claim no responsibility if you screw up your MyMovies installation, database or system.  These directions worked for me, so I’m sharing them – that’s it.
  3. I will not respond to emails, comments or anything else related to these instructions.  I’m going to be as clear as possible, but if it’s too complicated for you to follow, then you shouldn’t be doing it.
  4. These directions explain the moving of the database only.  I am not going into how to also move the image folders (covers and actors).  I’ll do that later (it’s not hard).

Now that we have that out of the way, let’s move on to what you’ll need to get started:

  1. A working installation of MyMovies with a database that is populated and ready to move.
  2. An installed copy of Microsoft SQL Server Management Studio Express (x86 or x64 edition).
  3. A new location for your new database to go.  I will start by saying that it is preferable that you move your database to a drive with lower latency than the default location.  This, for example, could be a WD Raptor drive or 10K+ SCSI drive.  Moving your database to a thumb drive or network location will make things slower, but if that’s what you want to do, fine.

If you have all of the above, let’s move your database!  The first step is to stop all of the relative services and processes that can cause the movement of the database to not happen.  I am doing my guide on a copy of Windows Server 2003, but you should be able to figure out the respective steps on other OS versions…they’re all similar enough:

  1. Backup your database using Collection Management.
  2. Backup your database using Collection Management (I’m not kidding).
  3. Close Collection Management.
  4. Exit the Tray Application by right-clicking and selecting Exit.

Good, now we’re ready to start the SQL Management Studio Express, so find that in your Programs menu and start it up.  Once it starts, it’s going to want a server name, so hit the drop-down selector and you should have an entry that looks like ComputerName\MYMOVIES.  If you do not have this, put it in (ComputerName is the name you assigned the system you are doing this on).  For authentication, make sure that Windows Authentication is selected.

login.jpg
  1. Hit Connect.
  2. If successful, you should get the Object Explorer pane and Summary tab screen show up.  If not successful, quit here – I’m not troubleshooting.
  3. Expand Databases in the Object Explorer pane.
  4. Right-Click the My Movies database and go to Tasks -> Detach.
  5. Choose Detach. detach.jpg
  6. Click OK in the Detach Database Window.
  7. The My Movies database will “disappear” if successful, so don’t freak out.

Good.  Now that we have successfully detached the database from the SQL Server, we can physically move the database.

  1. Go to C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data.
  2. Confirm that you have a My Movies.mdf and a My Movies_log.LDF file in there.  If not, something is wrong, so reattach your database (you’ll see how further down) and reboot or something.
  3. Select both the mdf and ldf files (CTRL+left-click, for example), hit CTRL+C (copy) and browse to the new location you have picked for your database.  I choose copy so that if something happens during the paste operation, you still have the original copies untouched. copydb.jpg
  4. Paste your mdf and ldf files to the new location.

Great!  Almost there.  Now we go back to MSSMSE to reattach the database at its new location.

  1. Go to MSSMSE and right click Databases in Object Explorer and select Attach. attach.jpg
  2. In the Attach Databases window, click the Add button under Databases to attach and browse to the location in the Locate Database Files window.
  3. Click OK to add the My Movies.mdf in the new location. locate.jpg
  4. In the “My Movies” database details window below, the My Movies.mdf and My Movies_log.LDF should populate.  Click OK. dbdetails.jpg
  5. The My Movies database should now be under Databases in the Object Explorer.  If so, you can close MSSMSE.
  6. Fire up MyMovies Collection Management (tray application will automatically start).
  7. Enjoy using MyMovies with your newly located database!

That’s it!  Hopefully you didn’t run into any issues.  There is one issue I will address if you encountered it on the way.  If after reattaching your database it shows up as (Read Only), contact me either by commenting here or emailing me.  I’ve had that happen before, but only when signing in under SQL Authentication using the login credentials that are located within the MyMovies log file.

  • Share/Bookmark

2 Comments »

  1. Comment by Greg Delory — September 18, 2009 @ 7:16 pm
    Browser: Firefox 3.5.3 OS: Windows Vista

    Thanks for this post – while I didn’t need to move my database, the information nonetheless helped me troubleshoot and fix a problem I was having with my movies.

    [Reply]

  2. Comment by Randy H — February 13, 2010 @ 8:34 pm
    Browser: Firefox 3.0.10 OS: Windows 7

    Thanks for the post. In my case, I installed a fresh Win7 on a new disk with MyMovies 3.12. Did not want to boot from WinXP disk with MyMovies 2.5x to export the DB. Created a DB for the new MyMovies 3.12 to find the Win 7 path for DB and Files. Then copied the FileStorage and SQL Data directories to the new locations and disk. MyMovies recognized the old versions of stuff on startup and converted everything over. Saved a lot of time and headache. Nice design on MyMovies to do that. And amazing that the SQL DB files just needed to be in place with the right file name to be picked up — no special lock keys or such.

    [Reply]

RSS feed for comments on this post. TrackBack URI

Leave a comment