Get at underlying executing query inside stored procedure using SqlCommand
Programmatically retrieve SQL Server stored procedure source that is identical to the source returned by the SQL Server Management Studio gui?