Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Moving SQL Server installation to another partition

Posted on 2007-10-17
Medium Priority
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 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 2000 total points
ID: 20092466
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 microsoft.com

Expert Comment

ID: 20092487
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

ID: 20092550
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?

Expert Comment

ID: 20093339
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 70

Expert Comment

by:Scott Pletcher
ID: 20093655
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Suggested Courses

578 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