views:

35

answers:

3

Hi Guys,

I need to generate automatic sql script of SP, views, triggers etc.

Is there any tool available that i can use where i just need to put in the name for example SP name and it generates a create script for that for me.

sql server 2005

Thanks

+1  A: 

You can use T4 scripts as described here: How to use T4 to generate CRUD stored procedures

Giorgi
+1  A: 

Sounds like you're looking for a tool. What functionality or ease-of-use did you need outside of SQL Management Studio?

alt text

p.campbell
A: 

You can use PowerShell (free utility from MS) for this to script out any and all objects in a SQL Server database programmaticaly.

Directions, including detailed script examples here.

Download the newest version of PowerShell (v2) here.

JNK