SQL Server Query to Search Contents of Stored Procedures
I seem to have a need for this every 6 months or so. So I'm putting it up on this site to make it easier for me to lookup.
This SQL Server query allows you to search for specific text inside all stored procedures on a database. The query will return the name of the stored procedure.
SELECT name
FROM sys.procedures
WHERE Object_definition(object_id) LIKE '%Search-Text%'
Source: Search text in stored procedure in SQL Server
Tags: #SqlServer #Scripts
Discuss... or leave a comment below.