Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

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

share|improve this answer
    
Bummer. I'll just have to hack up the program directory, I guess. –  db2 Mar 29 '12 at 20:12
add comment

What I did was create a new folder and then save the changes to that folder. You have to close out of SSMS and reopen to see it, you can use the same name for the template in a differnt folder. Or you could save as inthe original folder and add the company name or something else (like A_) to put them together at the top if the list.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.