Moving SQL Server installation to another partition

Posted on 2007-10-17
Last Modified: 2012-08-13
I need to move a SQL Server 2005 installation from the C to D partition because of disk space issues.

1) What is the best procedure to do this?
2) If I backup all system databases and restore them on the new install, does that mean I have the exact same configuration and functionality?
3) Are there any other possible problems I have to be prepared for?
Question by:R7AF
    LVL 142

    Accepted Solution

    there is only 1 procedure to move the complete installation:
    uninstall + reboot + install

    >If I backup all system databases and restore them on the new install, does that mean I have the exact same configuration and functionality
    not all configuration is in the system databases.

    now, do you want to move the installation or only the databases? moving the databases is a simple procedure for user databases, for system databases a bit more tricky but fully documented in support notes in

    Expert Comment

    To move the data files, first you will have to detach the database using the sp_detach function or from the right click menu of that particular database in the SQL administrator, then you physically move the data files (the mdf and the log files) to the new location and then re-attach the database from the new location. To move the system files refer to the following link
    LVL 13

    Author Comment

    Thanks for your quick replies. The databases itself are already on D. I want to move the installation, so that will mean uninstalling and reinstalling on D. Now I think of it, is it possible to install on D without removing the installation on C, like a second instance? (I suppose that will cause problems with the installed services, or not?)

    The current installation is not a named instance by the way. (I don't know if this is relevant or not, as I haven't used named instances before.)

    Configuration data I'm concerned of are mostly logins, jobs and system stored procedures like xp_cmdshell. What kind of configuration is not stored in system databases?
    LVL 8

    Expert Comment

    Yes you can install it on the D drive with the first instance on the C Drive. Give a different name for that instance and make sure you rename the directory where your mdf files are so that you can use them in new installation i.e attach them if you want. once the second instance it up and running you can delete the files for the first installation. Bit tidious but surely will work if taken care.

    LVL 68

    Expert Comment

    Note, though, that your connections the instance will have to be changed, since you will be using a named instance instead of a default instance.  Instead of connecting to "computername", apps will have to connect to "computername\instancename".

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Via a live example, show how to shrink a transaction log file down to a reasonable size.
    Viewers will learn how the fundamental information of how to create a table.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now