HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Moving SQL Server default instance's folders to another path on the same server

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
paththesamesqlfoldersinstancedefaultmovinganotherserver

Problem

My customer installed SQL Server 2012 default instance. But default instance's folders and data folder are on the same disk.

I want to move the default instance's folders to another disk (C:Program Files\Sql Server\).

Can I do it without uninstalling exist instance then installing new instance?

Solution

From View or Change the Default Locations for Data and Log Files:



  • In Object Explorer, right-click a server and click Properties.


In the left panel, click the Database settings page.

  • In Database default locations, view the current default locations for new data files and new log files.



  • To change a default location, enter a new default pathname in the Data or Log field, or click the browse button to find and select a pathname.




Moving system databases is a little more intense, and harder for some databases (like master) than others (like tempdb). I'd start here, and consider whether you really need to move master/model/msdb:

Move System Databases

I don't know that there's a supported way to move folders like Binn, FTData, etc. If you find ways to move those that seem to work, I'm pretty confident they'll break at some point. So if the object is really to remove all traces of SQL Server from the installation drive, it will be much cleaner to backup your databases, uninstall SQL Server, and start over. If the object is just to keep Binn and Data separate, I'd have to question the value in going through a lot of trouble for that.

Context

StackExchange Database Administrators Q#81492, answer score: 5

Revisions (0)

No revisions yet.