I know how to do this the hard way; looking for something a bit less labor-intensive (SQL Server 2000).
I can get a list of all stored procedures on the current database like this:
And then change the default destination for Query Analyzer results to "file" (Tools --> Options... --> then select Query Results - SQL Server - General; then select 'Results to file' from the dropdown and set the path for the output).
And run
ONE PROC AT A TIME to have it saved off as a .rpt file, but is there a way to execute this for all procs using the proc name as the filename?
Reason for this insanity? Version comparision between code in database and that stored in an external source control.
< M!ke >
I am not a hamster and life is not a wheel.
I can get a list of all stored procedures on the current database like this:
Code:
SELECT Routine_Name
FROM Information_Schema.Routines
WHERE (Routine_Type = 'Procedure'
AND Routine_Name NOT LIKE 'dt[_]%'
ORDER BY Routine_Name
And then change the default destination for Query Analyzer results to "file" (Tools --> Options... --> then select Query Results - SQL Server - General; then select 'Results to file' from the dropdown and set the path for the output).
And run
Code:
sp_helptext ProcedureName
Reason for this insanity? Version comparision between code in database and that stored in an external source control.
< M!ke >
I am not a hamster and life is not a wheel.