Amit
Amit

Reputation: 7045

generate scripts automatically

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

Upvotes: 0

Views: 174

Answers (3)

JNK
JNK

Reputation: 65217

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.

Upvotes: 1

p.campbell
p.campbell

Reputation: 100647

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

alt text

Upvotes: 1

Giorgi
Giorgi

Reputation: 30893

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

Upvotes: 1

Related Questions