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

PussInBoots picture PussInBoots · Dec 8, 2012 · Viewed 7.3k times · Source
  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?

Answer

Solomon Rutzky picture Solomon Rutzky · Nov 26, 2017

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.