• IMHO, even though you can use TSQL to get the information, I would still simply right click on Master in the Object Explorer window and then click on Tasks/Generate Scripts... Then select the database and stored procedures in the wizard. Then I would make sure to script each SP into its own file name. Far easier than writing the TSQL. Plus when you are pointed to master only the User Defined SPs show up to be scripted. Of course, this way you end up with Microsofts screwball naming convention of files... [schemaName].[SPName].StoredProcedure.sql.

    Ah well. A simple VS Studio Macro fixes that. Now, if you had just scripted the files out to begin with... 🙂

    Gary Johnson
    Sr Database Engineer