Template Explorer – Deploying custom templates in SSMS – VTD Webcast feedback question – Underappreciated Features of Microsoft

Earlier this month, I presented a webcast on the “Underappreciated features of Microsoft SQL Server” during the “Exclusive Webcast series on Microsoft SQL Server”. As one of the developer productivity features provided with the SSMS, I presented the Template Explorer.

The session received a very good reception, and I thank-you – the community for the same. After the session, we had a very nice round of Q&A, and I was asked a very interesting question – “How can I deploy a template to all of my developer workstations?

It’s a very interesting question, and you would need the help of your IT Administrator for the same. However, here are the high-level steps to do so.

NOTE: These steps are formulated for Microsoft SQL Server 2008/2008 R2. Depending upon your version of SQL Server, the paths referenced may change.

  1. Login to SQL Server Management Studio
  2. Go to View->Template Explorer or hit Ctrl+Alt+T
  3. Customize the template of your choice or create a new one by using the method described in my post – http://beyondrelational.com/blogs/nakul/archive/2011/01/24/template-explorer-underappreciated-features-of-microsoft-sql-server.aspx
  4. Navigate out to the location: %APPDATA%MicrosoftMicrosoft SQL Server100ToolsShellTemplates
  5. Notice that the newly created template is stored as a .sql file under the category chosen. Thus, if you developed a template for a T-SQL Stored procedure, you will find it under ..SqlStored Procedure
  6. All that needs to be done now is to copy this template over to the same location on the target machine. Thus, if you have a team of 10 developer machines, all you need to do is to make sure that the template is placed at the mentioned path for each of these 10 developer machines

Typically, deployment of the custom template to the %APPDATA% folder hierarchy on the destination machine can be handled via a logon script by your IT administrator.


Do let me know if the above mentioned steps helped you roll out custom templates confirming to your coding standards across your team.

Until we meet next time,

Be courteous. Drive responsibly.


Let me know what you think about this post by leaving your feedback here!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.