views:

13

answers:

1

I am trying to customise the default query which is put in place when you click New Stored Procedure... from the Object Explorer on SQL Server Management Studio 2008.

I have found how to change the 'Create Stored Procedure (New Menu)' template from the Template Explorer, however this means I will have to keep opening the template explorer rather than clicking on new stored procedure like i usually would.

How can I edit the template which appears when you click New Stored Procedure... ?

+2  A: 

Find this directory:

C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\Sql\Stored Procedure\

or for those on x64 Windows,

C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\Sql\Stored Procedure\

Within are 6 .sql files:

  • Alter
  • Create Basic
  • Create with Cursor
  • Create with Output
  • Create from New Menu
  • Drop

Edit as you like!

For those with 64-bit SKUs of Windows, your C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE will only have a handful of .dlls.

p.campbell
Thanks for your reply, I get this far (see below), then I am just presented with 7 different .dll files. I don't know whether its because I'm using Windows 7? Thanks.C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE
Curt
@Curt: I've updated after some research around 64 bit installations. Hope this solves your problem.
p.campbell
Brilliant! Thanks p.campbell
Curt