I’ve noticed that some people are struggling with the setting up of their existing templates in SSMS 2005. This posting with deal with two issues.
- Locating the file path of your templates.
- Tidying up the default templates.
Locating the file path of your templates.
There are two locations for templates when working with SSMS 2005:
|C:\Documents and Settings\[USERNAME]\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell\Templates\Sql|
Replace [USERNAME] with you windows login name. This location is where you templates are stored when created in SSMS.
|C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\sqlworkbenchprojectitems\Sql|
This is where the default file template folders and scripts are stored. All files and folders in this location are copied to your local store when you open SSMS.
VISTA Store ONLY:(Just added this after some research on vista)
|C:\Users\[USERNAME]\AppData\Roaming\Microsoft\Microsoft SQL Server\90\Tools\Shell\Templates\Sql|
It seems that if you running vista the files in your main store need to in here as well.
Tidying up the default templates.
Create a folder called "2 – Default Templates” in the Main Store. Copy all the folders in the Main store into you new folder and you Main store should look like this: (If you using vista make sure this folder is also in your VISTA Store)
Delete all the folders in your local store (excluding your personal templates). Create a folder called “1 – My Template”, then copy all your templates into this new folder. Your Local Store folder should now look like this:
Close down SSMS. The next time you open SSMS your template structure should look like this:
(ctrl+Alt+T will open your templates)
I hope this helps you organise your templates and makes life easier for you.