March 20, 2012

Finding Stored Procedures in SQL

Have an application with 100′s of stored procs and need to find one?  We use this code below that searchs all the stored proc’s syntax in a SQL database. Create PROCEDURE [dbo].[Find_Text_In_SP] @StringToSearch varchar(100) AS SET @StringToSearch = ‘%’ +@StringToSearch + ‘%’ SELECT Distinct SO.Name FROM sysobjects SO (NOLOCK) INNER JOIN syscomments… Read More