Reputation: 21
TLDR: How do I change the default location for SQL Server Management Studios 2014 without uninstalling and reinstalling?
I recently installed SQL Server Management Studio 2014, and the default file locations aren't where I want them. I was able to change the default query location and default project location through Tools -> Options, but I cannot for the life of me figure out how to change the template location. Even if I delete the folder, every time I run SSMS, it creates a new folder where it used to be.
I'm guessing I just missed an option somewhere (possibly the XML section?), but any pointers would be appreciated.
In case it matters, I want to move the default location from "Documents/SQL Server Management Studios" to "Documents/Programming/SQL Server Management Studios"
Edit: I already changed the file path on the Import and Export settings, and the Query Result -> SQL Server tabs.
Upvotes: 1
Views: 5119
Reputation: 31
What helped me was editing the registry and Value for DefaultFileOpenLocation
HKEY_USERS\S-1-5-21-1428394981-1396028598-1721912238-1000\Software\Microsoft\SQL Server Management Studio\18.0_IsoShell
Upvotes: 1
Reputation: 419
Don't know about moving the entire location for SSMS, but if you are looking to modify the core templates that keep reloading, see below.
I have always kept my go-to scripts in the Templates and to keep things clean, I've always first bundled all the shipped templates to a separate folder. You have to do this not only in your local instance first, but also the location they pull from each time you open SSMS, or it will always keep adding the default templates (and their folders) whenever you open SSMS.
If you have already opened your Template Explorer, edit one of the files in there (Right Click > Edit) to open it. On the instance that opened, right click on its tab and select Open Containing Folder.
Close SSMS and then delete all but your custom templates from the location that opened. Make a backup of your custom templates somewhere else on your PC, just to be safe.
DO NOT OPEN SSMS YET!! Doing so will rebuild the core templates in your SSMS instance.
Open the following folder path: C:\Program Files (x86)\Micorost SQL Server\120\Tools\Binn\ManagementStudio\SqlWorkbenchProjectItems\Sql
That is where the default templates reside. What I do is create a new folder called "__SQLDefault", then move everything except Sql.vsdir and SQLFile.sql to the __SQLDefault folder (Or whatever you called it). This is in case I ever want to reference any of the core templates...they are still there just in a separate, single folder. If you don't want any of the core templates to be preserved, the other option would just be to delete everything (except Sql.vsdir and SQLFile.sql) instead of putting them in a folder.
Once the files are moved or deleted, now open SSMS and your template explorer should just have the _SQLDefault folder in it (or not if you deleted everything), along with your custom templates that you didn't delete earlier. If your custom ones are gone, just add them back from your backup.
Upvotes: 4