Thursday, March 29, 2012

How output all Stored Procedures to a table or file

I wish to ultimately have the content of all stored procedures related to a database in a single ASCII file for review. Is that doable? If so, how?
Thanks,
PeterRight-click your database in Enterprise Manager, select All tasks, Generate Sql script, there you can choose All stored procedures and other objects/options. mojza|||Fantastic Mojza - thanks for the help!

Peter|||Along this same line, this is what we do in order to generate script files that we then place into SourceSafe for version control. I am just learning that end of the department's process, but it seems to me I see stored procs at the system level for version control stuff, but need to look farther into that to see what other stuff we might use.

The script-to-VSS solution seems cheesy to me, but without taking this to be a "How do I do it" question, I'd just like to ask, is there an easier way? I can go look in BOL, but just saw the thread and was reminded of our local cheese factory, so thought I'd ask for quick-n-dirty impressions.|||Use VBA with SQL-DMO (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqldmo/dmoref_con01_2yi7.asp), possibly within DTS (http://msdn.microsoft.com/library/en-us/dtssql/dts_basic_5zg3.asp)?

-PatP

No comments:

Post a Comment