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
You can use T4 scripts as described here: How to use T4 to generate CRUD stored procedures
Sounds like you're looking for a tool. What functionality or ease-of-use did you need outside of SQL Management Studio?
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.
精彩评论