Skip to content

Instantly share code, notes, and snippets.

@jeffjohnson9046
Created November 10, 2017 18:14
Show Gist options
  • Save jeffjohnson9046/ac0255abb6747ca3c19c84a0b71dd591 to your computer and use it in GitHub Desktop.
Save jeffjohnson9046/ac0255abb6747ca3c19c84a0b71dd591 to your computer and use it in GitHub Desktop.
MS SQL Server: find text in a stored procedure
-- Second answer from here: https://stackoverflow.com/questions/14704105/search-text-in-stored-procedure-in-sql-server
SELECT
name,
SCHEMA_NAME(schema_id) AS [schema]
FROM
sys.procedures
WHERE
OBJECT_DEFINITION(object_id) LIKE '%whatever text you are looking for%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment