Trying to move the entire SQL install to another drive

  • I accidentaly installed my new SQL Server 2005 to be partly on the C drive and party on the D drive. My company has a policy that states that all installs have to be done entirly on the D drive.

    Does anyone know an easy way to move the install from the C drive to the D drive without having to do a complete uninstall/reinstall?

    Thanks

    Kenneth Fisher

    Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]

  • Sorry, The best you can do is uninstall and reinstall in that situation.

  • I don't suppose you know any way I can keep all the work I put into it? For example all of the logins, linked servers, and expecially the DTS packages I had to move and modify.

    Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]

  • Couldn't you just:

    1) Backup your master and msdb databases (and either backup or detatch and retain your user databases)

    2) Uninstall SQL, Reinstall in new place

    3) Restore / Attach all the databases from original install?

    The Redneck DBA

  • Great suggestion 🙂

    Ok here is the next question. I have completly uninstalled my server (I have 2 I'm working on) and I'm doing the re-install. I have gone through every element I'm installing and changed the drive to D:. When I look at disc cost I'm still getting 1568MB on the C drive :w00t:. Any suggestions why????

    Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]

  • You've got me on that one.

    Unless it's putting Books Online and the client tools and other junk on the C: drive

    I don't remember it asking where you want that stuff installed in the process.

    The Redneck DBA

  • If you can get away w/ just moving the system database(s) to the D drive then -

    http://support.microsoft.com/kb/224071/en-us

  • Unfortunatlly no. They want the whole thing moved. I have the system databases on D already (I did the instance on D but didn't realize that I had to go through and check every component). Unfortunatlly they don't want anything installed on C.

    Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]

  • When I did the install to our Dev system and defaulted all to the alternate E Application drive, Microsoft still insisted on installing files on the C drive. If any one else knows of a way around Please let me know also. Also I would highly recommend changing the default location of the temp folders to the same drives as you mdf and ldf files. To find current default :

    SELECT name, physical_name

    FROM sys.master_files

    WHERE database_id = DB_ID('tempdb');

    GO

    to change

    USE master;

    GO

    ALTER DATABASE tempdb

    MODIFY FILE (NAME = tempdev, FILENAME = 'S:\MSSQL\DATA\tempdb.mdf');

    GO

    ALTER DATABASE tempdb

    MODIFY FILE (NAME = templog, FILENAME = 'L:\MSSQL\LOGS\templog.ldf');

    GO

    --once done stop and restart the service and do cleanup of old location of temp mdf, ldf

  • Did you manage to get everything installed on D and nothing on C if so could you share.

  • Unfortunately no.

    The only suggestion that I saw that might have worked was changing a registry setting that told windows where the default program files directory was. Unfortunately I don't have the link anymore. We weren't willing to go quite that far so we settled for some of it being installed on C.

    On an up note it turns out that a large chunk of what it puts in the C drive is working/temp files that can be deleted. That and what is installed isn't going to grow so we could manage the cost.

    Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]

  • Thanks for replying. Is about to do the same here.

    I guess i have to just move the model, master, afterwards..

    As it all got installed on C....i tried to move master before and crashed the SQL lucky it was just a clean install i could just reinstall SQL again.

  • No matter what you specify for the location of program files and for data files, SQL will still place files in C:\Program Files\Microsoft SQL Server\80 (or 90 if this is a 2005 install.)

    I know that 2008 gives you more control over the install paths (FINALLY no need to move master, model, msdb, and tempdb post install!) but I am not sure if it still leaves that C: drive footprint or not.

    - Tim Ford, SQL Server MVPhttp://www.sqlcruise.comhttp://www.thesqlagentman.com http://www.linkedin.com/in/timothyford

  • The SQL Server install places a large amount of code into the Global Assembly Cache (GAC) on the system drive. It also always places the installer bootstrap files on the system drive, plus anything that needs to go into the \Microsoft Shared folder. There is no way around this.

    You need to allow 2.5 GB on the system drive for SQL Server 2005. This is made up of: Base install (990 MB), SP2 (820 MB), plus 1 CU (510 MB). You should allow about 510 MB for each additional CU installed.

    If you target the SQL binaries at a different drive, then you need to allow about 550 MB on that drive, and only 2.0 GB on the system drive.

    While you install SQL, a SP or CU, you need to allow an additional 500 MB on the system drive. You also need to allow 500 MB on the drive holding the system \Temp folder. If \Temp is on the system drive, then you need 1 GB of work space.

    Lots of new products put things into the GAC, which always lives on the system drive so this will grow over time. For a W2003 system, I you need a system partition of at least 10 GB (preferably 15 GB), with at least 4 GB free before you start the SQL install. For W2008, you should plan for maybe a 40 GB system partition.

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara

  • Thanks for the additonal information.

Viewing 15 posts - 1 through 15 (of 21 total)

You must be logged in to reply to this topic. Login to reply