Monday, February 10, 2014

Changing SQL Server New Stored Procedure Template

You can change the default SQL Server's Stored Procedure Template by editing the following files. This will change the template which appears when you right click on Store Procedure folder (in object explorer) and select "New Stored Procedure..." Command

SQL Server 2008 R2
C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\Sql\Stored Procedure\Create Stored Procedure (New Menu).sql

SQL Server 2012
C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\SqlWorkbenchProjectItems\Sql\Stored Procedure\Create Stored Procedure (New Menu).sql

Note that these files may only be editable by Administrators only, so you may need to open your editor in Administrator mode.