Wednesday 21 June 2017

SQL Server Management Studio - SQL Templates Locations

SQL Server Management Studio - SQL Templates Locations

You can add SQL templates SSMS's template explorer by navigating to a directory and putting the files directly into a folder.

Windows 8.1:

SSMS 17:

C:\Users\user\AppData\Roaming\Microsoft\SQl Server Management Studio\14.0\Templates\Sql

Vista/Windows 7:

C:\Users\user\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\Templates\Sql
“user” should be replaced with your username and the 100 directory is for Sql Server Management Studio 2008 and you replace it with 90 for 2005!

Windows XP :

C:\Documents and Settings\user\Application Data\Microsoft\Microsoft SQL Server\100\Tools\Shell\Templates\Sql
“user” should be replaced with your username and the 100 directory is for Sql Server Management Studio 2008 and you replace it with 90 for 2005!

You will have to restart SQL Server Management Studio for the templates to come up. If you have 2005 and 2008 management studio and you use both then you will have to put the templates in the folder for each version also.
n.b. If you cannot see the ‘appdata’ folder you will need to go to C:Drive > Organize > Folder and Search options > View > Files and Folders > Select the option to Show hidden files, folders and drives > OK