Skip to main content

Posts

Showing posts from February, 2014

Changing the default SSMS template

One of the useful little features I used to like about the SSMS Tools Pack, before I stopped using it, was its ability to add a BEGIN TRAN and ROLLBACK to new pages in SSMS when the New Query button was pressed:


Not a big deal you may think, but at the right time it could be an absolute life saver. If you have ever inadvertently clicked on the Execute button or pressed F5 by accident then you will know what I mean. The good news is that you enable this functionality without using a third party tool - by editing the file at

C:\Program Files\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\SqlWorkbenchProjectItems\Sql\SQLFile.sql

(path on a x86 PC with SSMS 2012 installed) you can add anything you like there and it will appear in each new query window.

----------------