Sql-server – Editing built-in templates in Management Studio

sql serversql-server-2008sql-server-tools

I'm running SQL Server Management Studio 2008 (10.0.5500.0) and was attempting to edit the built-in template "Create T-SQL Trigger (New Menu)". I open the Template Explorer, right-click the template, choose Edit, modify it, then save.

But when I try to use the template by right clicking "Triggers" underneath any table and selecting "New Trigger", it still uses the default template.

In Process Explorer, I can see it accessing this file when I edit the template:

C:\Users\username\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\Templates\Sql\Trigger\Create T-SQL Trigger (New Menu).sql

When I try to use the template, it loads the script from this path:

C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\Sql\Trigger\Create T-SQL Trigger (New Menu).sql

Is there a certain setting/patch to help it keep the file paths sorted out?

Best Answer

It looks like, unfortunately, you can't do it this way. Default templates in Template Explorer are available for convenience only, changes to them are not reflected in default scripts.

See this question: Customize default 'New Stored Procedure' SSMS 2008 Template