Is there a way to get stored procedures from a SQL Server 2005 Express database using C#? I would like to export all of this data in the same manner that you can script it o
This is a SQL that I have just tested and used in MSSQL
SELECT NAME from SYS.PROCEDURES
order by name
In case that you need to look for a specific name or substring/text
SELECT NAME from SYS.PROCEDURES
where name like '%%'
order by name
Replace with exactly that for example:
SELECT NAME from SYS.PROCEDURES
where name like '%CUSTOMER%'
order by name
And calling
EXEC sp_HelpText SPNAME
for each stored procedure, you'll get a record set with one line of text per row