Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change "Database default locations" for LocalDB in SQL Server Management Studio?

  1. Connect to LocalDB in SSMS
  2. Open Server Properties -> Database Settings enter image description here
  3. Change Data/Log/Backup locations -> click OK

When I click OK I get this error: enter image description here

Found some blogpost and changed this in regedit but it didn't help. enter image description here

Anyone got any other ideas I could try?

like image 242
PussInBoots Avatar asked Sep 05 '25 07:09

PussInBoots


1 Answers

I do not believe that these default paths for SQL Server LocalDB are changeable. This is quite unfortunate due to what appears to be a bug with SQL Server Express 2017 LocalDB ** (fixed as of CU 6 for SQL Server 2017), as per this question (and my answer to it) on DBA.StackExchange:

LocalDB v14 creates wrong path for mdf files

HOWEVER, you do not need to use the default paths. Those are used when you create a Database without specifying the physical locations. If you specify the physical location, then you should be able to create the files to any folder / directory that you have read / write access to.

like image 53
Solomon Rutzky Avatar answered Sep 07 '25 20:09

Solomon Rutzky