Danny Beckett
Danny Beckett

Reputation: 20838

How to change the default location for data & log files?

In SQL Server Management Studio, how can I change the default location for new/restored database data files and log files?

I tried looking in Tools > Options but there's relevant nothing in there.

Upvotes: 0

Views: 2878

Answers (1)

Danny Beckett
Danny Beckett

Reputation: 20838

In your Object Explorer, right-click your computer/server's name and choose Properties:

Select Database Settings and fill in your new locations:

If you were to go back into the Properties you would see that it won't appear to have changed your settings (it will have reverted back to the original values).

Per this question, you need to run services.msc and restart your SQL Server service:

Your save locations will now take effect for any new databases created/restored.

Upvotes: 1

Related Questions